FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 09-24-2010, 04:41 PM
Dominic Hargreaves
 
Default Bug#597969: initramfs-tools: md device detection does not work with large numbers of md devices

Package: initramfs-tools
Version: 0.92o
Severity: important

When updating a kernel on a lenny system recently we saw the following
messages:

update-initramfs: Generating /boot/initrd.img-2.6.26-2-xen-amd64
mkinitramfs: missing raid root /dev/mapper/local0-sys.root /sys entry
mkinitramfs: workaround is MODULES=most
mkinitramfs: Error please report the bug
update-initramfs: failed for /boot/initrd.img-2.6.26-2-xen-amd64

This was caused by a sequence of bugs, of which this describes the
first (and easiest to fix)

On line 259 of /usr/share/initramfs-tools/hook-functions is found:

block=$(awk "/^${block}/{print substr($5, 1, 4); exit}"
/proc/mdstat)

In this case, this command found not md1, as desired, but md11.

The full line found was:

md11 : active (auto-read-only) raid1 sdm1[0] sdn1[1]

This is easily fixed with the following patch:

--- /usr/share/initramfs-tools/hook-functions 2008-12-18 16:41:11.000000000 +0000
+++ hook-functions 2010-09-23 17:31:56.000000000 +0100
@@ -256,7 +256,7 @@
fi
# lvm on md or luks on md
if [ "${block#md}" != "${block}" ]; then
- block=$(awk "/^${block}/{print substr($5, 1, 4); exit}"
+ block=$(awk "/^${block} /{print substr($5, 1, 4); exit}"
/proc/mdstat)
fi
block=${block%[0-9]*}


Subsequent bugs which were exposed by this one:

2) In this case md11 is marked auto-read-only (because it has not been
written to) which means that the fifth column is not a component device
name, but the raid level
3) the substr use here would presumably break discovery of component
devices with something other than exactly four characters.

but I'm not sure it's worth filing separate bugs for them, especially
since it looks like it's all changed in sid/sqeeze.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100924164130.8230.78805.reportbug@gunboat-diplomat.oucs.ox.ac.uk">http://lists.debian.org/20100924164130.8230.78805.reportbug@gunboat-diplomat.oucs.ox.ac.uk
 

Thread Tools




All times are GMT. The time now is 05:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org