Using LVM partitions
ken at kenmoffat.uklinux.net
Thu Jun 30 18:13:58 PDT 2005
On Thu, 30 Jun 2005, Joseph M Dupre (AVAB Inc.) wrote:
> I'm trying to boot up to my new LFS 6.0 partition which is a LVM
> logical volume, but I am getting this:
> device-mapper: 4.1.0-ioctl (2003-12-10 initialised: dm at uk.sistina.com
> VFS: Cannot open root device "VolGroup00/LFS" or unknown-block(0,0)
> Please append a correct "root=" boot option
> Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)
> Grub and the lfskernel are currently running from the host's non-LVM
> ext3 boot partition, *not* LFS's /boot directory. You can see that
> the LVM support (device-mapper) is compiled into the kernel.
> My (snipped) entry in grub is:
> target Fedora Core 3
> root (hd0,0)
> kernel /vmlinuz-2.6.9-1.667smp ro root=/dev/VolGroup00/LogVol00 rhgb
> initrd /initrd-2.6.9-1.667smp.img
> target LFS 6.0
> root (hd0,0)
> kernel /lfskernel-184.108.40.206 root=/dev/VolGroup00/LFS
> Does anyone know more about LVM that could tell me why the host
> fedora boot up can find the logical volumes but the LFS boot can't?
> - Joe
> Note: I did NOT install the LVM tools into the LFS system, as I can
> manage LVM from the main host configuration at this point.
I know almost nothing about lvm, but on LFS-6.0 you are using udev.
Now, you probably use udev on fedora too, but that has an initrd to set
things up before it pivots to the real root filesystem. Under LFS, udev
will create the devices that it knows about when it gets the kernel
events. I think this might be a chicken-and-egg situation - there are
no new real devices to create events, all the kernel can see are the
Compare software raid [ mdadm ] : On this, at least for other than the
root fs (haven't tried that yet), udev works because it can find out
about the arrays by reading /etc/mdadm.conf, and when you create an
array you need both a recent kernel and an -auto fleag. Maybe lvm is
somewhat similar, and you need to set up a config file for it ?
Alternatively, maybe you need to mknod whatever logical devices are
needed [ e.g. by adding them to the /etc/rc.d/init.d/udev script ].
A quick google for lvm and udev suggests that /sbin/lvm2 might need to
be run from an init script, which I guess would mean you _do_ need the
das eine Mal als Tragödie, das andere Mal als Farce
More information about the lfs-support