Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a CentOS 5.3 x64 server that by default runs kernel version 2.6.18-164.11.1 and we are attempting to upgrade the box to 2.6.31.12 The drive is LVM +ext3, and the problem I'm having is when I upgrade the kernel and attempt to boot from it, no matter what version of the kernel I use, I get /dev/root not found towards the end of the boot process, and the kernel panics, and than reboots.

I'm installing the kernel exactly as it says in this doc. I've tried it "The centOS way " using make rpm and than installing that. I've updated my mkinitrd. The most interesting part of this problem is that it has been so frustrating that I decided to try and clean install centos on an identical machine without LVM, and the result is EXACTLY the same. After upgrading the kernel, I get /dev/root not found. Does anyone know how to fix this, or what information would be relevant to remedy it? I'm open to try anything at this point.

One more interesting thing about this problem is that in the new version of the kernel, during boot it complains that dm-mapper is started twice, than panics right after that. I've tried this with other kernel versions, and the result is the same. What am I missing here?

If you need any more files, please just ask.

 Linux cg 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 EST 2010 x86_64 x86_64 x86_64 GNU/Linux

  /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

default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.31.12-rt20) //NOT WORKING!!!!
        root (hd0,0)
        kernel /vmlinuz-2.6.31.12-rt20 ro root=/dev/VolGroup00/LogVol00 isolcpus=8,9,10,11,12,13,14,15 panic=10
        initrd /initrd-2.6.31.12-rt20.img
title CentOS (2.6.18-164.11.1.el5) //WORKING!!
        root (hd0,0)
        kernel /vmlinuz-2.6.18-164.11.1.el5 ro root=/dev/VolGroup00/LogVol00 isolcpus=8,9,10,11,12,13,14,15 panic=10
        initrd /initrd-2.6.18-164.11.1.el5.img
share|improve this question
    
What document are you referring to in the statement: "I'm installing the kernel exactly as it says in this doc.". –  mdpc Feb 1 '10 at 6:40
    
Where did you get this new kernel? It does not look like one distributed via CentOS yum. In general, when RH releases (which CentOS uses) a new kernel, the version number might not significantly change but they backport the kernel changes from later kernels. Sometimes this move confuses me. –  mdpc Feb 1 '10 at 6:43
    
the document I am referring to is cromwell-intl.com/unix/linux-kernel.html –  matt Feb 1 '10 at 7:43
    
I need the realtime fully preemptable kernel. This is why I am compiling a custom kernel. –  matt Feb 1 '10 at 7:45
    
No updates to this question in 3 weeks. Did you get an answer Matt? I am stuck on this same point too. –  Richard Holloway Mar 3 '10 at 10:55
show 2 more comments

6 Answers

up vote 3 down vote accepted
+100

I am going to add my previous comment as an answer here as this has gone to bounty. Apologies for the blatant attempt to score reputation points.

I had this exact same problem and resolved it by changing the setting of

CONFIG_SYSFS_DEPRECATED_V2=Y

in the .config file. as mentioned in this question by godpapa.

Just search for CONFIG_SYSFS_DEPRECATED_V2 and change it to Y and rebuild the RPMs. Then install the RPM.

I can confirm this does fix the problem on CentOS 5.4 when building a 2.6.33 kernel using the "The CentOS way". I would be surprised if it didn't work for 2.6.31.12 on CentOS 5.3 too.

share|improve this answer
    
Thank you all very much. –  matt Mar 18 '10 at 19:21
add comment

Try to enable CONFIG_SYSFS_DEPRECATED_V2=y

share|improve this answer
    
I have rebuilt my kernel and changed the setting of CONFIG_SYSFS_DEPRECATED_V2=y as mentioned here in the .config file. I can confirm this does fix the problem on CentOS 5.4 when building a 2.6.33 kernel using the "The CentOS way". I assume it will work for 2.6.31.12 on CentOS 5.3 too. –  Richard Holloway Mar 3 '10 at 21:52
add comment

as i understand your post, you are building your own kernel from source. do you have any special reason to not stay with the centos provided kernels?

my guess for your error is, you have a different kernel configuration and are missing a module or more, e.g. lvm. when you really need to build the kernel by yourself, use the kernel config of an existing centos kernel. you'll find the old config in your /boot directory or just use make oldconfig. but be aware that this can be dangerous when you jump up multiple kernel versions.

when you only want to add a new driver to your kernel, just compile the driver against your installed centos kernel and add it to the modules.

share|improve this answer
    
I am using my existing kernel config by doing cp /boot/config-uname -r` ./.config` then using menuconfig to enable the RT kernel. –  matt Feb 1 '10 at 7:46
add comment

Your volume seem to have no label.

Label it using the e2label command. Find out your root is on which hda or sda, let say sda2

Edit grub config, find and edit this part

root=LABELNAME=/2

Where 2 is the hda/sda number See if it finds it by going with label.

Otherwise, I would look at the loaded modules first and check if your storage controller module is loaded.(SCSI, SATA, AHCI) To do so :

less /proc/modules

or

lsmod

You may have to rebuild the kernel with it if it is not loaded.

Good luck.

share|improve this answer
add comment

If you are still having issues using a vanilla kernel within CentOS, after generating your config (localmodconfig, oldconfig, etc), modify the .config file and ensure these options are set to Y for:

CONFIG_EXT3_FS=y

CONFIG_SYSFS_DEPRECATED_V2=y

This did the trick for me on 2 systems, 1 physical system going from CentOS 4.x and a VM under virtualbox with a fresh CentOS 5.4 install, both worked without any issues.

After the change run:

make

make modules_install

make install

if no errors - reboot.

share|improve this answer
    
The CONFIG_SYSFS_DEPRECATED_V2=y option was the key. Thank you. –  matt Mar 27 '10 at 21:23
add comment

Thanks a lot it solved my problem also, thanks a lot, i was installing CentoS kernel 2.6.36 on Virtual Box and it was giving me the same error, but now every thing is solved.

Inorder to solve "IOAPIC for GSI" i used pnpacpi=off in /boot/grub/menu.lst and now every thing is running smoothly.

Thanks again.

Best Regards Salman Francis

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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