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.

I'm trying to compile and install kernel 3.2.9 for CentOS 5.6. I compiled new kernel and installed kernel modules:

make && make modules_install

I also created new initrd image:

mkinitrd initrd-3.2.9 3.2.9

I copied kernel-3.2.9, initrd-3.2.9 and System.map-3.2.9 to the /boot directory and edited grub.conf file:

title kernel-3.2.9
        root (hd0,0)
        kernel /kernel-3.2.9 ro root=LABEL=/ rhgb quiet
        initrd /initrd-3.2.9

During boot I got a kernel panic with the following error:

could not find filesystem /dev/root

What I did wrong?

share|improve this question
    
It could be that you do not have the right hardware drivers compiled in your new kernel. Did you simply use your old kernel config and added/removed a few things? Or did you use a default config and made a custom kernel from scratch? –  Ben Ashton Mar 16 '12 at 22:28

2 Answers 2

up vote 2 down vote accepted

I found the problem by myself: I added CONFIG_SYSFS_DEPRECATED_V2=y to the .config file as described here https://www.centos.org/modules/newbb/viewtopic.php?topic_id=23627&forum=37&post_id=97305#forumpost97305 and it solves the problem

share|improve this answer

A better way to install the new kernel is to use:

$ make install

This will copy the needed files and edit your grub configuration to be able to boot the new kernel.

Also, you may have made some mistake during kernel configuration make menuconfig. You can look at the existing kernel config files under /boot/config-<kernel-version>. For a simple solution, you can start with a configuration similar to the current one and then make the needed changes if any.

share|improve this answer
    
I suppose even better way is to make kernel's rpm package and install it. –  SaveTheRbtz Mar 17 '12 at 15:35

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.