kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

  • Post author:
  • Post last modified:May 27, 2023
  • Reading time:2 mins read

A new Linux kernel was built using the commands, make gconfig, make, sudo make install and sudo make modules_install. After building a new Linux kernel and booting from it, the boot process halts with the following message:

kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

A lot many drivers are configured as loadable modules. It is necessary to detect and load these modules. The solution is to make an initial ram disk (initrd) image.

  1. During the kernel configuration, make sure that RAM block device support (CONFIG_BLK_DEV_RAM) and Initial RAM filesystem and RAMDISK support (CONFIG_BLK_DEV_INITRD) options are enabled (set to y).
  2. Delete any old kernel files that might be present.

    cd /boot 
    rm -i *old 
    sudo update-grub 
    

  3. After building and installing the kernel and assuming the kernel version is 2.6.30,
    cd /boot 
    sudo mkinitramfs -o initrd.img-2.6.30 2.6.30 
    sudo update-grub 
    

  4. Reboot.
Share

Karunesh Johri

Software developer, working with C and Linux.