# Genkernel + LVM root only with old sysfs?

## R. Bosch

Hi all,

I was saw a message about CONFIG_SYSFS_DEPRECATED and udev might not work properly at startup. So, I disabled the options CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2 to comply. Build the kernel modules, image and initrd with genkernel:

```

genkernel --firmware --lvm --no-keymap --no-mountboot --install --menuconfig --kernel-config=/etc/kernels/kernel-config-x86-2.6.31-gentoo all
```

Rebooting the system and I get the massage that the lvm2 volume can't be found.

I type "shell" to run lvm, but to my surprise I got version 2.02.28 instaid of 2.02.51.

HD is found but for some reason lvm can't scan?

Then I compile the kernel again with CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2 enabled.

Starts fine with udev complaining again.

Anyone knows what is going on?

My list:genkernel-3.4.10.906gentoo-sources-2.6.31linux-headers-2.6.27-r2udev-145-r1lvm2-2.02.51device-mapper not installed (included in lvm)

Thanks for any help

----------

## qubix

exactly same problem here

udev-146-r1

gentoo-sources 2.6.30-r8

lvm2 2.02.51-r1

genkernel 3.4.10.904

I've found also this:

https://forums.gentoo.org/viewtopic-t-801598-highlight-lvm2.html

I've unpacked the initramfs and the lvm binary inside says it's 2.02.28.

update:

I've checked, that it's the genkernel that is pulling in the old lvm binary. Even the SVN versions pull in the old one.

So if someone would like to use the new udev with LVM root filesystem, he or she absolutely needs to keep the deprecated sysfs options about which the new udev is complaining about. I see no other way.

update2:

looks like the issue is already worked on:

https://bugs.gentoo.org/show_bug.cgi?id=255196

https://bugs.gentoo.org/show_bug.cgi?id=225249

https://bugs.gentoo.org/show_bug.cgi?id=292833

----------

## qubix

ok, found a simple way to solve it:

1. put 

```

=sys-kernel/genkernel-3.4.10.906 ~x86

```

into your /etc/portage/package.keywords

2. emerge -1 genkernel

3. rebuild the initramfs. Genkernel will pull the newer, statically compiled version from the rootfs into the initramfs instead of the copy from libs downloaded on its own.

----------

## richard.scott

If that is the correct fix, then why did that not go stable before the udev upgrade?

C'mon Dev's <sigh>   :Shocked: 

----------

## salahx

That alone isn't enough to fix the problem though. The VG symlinks (the /dev/VolGroup/LogVol ones) aren't being created (or at least not early enough in the process). Therefore, if fstab or grub references those names, it'll fail and the system still won't start.

----------

## qubix

 *salahx wrote:*   

> That alone isn't enough to fix the problem though. The VG symlinks (the /dev/VolGroup/LogVol ones) aren't being created (or at least not early enough in the process). Therefore, if fstab or grub references those names, it'll fail and the system still won't start.

 

oh, you're right actually.... I didn't realise that - I've always used /dev/mapper/<vg name>--<lv name> LVM links in my fstab and grub.conf and those are intact.

----------

