Bugzilla – Attachment 227621 Details for
Bug 406554
initrd created by mkinitrd does not boot
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
mkinitrd-mixed-lvm-system
mkinitrd-mixed-lvm-system (text/plain), 3.74 KB, created by
Hannes Reinecke
on 2008-07-14 14:08:19 UTC
(
hide
)
Description:
mkinitrd-mixed-lvm-system
Filename:
MIME Type:
Creator:
Hannes Reinecke
Created:
2008-07-14 14:08:19 UTC
Size:
3.74 KB
patch
obsolete
>commit 074b2c3b13d94ad2b3aeb2cef937a205ae69709a >Author: Hannes Reinecke <hare@suse.de> >Date: Mon Jul 14 16:01:59 2008 +0200 > > Fix booting from combined block/LVM system > > Block device setup gets confused if the system is a mixed > block/LVM system. > > References: 406554 > Signed-off-by: Hannes Reinecke <hare@suse.de> > >diff --git a/mkinitrd.changes b/mkinitrd.changes >index f35d3cb..65a42df 100644 >--- a/mkinitrd.changes >+++ b/mkinitrd.changes >@@ -1,4 +1,16 @@ > ------------------------------------------------------------------- >+Mon Jul 14 10:45:09 CEST 2008 - hare@suse.de >+ >+- Update documentation >+- Remove call to getcfg-interface (bnc#401660) >+- Fixup booting from LVM (bnc#406554) >+ >+------------------------------------------------------------------- >+Thu Jun 26 10:41:18 CEST 2008 - agraf@novell.com >+ >+- Escape minus commandline keys (bnc#389672,bnc#403995) >+ >+------------------------------------------------------------------- > Thu Jun 26 08:47:25 CEST 2008 - hare@suse.de > > - Revert init= changes; incompatible with 'normal' kernel >diff --git a/scripts/boot-devfunctions.sh b/scripts/boot-devfunctions.sh >index 5cefc69..878f04e 100755 >--- a/scripts/boot-devfunctions.sh >+++ b/scripts/boot-devfunctions.sh >@@ -46,24 +46,34 @@ devnumber() { > # device node will be created by udev > check_for_device() { > local root >+ local type > local retval=1 > local timeout=$udev_timeout >+ local dm_major > local udev_devn > local udev_major > > root=$1 >+ type=$2 >+ if [ "$type" = "root" ] ; then >+ dm_major=$root_major >+ elif [ "$type" = "resume" ] ; then >+ dm_major=$resume_major >+ else >+ dm_major= >+ fi > if [ -n "$root" ]; then > echo -n "Waiting for device $root to appear: " > while [ $timeout -gt 0 ]; do > if [ -e $root ]; then > udev_devn=$(devnumber $root) > udev_major=$(devmajor $udev_devn) >- if [ -n "$root_major" ] ; then >- if [ "$udev_major" == "$root_major" ] ; then >+ if [ -n "$dm_major" ] ; then >+ if [ "$udev_major" == "$dm_major" ] ; then > echo " ok" > retval=0 > break; >- else >+ elif [ -x /sbin/multipath ] ; then > echo -n "!" > multipath -v0 > wait_for_events >diff --git a/scripts/boot-lvm2.sh b/scripts/boot-lvm2.sh >index 145f211..1ec7b5b 100755 >--- a/scripts/boot-lvm2.sh >+++ b/scripts/boot-lvm2.sh >@@ -17,12 +17,12 @@ > ## vg_roots use this group as Volume Group > ## > >-# load the necessary module before we initialize the raid system >-load_modules >- >-if [ -n "$root_lvm2" ] ; then >- o=$(get_param root) >- case $o in >+lvm2_get_vg() { >+ local param=$1 >+ local vg_root vg_name >+ local sysdev >+ >+ case $param in > /dev/disk/by-*/*) > vg_root= > ;; >@@ -31,7 +31,7 @@ if [ -n "$root_lvm2" ] ; then > vg_root=${vg_name%%-*} > ;; > /dev/*) >- set -- $(IFS=/ ; echo $o) >+ set -- $(IFS=/ ; echo $param) > if [ "$#" = "3" ] ; then > # Check sysfs. If there are subdirectories > # matching this name it's a block device >@@ -47,13 +47,30 @@ if [ -n "$root_lvm2" ] ; then > fi > ;; > esac >- if [ "$vg_root" ] || [ "$vg_roots" ] ; then >+ >+ echo $vg_root >+} >+ >+# load the necessary module before we initialize the raid system >+load_modules >+ >+if [ -n "$root_lvm2" ] ; then >+ o=$(get_param root) >+ vg_root=$(lvm2_get_vg $o) >+ if [ "$vg_root" ] ; then > # We are waiting for a device-mapper device > root_major=$(sed -n 's/\(.*\) device-mapper/\1/p' /proc/devices) > fi >+ o=$(get_param resume) >+ vg_resume=$(lvm2_get_vg $o) >+ if [ "$vg_resume" ] ; then >+ resume_major=$(sed -n 's/\(.*\) device-mapper/\1/p' /proc/devices) >+ fi > fi > > # initialize remebered and parameterized devices >-for vgr in $vg_root $vg_roots; do >+for vgr in $vg_root $vg_resume $vg_roots; do > vgchange -a y $vgr > done >+ >+unset lvm2_get_vg
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 406554
: 227621