Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 78826 - Genkernel LVM bug
Summary: Genkernel LVM bug
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-20 08:45 UTC by Kevin Arhelger
Modified: 2005-01-26 14:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Arhelger 2005-01-20 08:45:49 UTC
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.
Comment 1 SI Reasoning 2005-01-20 09:05:55 UTC
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.
Comment 2 SI Reasoning 2005-01-20 09:34:43 UTC
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.
Comment 3 Eric Edgar (RETIRED) gentoo-dev 2005-01-20 15:38:01 UTC
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?
Comment 4 SI Reasoning 2005-01-20 16:17:40 UTC
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.) 
Comment 5 Eric Edgar (RETIRED) gentoo-dev 2005-01-20 18:49:59 UTC
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.

Comment 6 Tim Yamin (RETIRED) gentoo-dev 2005-01-26 14:09:22 UTC
-e in Portage since a few days ago and marked stable, closing as FIXED.