Package: multipath-tools
Version: 0.4.1-1
Severity: critical
Justification: breaks the whole system
Tags: patch

If multipath-tools-0.4.1-1 is installed, the initrd generated by
initrd-tools-0.1.76 is non-bootable for systems using an LVM
root device.

Symptoms: pivot_root: no such file or directory; sbin/init not found;
panic: attempting to kill init.

The cause: multipath adds a script /etc/mkinitrd/scripts/01_udev; this
mounts a new /dev and lets udevstart run on it.  This happens after
/script is executed, which is where the LVM command "vgchange -a y vg0"
is executed to create LVM devices.  Unfortunately, udevstart has no way
of creating the /dev/mapper nodes required by LVM, so the root device
/dev/mapper/vg0 stays missing.

One possible fix would be not to mount an empty /dev in 01_udev, so that
the LVM devices remain visible.  However, mounting a new /dev protects
against a possible read-only prior /dev, and the prior /dev is indeed
read-only.  (it is part of the initrd image and contains some symlinks
to ../devfs)

So the attached patch instead copies the contents of the old /dev to the
new /dev.  It's possible that a similar problem would occur for other
virtual devices such as MD; these too are not created by hotplugging
but by an init.d script.  I have not tested this, but the patch should
cover such cases.

The patch was tested on a PC with LVM devices on a SATA disk but no
actual multipath devices: I only installed multipath-tools to take a
look at the documentation ...

I'm including #288150 (initrd no longer works unless busybox is
installed) on the Cc list.  That report mentions /bin/sleep missing
from initrd image.  The missing sleep is still missing after attached
patch, but it does not seem to harm anything.  No claim that this
patchs solves #288150, but the symptoms seem similar enough to justify
a cross reference.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-1-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages multipath-tools depends on:
ii  debconf [debconf-2.0]    1.4.41          Debian configuration management sy
ii  hotplug                  0.0.20040329-16 Linux Hotplug Scripts
ii  initscripts              2.86.ds1-1      Standard scripts needed for bootin
ii  libc6                    2.3.2.ds1-20    GNU C Library: Shared libraries an
ii  libdevmapper1.00         2:1.00.20-1     The Linux Kernel Device Mapper use
ii  libsysfs1                1.1.0-1         Interface library to sysfs
ii  makedev                  2.3.1-75        Creates device files in /dev
ii  udev                     0.050-4         /dev/ management daemon

-- no debconf information

--- 01_udev.org 2005-01-12 10:57:58.000000000 +0100
+++ 01_udev.works       2005-01-12 22:51:22.000000000 +0100
@@ -4,8 +4,9 @@
 cp /sbin/udevstart $INITRDDIR/sbin/
 cp /bin/mountpoint $INITRDDIR/bin/
 cp /bin/readlink $INITRDDIR/bin/
+cp /bin/cp $INITRDDIR/bin/
 
-PROGS="/sbin/udev /sbin/udevstart /bin/mountpoint /bin/readlink"
+PROGS="/sbin/udev /sbin/udevstart /bin/mountpoint /bin/readlink /bin/cp"
 LIBS=`ldd $PROGS | grep -v linux-gate.so | sort -u | \
 awk '{print $3}'` 
 for i in $LIBS
@@ -33,10 +34,15 @@
 cat <<EOF >| $INITRDDIR/scripts/10_udev.sh
 
 cd /
+mount -n --bind /dev /mnt
 mount -nt proc proc proc
 mount -nt sysfs sysfs sys
 mount -nt tmpfs tmpfs dev || mount -nt ramfs ramfs dev
 mount -nt tmpfs tmpfs tmp || mount -nt ramfs ramfs tmp
+# preserve old /dev contents, since udev does not make
+# eg LVM nodes.
+cp -a /mnt/* /dev
+umount -n /mnt
 
 #modprobe dm-mod
 #modprobe dm-multipath


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to