Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 255196 - genkernel should install >=lvm2-2.02.31 for use with latest kernels
Summary: genkernel should install >=lvm2-2.02.31 for use with latest kernels
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
Keywords: InVCS
Depends on: 207612
Blocks: 351772
  Show dependency tree
Reported: 2009-01-16 20:03 UTC by Robert Buchholz (RETIRED)
Modified: 2011-01-16 17:24 UTC (History)
11 users (show)

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

Fix for LVM 2.02.28 (0001-LVM-2.02.28-fix.patch,3.63 KB, patch)
2011-01-13 20:10 UTC, Amadeusz Żołnowski (RETIRED)
Details | Diff
0001-Fix-for-LVM-2.02.72-compilation.patch (0001-Fix-for-LVM-2.02.72-compilation.patch,1.00 KB, patch)
2011-01-15 22:49 UTC, Amadeusz Żołnowski (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Buchholz (RETIRED) gentoo-dev 2009-01-16 20:03:59 UTC
If the internal copy of LVM2 is used (which is 2.02.28), one can get the same errors as reported in bug 207612. Please bump and use a later copy of LVM2 (2.02.37 is stable currently).
Comment 1 Ahmed Ammar (RETIRED) gentoo-dev 2009-02-27 13:12:13 UTC
I second this.
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2009-02-27 13:36:21 UTC
You can second this all you want. Have you actually bumped the version in genkernel.conf and tried build an initramfs with it and booting?
Comment 3 Robert Buchholz (RETIRED) gentoo-dev 2009-03-01 11:26:57 UTC
I have seen the failures using the internally specified copy. Then I installed the latest ebuild and it used the system copy, which booted. I have not tried editing it so it uses the latest version as an internal copy -- does that cause problems?
Comment 4 Denis Dupeyron (RETIRED) gentoo-dev 2009-07-22 00:14:38 UTC
I emerged genkernel-9999 today (to get the fix for bug #276753), bumped LVM to latest stable i.e. 2.02.36 in genkernel.conf and it properly booted my RAID+LUKS+LVM system with hardened-sources-2.6.29. I had previously experienced this issue on 2 other systems although I didn't try on this one without bumping LVM.

Comment 5 Andrew Gaffney (RETIRED) gentoo-dev 2009-07-22 13:06:58 UTC
And you're sure that you moved your system lvm and lvm.static binaries out of the way so that it would compile lvm internally?
Comment 6 Christian Bricart 2009-07-23 13:10:35 UTC
actually people (still) having CONFIG_SYSFS_DEPRECATED or the newer CONFIG_SYSFS_DEPRECATED_V2 set in their kernel will not suffer from this bug.

bumping genkernel's internal versions to:


in /etc/genkernel.conf resolves the issue which has not been related to lvm vs. lvm.static at any time but the way block devices are listed in sysfs (i.e. /sys/block/* have become symlinks and older versions of LVM simply ignore rather than follow them).

as a side note: I've tried even higher version numbers of LVM here - but they all failed to compile from within calling "genkernel ramdisk"..

Comment 7 Christian Bricart 2009-07-23 13:57:45 UTC
to sum things up that means to:

- bump the internal version numbers in genkernel.conf to address people that do not have USE=static on sys-fs/lvm2 and/or use >=lvm2-2.02.48-r1 with <genkernel-9999 (wrt bug #276753)

- stablize >=genkernel- (which then has bug #276753 fixed)

Comment 8 François Valenduc 2009-11-11 12:21:23 UTC
lvm2-2.02.51-r1 became stable for x86. It tooks me hours to find that I had to update genkernel to be able to boot my system again because I have my root partition in a LVM2 volume. So, I think it's quite urgent to stablize >=genkernel-
Comment 9 Marc Schiffbauer gentoo-dev 2009-12-11 02:01:00 UTC
Thanks François for that comment!

This has nearly been a disaster here... until I found your solution.

Please stabilize the newer genkernel version!

Otherwise I guess *ALL* current stable gentoo machines with root on LVM2 are not able to boot ATM.
Comment 10 Łukasz Stelmach 2009-12-16 12:46:32 UTC
It's going to be a year old bug soon and yet it managed to hit me. Please bump versions.
Comment 11 Sebastian Pipping gentoo-dev 2011-01-13 15:58:02 UTC
I currently cannot get LVM2 compiling from genkernel.  I get errors for all of 2.02.28, 2.02.36 and 2.02.74.  I have tried applying patches from Gentoo ebuilds, too.

Please help me getting a newer version compiling.
These commands can get you started.

# git clone git://
# git checkout -t origin/experimental
# sudo mv /sbin/lvm.static{,_BACKUP}
# sudo GK_SHARE="$PWD" ./genkernel initramfs

Patches found in ${GK_SHARE}/patches/lvm/${LVM_VER}/ are auto-applied for you.
Comment 12 Amadeusz Żołnowski (RETIRED) gentoo-dev 2011-01-13 20:10:00 UTC
Created attachment 259742 [details, diff]
Fix for LVM 2.02.28

Builds for me, but haven't try to boot from it.  Tested just for 2.02.28.  Please let me know I did it right, then I will continue for other versions.
Comment 13 Amadeusz Żołnowski (RETIRED) gentoo-dev 2011-01-13 20:13:49 UTC
Forgot to mention what I did, so here goes:

1) Removed --export-dynamic from configure script.
2) Added -fPIC flags.
3) Made modules internal or none.
Comment 14 Sebastian Pipping gentoo-dev 2011-01-14 16:42:37 UTC
Amadeusz, patch applied, thank you!
Comment 15 Sebastian Pipping gentoo-dev 2011-01-15 17:39:14 UTC
I just tried booting with the resulting LVM 2.02.28 - it doesn't find the volume group.  I'll try to look into it.  Help welcome.
Comment 16 Amadeusz Żołnowski (RETIRED) gentoo-dev 2011-01-15 22:49:57 UTC
Created attachment 259976 [details, diff]

Do we have to support previous versions of LVM?

LVM 2.02.72 doesn't need external device-mapper package.  It has libdm integrated.  Builds without the problem with provided patch. I've checked also resulting binary.  ./lvm vgdisplay returns expected results.  Although I haven't booted resulting image.
Comment 17 Sebastian Pipping gentoo-dev 2011-01-16 00:02:07 UTC
(In reply to comment #16)
> Created an attachment (id=259976) [details]
> 0001-Fix-for-LVM-2.02.72-compilation.patch


> Do we have to support previous versions of LVM?

Maybe not.

> [..] Although I haven't booted resulting image.

Boots perfect in with Luks over here.
Comment 18 Amadeusz Żołnowski (RETIRED) gentoo-dev 2011-01-16 00:27:08 UTC
(In reply to comment #17)
> > Do we have to support previous versions of LVM?
> Maybe not.

So, just let me know if it will be required to look at previous versions.  I don't won't to do useless work. :-)
Comment 19 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-01-16 08:34:54 UTC
Newer LVM is fine as long as you don't need to support older kernels.
The new LVM will not work correctly with kernels older than a certain release.

Similarly, new kernels require the new LVM.