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?

  • 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

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


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.

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

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.