LVM install fails to boot due to misconfigured initird
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initrd-tools (Ubuntu) |
Invalid
|
Medium
|
Jeff Bailey |
Bug Description
I installed the 5.04 release onto a USB drive on my laptop, with root on an LVM
logical volume.
When I attempted to boot the system, the boot failed. The BIOS succesfully
loaded GRUB, and
GRUB successfully loaded the kernel and initrd. But the initrd failed to locate
the volume group
containing the root partition.
Thinking that the problem might be the initrd not supporting USB devices, I put the
drive into the ultrabay slot instead (secondary IDE bus on my laptop). I still
couldn't boot, and
got the same error message (vgchange reporting that it couldn't find the volume
group in which
I'd placed the logical volume hosting my root filesystem).
Digging into it, I found that the initrd wasn't loading the appropriate modules.
Namely, it wasn't loading
ide-disk and the associated modules (e.g. ide-generic). Modifying loadmodules to
load these enabled
vgchange to locate the required volume group.
At that point, I ran into another problem: pivot_root was complaining that it
couldn't find
one of the directories. I patched around this by having the /sbin/init script on
the initrd
attempt to make /initrd on the target of pivot_root. I'm not sure why the
installer didn't
create /initrd on my root filesystem.
So I suspect the problem is two-fold:
1. loadmodules attempts to load usb-storage, but not usb-uhci, usb-ohci, or
usb-ehci.
This would explain why I couldn't boot from usb. (Note: I haven't confirmed that
this is the reason for the failure. But I do know that vgchange couldn't find
the volume group when I had the drive attached to usb, and that loadmodules
doesn't attempt to load usb-[uoe]hci.)
2. The generated initrd was probably "optimized" to work only for the configuration
on which it was installed. I.e. since I installed onto a USB drive, the initrd
only tried to support booting from USB... and did not put the IDE modules in the
loadmodules script.
I guess #1 is a genuine bug, while #2 is an RFE (support moving a boot disk from one
bus to another).
We've now moved over to using initramfs-tools by default in Breezy rather than
initrd-tools. This bug doesn't exist there, and the RFE has been done. =)
Marking this bug as wontfix. If you have problems with a current Breezy setup,
please let me know right away!
Tks,
Jeff Bailey