When using genkernel all --with-lvm2 the initrd does not work. Problem is the initrd links vgchange and vgscan to some oddball directory /var something. Solution patch the script "ln -s /bin/lvm vgscan" "ln -s /bin/lvm vgchange" Reproducible: Always Steps to Reproduce: 1. 2. 3.
I also had this problem, why has this not made it to stable genkernel yet? Without it, during boot one has to go to a shell and manually type in "lvm vgchange -ay" (I have no idea why "lvm vgscan" is not necessary), then quit the shell and type in the real_root directory from lilo.conf before the system will properly boot. This prevents a reboot without intervention and is a very tiny but necessary fix.
Here is a more indepth description of the problem: This issue only affects an lvm or lvm2 root partition. When using 'genkernel initrd --lvm2' an improper link is created for /bin/vgscan and /bin/vgcreate. The improper links created are as follows: vgchange -> /var/tmp/genkernel/initrd-temp/bin/lvm vgscan -> /var/tmp/genkernel/initrd-temp/bin/lvm The links should be: vgchange -> lvm vgscan -> lvm Currently when booting up with an initrd created with genkernel using --lvm2, the system cannot find the /dev/volumegroup/rootvolume because both vgscan and vgchange are both linked to a non-existing entity within the initrd. This causes an error message and requires a drop to a shell as mentioned above to fix the issue. Changing the script for proper linking will resolve this issue.
Which version of genkernel are you using? Also is lvm already compiled into the operating system using the STATIC use flag or are you letting genkernel compile the lvm binaries?
I am using genkernel-3.1.0c I actually have compiled lvm2 statically and have it available to be compiled (with the appropriate tar.gz's) as via the HOWTO install Gentoo on an LVM2 root: emerge -f "=lvm2.2.00.25" "=device-mapper.1.00.17-r1" cp /usr/portage/distfiles/LVM2.2.00.25.tgz /usr/portage/distfiles/device-mapper.1.00.17.tgz /usr/share/genkernel/pkg I am using the above lvm2 as the stable version does not compile statically (or at least does not have a USE flag for it.)
This bug is resolved in genkernel 3.1.0d As a work around for genkerne 3.1.0c you can perform these steps 1.) emerge -f lvm2 device-mapper 2.) cp /usr/portage/distfiles/LVM2.2.00.25.tgz /usr/portage/distfiles/device-mapper.1.00.17.tgz /usr/share/genkernel/pkg 3.) emerge -C lvm2 4.) emerge lvm2 make sure that the static USE flag is NOT set 5.) genkernel --lvm2 initrd There is a bug if genkernel uses a static lvm2 from the operating system. This workaround forces genkernel to compile lvm2 internally and this path does not contain the bug.
-e in Portage since a few days ago and marked stable, closing as FIXED.