[Bug 409435] New: mkinitrd-1.2-106. 52 creates unbootable initrd for systems with roon on LVM2 on software RAID
https://bugzilla.novell.com/show_bug.cgi?id=409435 Summary: mkinitrd-1.2-106.52 creates unbootable initrd for systems with roon on LVM2 on software RAID Product: openSUSE 10.2 Version: Final Platform: x86-64 OS/Version: openSUSE 10.2 Status: NEW Severity: Normal Priority: P5 - None Component: Booting AssignedTo: jsrain@novell.com ReportedBy: A.Vetlugin@dalcombank.ru QAContact: jsrain@novell.com Found By: --- /sbin/mkinitrd script wrongly determines realrootdev. When root fs is searched in output of `lvdisplay -c` by $major and $minor - the regexp returns wrong line. Example: rootdev is /dev/system/root, major 253, minor 1 lvdisplay -c returns (interesting lines marked with *): iscsi0:~ # lvdisplay -c /dev/data/sys-stb:data:3:1:-1:0:104857600:12800:-1:0:0:253:6 /dev/data/sys-s1:data:3:1:-1:0:104857600:12800:-1:0:0:253:7 /dev/data/ibs-stb:data:3:1:-1:0:2147483648:262144:-1:0:0:253:8 /dev/data/crown-stb:data:3:1:-1:0:2147483648:262144:-1:0:0:253:9 * /dev/data/ibs-s1-t:data:3:1:-1:0:2147483648:262144:-1:0:0:253:10 * /dev/data/crown-s1-t:data:3:1:-1:0:2147483648:262144:-1:0:0:253:11 /dev/data/ext3:data:3:1:-1:1:2147483648:262144:-1:0:0:253:12 /dev/system/opt:system:3:1:-1:1:20971520:2560:-1:0:0:253:0 * /dev/system/root:system:3:1:-1:1:4194304:512:-1:0:0:253:1 /dev/system/swap:system:3:1:-1:1:8388608:1024:-1:0:0:253:2 /dev/system/u:system:3:1:-1:1:104857600:12800:-1:0:0:253:3 /dev/system/usr:system:3:1:-1:1:20971520:2560:-1:0:0:253:4 /dev/system/var:system:3:1:-1:1:20971520:2560:-1:0:0:253:5 iscsi0:~ # realrootdev is searched with wrong sed regexp 253:1, which returns /dev/data/ibs-s1-t:data:3:1:-1:0:2147483648:262144:-1:0:0:253:10 /dev/data/crown-s1-t:data:3:1:-1:0:2147483648:262144:-1:0:0:253:11 /dev/system/root:system:3:1:-1:1:4194304:512:-1:0:0:253:1 instead of just /dev/system/root:system:3:1:-1:1:4194304:512:-1:0:0:253:1 as a result realrootdev=/dev/data/ibs-s1-t instead of /dev/system/root The solution is to change regexp in /sbin/mkinitrd the following way (add end of line \$): iscsi0:/sbin # diff -u /sbin/mkinitrd /sbin/mkinitrd.orig --- /sbin/mkinitrd 2008-07-16 16:53:38.000000000 +1100 +++ /sbin/mkinitrd.orig 2007-05-10 03:43:14.000000000 +1100 @@ -3387,7 +3387,7 @@ fi # Check whether we are using LVM2 if [ -z "$root_evms" ] && [ -x /sbin/lvdisplay ] ; then - vg_name=$(lvdisplay -c 2> /dev/null | sed -n "/.*:$major:$minor\$/p") + vg_name=$(lvdisplay -c 2> /dev/null | sed -n "/.*:$major:$minor/p") vg_dev=${vg_name%%:*} vg_name=${vg_name#*:} vg_root=${vg_name%%:*} I've checked mkinitrd-1.2-106.52 and mkinitrd-1.2-106.61 - the bug still exists. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=409435 User A.Vetlugin@dalcombank.ru added comment https://bugzilla.novell.com/show_bug.cgi?id=409435#c1 --- Comment #1 from Andrew Vetlugin <A.Vetlugin@dalcombank.ru> 2008-07-16 00:34:32 MDT --- Diff was run in wrong way :) This is the correct one: iscsi0:/sbin # diff -u /sbin/mkinitrd.orig /sbin/mkinitrd --- /sbin/mkinitrd.orig 2007-05-10 03:43:14.000000000 +1100 +++ /sbin/mkinitrd 2008-07-16 16:53:38.000000000 +1100 @@ -3387,7 +3387,7 @@ fi # Check whether we are using LVM2 if [ -z "$root_evms" ] && [ -x /sbin/lvdisplay ] ; then - vg_name=$(lvdisplay -c 2> /dev/null | sed -n "/.*:$major:$minor/p") + vg_name=$(lvdisplay -c 2> /dev/null | sed -n "/.*:$major:$minor\$/p") vg_dev=${vg_name%%:*} vg_name=${vg_name#*:} vg_root=${vg_name%%:*} -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=409435 Jiri Srain <jsrain@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|jsrain@novell.com |hare@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=409435 User hare@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=409435#c2 --- Comment #2 from Hannes Reinecke <hare@novell.com> 2008-07-18 00:29:47 MDT --- Created an attachment (id=228646) --> (https://bugzilla.novell.com/attachment.cgi?id=228646) /sbin/mkinitrd Current /sbin/mkinitrd script from SLES10 SP2. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=409435 User hare@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=409435#c3 Hannes Reinecke <hare@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #3 from Hannes Reinecke <hare@novell.com> 2008-07-18 00:30:57 MDT --- This is a known bug, which is already fixed for SLES10 SP2. We won't be doing any updates for 10.2 here, but you can just copy the above script and use it as a replacement. *** This bug has been marked as a duplicate of bug 360031 *** https://bugzilla.novell.com/show_bug.cgi?id=360031 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com