  | |  | why does one need an initrd if using LVM? | why does one need an initrd if using LVM? 2003-05-03 - By Robert P. J. Day
Back
(perhaps related to an earlier issue as to why one needs an initrd when using ext3 ...)
earlier today, when demonstrating to a class how to rebuild a kernel, i suggested that one could avoid having to deal with creating an initrd.img if one built all necessary drivers into the kernel.
since we were using ext3 filesystems and logical volumes, i was very careful to tell everyone to add these features to their kernel, and not leave them as modules. since they all did that, i told them to skip building an initrd.img and just reboot.
bad idea -- the boot hung at trying to mount the root filesystem. i couldn 't figure out why since the kernel had clearly loaded and started to run, so what was the problem?
one student just added the "initrd " line to her grub.conf file for that kernel image, and it worked fine. puzzling. so i ripped open that initrd.img and found just ext3.o, jbd.o and lvm-mod.o. but why were these needed in the initrd?
as a test, i ran "mkinitrd " against the new kernel, got my new initrd.img, and opened it up to find ... no module at all. not surprising since everything was in the kernel, and "mkinitrd " was smart enough to figure that out. but using that module-less initrd.img got the boot to work.
what gives? i checked the /etc/fstab, and it turns out that the /boot filesystem (a real primary partition, not a logical volume) was listed with a LABEL field, but even changing that back to a /dev entry didn 't fix things.
so why is initrd.img necessary for LVs even when it has no modules?
rday
|
|
 |