1

I need to upgrade my kernel on a RHEL 5 system to build with some experimental drivers. I have configured the kernel with module loading for LVM (dm_* modules). Once the initrd runs the /init script, the LVM mounting procedure is failing.

The drives are configured with LVM (including the root device) so during init, it mounts them and performs switchroot.

What can I do to understand why lvmscan is failing?

migrated from stackoverflow.com Jul 14 '14 at 19:26

This question came from our site for professional and enthusiast programmers.

  • Did you build by calling make manually or did you use RHEL's build automation? Did you copy the configuration from the distribution's kernel? Did you rebuild the initrd? – Gilles Jul 15 '14 at 21:47
  • Latest kernel release candidate. Using make. Copied kernel config from distribution, rebuilt initrd. – user3275885 Jul 16 '14 at 13:24
1

So I figured out what the problem was: Red Hat's mkbldevs in the init script of the initrd.img was failing to make the block devices. Without any block devices LVM was not able to mount drives. I installed BusyBox and made a custom initrd and while in the shell I noticed that mkblkdevs called by the /bin/nash script didn't make /dev/sd*. I suppose you could manually use mknod to create the block devices but a search found that a kernel parameter was needed.

This is the kernel parameter:

CONFIG_SYSFS_DEPRECATED_V2=y

You can set it in .config manually or browse to in under "General setup" in make menuconfig.

I can now boot a variety of kernels that I built.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.