0

I upgraded kernel on my CentOS 5.8 from 2.6.18 to 3.5.3 and now it is unable to mount the root filesystem:

screenshot

I could not find any explanation through Google. Can you point me in the right direction? I use Grub 0.97.

I tried to point to the root device in the grup.conf by label, by /dev/hda and by UUID and nothing changed.

I compared the init scripts located in old and new initrd images and they are mostly the same - dm-mem-cache.ko, dm-message.ko and dm-raid45.ko modules are not loaded into the new kernel.

The drivers installed with the new kernel are the same as those with the old one.

  • The current CentOS 5.8 kernel is 2.6.18-308.13.1 what are you talking about? Did you try to install a completely different kernel that has no integration with CentOS 5? – Nils Sep 17 '12 at 15:16
  • Yes, I build 3.5.3 linux kernel to be able to use up-to-date SATA drivers which enables much bigger data transfer rate than those shipped with 2.6.18. – bobo Sep 17 '12 at 15:25
  • It's likely that you're missing a module neede by your hardware in the initrd. Also make sure you use a recent version of the module utilities in the new initrd. – Gilles 'SO- stop being evil' Sep 17 '12 at 23:27
  • But you use this as VM in a VirtualBox environment? – Nils Sep 19 '12 at 13:45
  • I just install and configure everything through VirtualBox and then I move the disk with completed OS & apps to a mini PC. This screen shot is from VirtualBox environment after the kernel upgrade. – bobo Sep 20 '12 at 7:22
3

According to this website (which cites this forum thread), you need to enable a kernel option. First, get into the kernel's menuconfig:

# cd /usr/src/linux
# make clean && make mrproper
# cp /boot/config-`uname -r` /usr/src/linux/.config
# make menuconfig

Then go into the "General settings" section, and include "enable deprecated sysfs features to support old userspace tools" in the kernel. Hit escape a few times until it asks you to save, and say yes. Then build the kernel and install it (the actual path might be different on your system):

# make rpm
# rpm -ivh /usr/src/redhat/RPMS/i386/kernel-2.6.35.10local0-1.i386.rpm
  • There were some additional steps for me because of errors in 'make rpm': 'cp include/linux/hidraw.h /usr/include/linux/' 'cp include/linux/hid.h /usr/include/linux/' In 'samples/hidraw/hid-example.c' I had to add '#define BUS_VIRTUAL 0x06' and '#define BUS_ATARI 0x1B #define BUS_SPI 0x1C' And in menuconfig under kernel hacking i had to disable 'sample kernel code' – HomeIsWhereThePcIs Jan 22 at 10:42

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.