On Sat, 3 May 2003, Michael Schwendt wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Sat, 3 May 2003 14:42:08 -0400 (EDT), Robert P. J. Day wrote: > > > (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? > > Did you use partition labels in /etc/grub.conf? If so, the kernel > would fail mounting the root partition, since it is the "mount" > command in the initial RAM-disk that supports partition labels. ah, i wasn't that silly. i remember the fiasco when i ran into this with ext2/3 mounting and initrd. initially, only the /boot filesystem was being mounted with a LABEL, but that should have been fine, since it was not a LV, just a regular primary partition. the (LV) root filesystem was *definitely* being mounted with a device name (something like /dev/Volume00/Vol05, if memory serves). but just to play it safe, i changed the label for the /boot filesystem, which made no difference. so i'm still confused. rday