Kernel upgrade 2.6 to 3.5.3 on CentOS 5.8 -> switchroot: mount failed: No such file or directory

5,719

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
Share:
5,719

Related videos on Youtube

bobo
Author by

bobo

Updated on September 18, 2022

Comments

  • bobo
    bobo over 1 year

    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.

    • Nils
      Nils over 11 years
      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?
    • bobo
      bobo over 11 years
      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.
    • Gilles 'SO- stop being evil'
      Gilles 'SO- stop being evil' over 11 years
      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.
    • Nils
      Nils over 11 years
      But you use this as VM in a VirtualBox environment?
    • bobo
      bobo over 11 years
      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.
  • HomeIsWhereThePcIs
    HomeIsWhereThePcIs over 4 years
    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'