Page 1 of 1

Upgrading 5.7 to 3.x.x kernel will not boot with root on lvm

Posted: 2012/02/02 10:48:43
by petermartintps
I am trying to update our standard build running Centos 5.4 to use a new 3.x.x series kernel. I need this kernel in order to support some new hardware PCIe devices. I have updated the system to use 5.7, but still get the following problem.

root is mounted on an LVM (output from getinfo.sh disk at the end of this post).

When I boot using any of the older kernels (vmlinuz-2.6.18-164.el5PAE Centos 5.4, vmlinuz-2.6.18-274.17.1.el5PAE Centos 5.7 or vmlinuz-2.6.28.tps.smp.9 which is my standard production kernel) th dm subsystem finds /dev/VolGroup00/LogVol01 and can boot the system fine.

When running a 3.x.x kernel (3.0.0-rc7, 3.1.2 and 3.3.3-stable) all fail to find any logical volumes and hence fail to find the root partition and then it fails with the standard panic message.

I have attached a (poor) screen shot of the kernel messages when trying to boot the 3.2.2 kernel, the key I think is the 'No Volume Groups Found'. Normally this reports /dev/VolGroup00/LogVol01' has been found.

I note that other posts on the web have reported this problem, but they seem to end up rebuilding their system without root on an LVM. With several hundred deployed systems this is not an option.

The 3.x.x kernels all have the correct dm- modules which are loaded correctly during the boot process.

I have also tried rebuilding mdadm tools form source.

Any suggestions of what to try next?

Information for disk problems.
[code]
== BEGIN uname -rmi ==
2.6.28.tps.smp.9 i686 i386
== END uname -rmi ==

== BEGIN rpm -qa \*-release\* ==
centos-release-notes-5.7-0
centos-release-5-7.el5.centos
== END rpm -qa \*-release\* ==

== BEGIN cat /etc/redhat-release ==
CentOS release 5.7 (Final)
== END cat /etc/redhat-release ==

== BEGIN getenforce ==
Disabled
== END getenforce ==

== BEGIN free -m ==
total used free shared buffers cached
Mem: 24364 670 23694 0 31 406
-/+ buffers/cache: 231 24132
Swap: 1023 0 1023
== END free -m ==

== BEGIN cat /etc/fstab ==
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
== END cat /etc/fstab ==

== BEGIN df -h ==
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
270G 36G 221G 14% /
/dev/cciss/c0d0p1 99M 41M 53M 44% /boot
tmpfs 12G 0 12G 0% /dev/shm
== END df -h ==

== BEGIN fdisk -l ==

Disk /dev/cciss/c0d0: 299.9 GB, 299966445568 bytes
255 heads, 63 sectors/track, 36468 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 13 104391 83 Linux
/dev/cciss/c0d0p2 14 36468 292824787+ 8e Linux LVM

Disk /dev/cciss/c0d1: 1200.1 GB, 1200186941440 bytes
255 heads, 63 sectors/track, 145914 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/cciss/c0d1p1 * 1 145914 1172054173+ 83 Linux
== END fdisk -l ==

Re: Upgrading 5.7 to 3.x.x kernel will not boot with root on lvm

Posted: 2012/02/02 12:21:23
by TrevorH
The move to a kernel numbering scheme 3.x.x has many knock on effects, not least that many of the user-space tools were broken and checked for "2.6" to differentiate between 2.4 and 2.6. In addition, in other places the code made assumptions based on x.x.x.x type version numbers and got confused with x.x.x.

You might be better of renaming your kernel. I can tell you that 3.2.1 works on CentOS 5.7 when it's renamed

[code]
$ uname -a
Linux here 2.6.42.1 #9 SMP Tue Jan 24 10:18:05 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux
[/code]

Upgrading 5.7 to 3.x.x kernel will not boot with root on lvm

Posted: 2012/02/02 18:46:43
by pschaff
Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

Glad to hear you have left the obsolete and unsupported 5.4 behind, but for newer hardware support have you considered CentOS-6? If the native EL6 kernel does not support your hardware, there is also ELRepo [url=http://elrepo.org/tiki/kernel-ml]kernel-ml[/url] 3.2.2-0.el6.elrepo available; whereas for EL5 there is only 2.6.39-4.1.el5.elrepo. [url=http://wiki.centos.org/AlanBartlett]Alan[/url] would have to comment on the reasons for the lack of a series 3 EL5 kernel.

Re: Upgrading 5.7 to 3.x.x kernel will not boot with root on lvm

Posted: 2012/02/02 18:55:52
by TrevorH
I suspect the above mentioned design problems in the 5.x userspace tools - modprobe is one and looks like LVM is another.

Re: Upgrading 5.7 to 3.x.x kernel will not boot with root on lvm

Posted: 2012/02/08 05:56:52
by AlanBartlett
[quote]
pschaff wrote:
[url=http://wiki.centos.org/AlanBartlett]Alan[/url] would have to comment on the reasons for the lack of a series 3 EL5 kernel.[/quote]
Hmm, who's that making a racket?

There are three factors to consider when attempting to drop a new kernel source tarball into an Enterprise Linux environment:

(1) Are you able to correctly package the required end product?
(2) Will the userland utilities respect the new product?
(3) How "far away" from the official EL package is your new product?

The phrase "a kernel too far" was used by [url=http://wiki.centos.org/NedSlider]NedSlider[/url] in respect of (3) and was quoted by [url=http://wiki.centos.org/AkemiYagi]toracat[/url] in a [url=http://blog.toracat.org/2011/03/a-kernel-too-far/]blog posting[/url] so named.

As Enterprise Linux 6 is now available, the general advice is that those persons who require features not supported by the EL 5 kernel (with, possibly, the addition of supplementary [i]kmod[/i] package(s)) should upgrade to the EL 6 product.

The [url=http://elrepo.org/tiki/kernel-ml]kernel-ml[/url] packages available from the [url=http://elrepo.org]ELRepo Project[/url] should really be considered as "super kmod" packages and used for testing purposes only to identify features that could be backported to the distributed kernel package. The [b]kernel-ml[/b] packages were never conceived to be "drop-in" replacements for use with deployed systems. That said, I do use the earliest EL 5 kernel-ml series package with a vintage (in excess of 12 years of age) hardware system which is my desktop workstation (a [i]Dell OptiPlex GX1[/i] with a solitary [i]Pentium III[/i] processor, clocked at 450 MHz and with 768MB of RAM.)

It is perfectly possible to package a linux-3.x series tarball as a kernel-3.x.y series kernel package, without any renaming. The value that can be obtained by doing so appears to be minimal, to me. However, if asked, I would be willing (when time and the build system permits) to prepare an "unofficial" kernel-ml-3.x.y.el5.elrepo package set for selected persons to use as a "plaything". :-)