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?
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 problemA better way to install the new kernel is to use:
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.