Bug 147415 - mkinitrd fails during installation if root filesystem is on LVM
Summary: mkinitrd fails during installation if root filesystem is on LVM
Status: RESOLVED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Installation (show other bugs)
Version: Beta 3
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Hannes Reinecke
QA Contact: Klaus Kämpf
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-01 21:09 UTC by Carl-Daniel Hailfinger
Modified: 2006-02-02 07:37 UTC (History)
3 users (show)

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
mkinitrd (70.75 KB, text/plain)
2006-02-02 07:36 UTC, Hannes Reinecke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carl-Daniel Hailfinger 2006-02-01 21:09:14 UTC
root filesystem on lvm1
mkinitrd thinks it hit a lvm2 root volume and writes the wrong linuxrc.

Even if it were a lvm2 volume, there is still an error in line 2316:
    |if [ -z "\$lv_root" ]; then
this should be
    |if [ -z "\$vg_root" ]; then
because $lv_root will always be empty because the lines above that set $vg_root.
Comment 1 Carl-Daniel Hailfinger 2006-02-01 21:10:02 UTC
sorry, should have assigned it to Hannes directly.
Comment 2 Erik Jacobson 2006-02-01 23:51:02 UTC
SGI has hit this with ia64 on Altix, we believe.
In the ia64 case, the boot files are missing from /boot/efi
even though /boot/efi isn't part of the volume of course.
Comment 3 Erik Jacobson 2006-02-02 00:00:02 UTC
[I asked our QA team if their bug could be the same as this already
filed suselinux one, Jim Grisham in SGI QA replied:]

Could be. I wasn't able to reproduce the hang after deleting/creating
a new lvm. It installed now and I verified /boot/efi has no files in it.
Here's the info from partition in the installer:

 Delete logical volume /dev/system/system (58.8 GB)
Remove volume group system
Delete partition /dev/sde3 (24.6 GB)
Delete partition /dev/sdf1 (34.1 GB)
Create partition /dev/sde3 (24.6 GB) with id=8E
Create partition /dev/sdf1 (34.1 GB) with id=8E
Create volume group lvmroot
Create logical volume /dev/lvmroot/lvmroot (58.8 GB) for / with reiserfs
Format partition /dev/sde1 (517.6 MB) for /boot/efi with vfat
Use /dev/sda10 as swap
Use /dev/sdb7 as swap
Use /dev/sdc2 as swap
Use /dev/sde2 as swap
Use /dev/sdg7 as swap
Use /dev/sdh7 as swap
Use /dev/sdi7 as swap
Use /dev/sdj7 as swap

Here's what was mounted during install, includes /dev/sde1:

inst-sys:~ # mount
rootfs on / type rootfs (rw)
tmpfs on / type tmpfs (rw)
tmpfs on / type tmpfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/loop0 on /mounts/instsys type cramfs (ro)
devpts on /dev/pts type devpts (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
163.154.12.145:/install/sles10 on
/var/adm/YaST/InstSrcManager/IS_CACHE_0x00000001/MEDIA type nfs
(ro,nolock,addr=163.154.12.145)
/dev/sde1 on /mnt/boot/efi type vfat (rw)
/dev/mapper/lvmroot-lvmroot on /mnt type reiserfs (rw)
proc on /mnt/proc type proc (rw)
sysfs on /mnt/sys type sysfs (rw)

Stopping it before the first reboot, mount shows:

nst-sys:~ # mount
rootfs on / type rootfs (rw)
tmpfs on / type tmpfs (rw)
tmpfs on / type tmpfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/loop0 on /mounts/instsys type cramfs (ro)
devpts on /dev/pts type devpts (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/mapper/lvmroot-lvmroot on /mnt type reiserfs (rw)
sysfs on /mnt/sys type sysfs (rw)

...Remounted /dev/sde1 and no files:

 mount /dev/sde1 /mnt/boot/efi
inst-sys:~ # cd /mnt/boot/efi
inst-sys:/mnt/boot/efi # ls
inst-sys:/mnt/boot/efi #

Thanks for tracking that down!

[snip]
Comment 4 Carl-Daniel Hailfinger 2006-02-02 00:13:54 UTC
No, your bug is bug 147366 "Installer mounts filesystems in wrong order, resulting in boot failure".

Quoting from your report:
inst-sys:~ # mount
[...]
/dev/sde1 on /mnt/boot/efi type vfat (rw)
/dev/mapper/lvmroot-lvmroot on /mnt type reiserfs (rw)
[...]

That's the wrong mount order bug.
However, you would have been hit by this bug if you had solved the other one.
Comment 5 Hannes Reinecke 2006-02-02 07:36:21 UTC
Created attachment 66141 [details]
mkinitrd

Fixed /sbin/mkinitrd
Comment 6 Hannes Reinecke 2006-02-02 07:37:14 UTC
Fixed mkinitrd submitted to STABLE for SLES10 Beta4. In the meantime you can use the attachment.