1

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?

1
  • 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, 2012 at 22:28

2 Answers 2

2

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

0

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .