[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#280571: initrd-tools: Should initialize only LVM VG needed for root fs, not all



Package: initrd-tools
Version: 0.1.74
Severity: important
Tags: patch

The '/script' script in the initrd image generated by mkinitrd contains
a line initializing the VG's when the root fs is on LVM, using the
vgchange command. The problem is that it initializes all VG's, which in
my case fails because one of them depends on a feature not initialized
at this point (my root fs is on a VG on top of a software raid1, and
I have another VG on top of a software raid0, and the raid0 module is
not loaded).

In any event, only the VG containing the root fs should be initialized
at this point, the other ones being taken care by the real system
initialization.

My suggested patch, which corrected the problem for me:

--- /usr/sbin/mkinitrd.orig     2004-11-10 10:47:02.000000000 +0100
+++ /usr/sbin/mkinitrd  2004-11-10 10:48:06.000000000 +0100
@@ -273,7 +273,7 @@
                        echo '[ -c /dev/lvm ] || mknod /dev/lvm c 109 0'
                        echo mount_tmpfs /etc
                        echo vgscan
-                       echo vgchange -a y
+                       echo vgchange -a y ${vg}
                        echo umount -n /etc
                } >&5
                {
@@ -303,7 +303,7 @@
                                cat /var/lvm.conf > /etc/lvm/lvm.conf
                        fi
                        mount -nt devfs devfs /dev
-                       vgchange -a y
+                       vgchange -a y ${vg}
                        umount /dev
                        umount -n /var
                        umount -n /etc/lvm



I have not tested the part for LVM1, only LVM2.

Best regards,

-Christian

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-mooch.2
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US (charmap=ISO-8859-1) (ignored: LC_ALL set to en_US)

Versions of packages initrd-tools depends on:
ii  coreutils [fileutils]         5.2.1-2    The GNU core utilities
ii  cpio                          2.5-1.1    GNU cpio -- a program to manage ar
ii  cramfsprogs                   1.1-6      Tools for CramFs (Compressed ROM F
ii  dash                          0.5.1-3    The Debian Almquist Shell
ii  fileutils                     5.2.1-2    The GNU file management utilities 
ii  util-linux                    2.12h-3    Miscellaneous system utilities

-- no debconf information



Reply to: