Methods of payment Abuse

Troubleshooting vfs unable to mount root fs on unknown block

10.10.2023, 23:34

The vfs unable to mount root fs on unknown block error occurs when the Linux kernel cannot find a root file system to mount when the system boots.

Causes of the error

The error can occur for several reasons:

  1. Lack of file system driver: if the file system specified in the kernel boot parameters is not supported or the appropriate driver is missing, the kernel will not be able to mount the root file system.
  2. Incorrect kernel boot parameters: if the kernel boot parameters are incorrectly specified or missing, the kernel will not be able to find the root file system.
  3. Block device problems: if the block device containing the root file system is unavailable or corrupted, the kernel will not be able to mount it.
  4. Boot loader problems: when a boot loader (such as GRUB) is not properly configured or installed, the kernel may not be able to access the root file system.

Solving the problem by booting from an old kernel

If you encounter the error, the first thing you should do is try to boot using an older kernel. Select Advanced Options, then point to one of the older kernels. If the system will boot in this case, it means that only the new kernel is not working. If you built it yourself, you may not have included all the file systems necessary for it to work.

If it is a kernel from repositories and the system boots with an older kernel, there is a chance that you have corrupted initramfs for the new kernel. This could also have happened due to a lack of memory during the system upgrade. To fix this, all you need to do is free up space in the /boot/ directory and create a new initramfs. Check and free up space in the /boot folder if there is not enough space there:

$ df -h | grep boot


To create initramfs, first find out the current kernel version:

$ uname -r

Paste the obtained version into a command like this:

$ sudo update-initramfs -u -k version

Get

$ sudo update-initramfs -u -k 4.15.0-36-generic

At the end of the operation update the Grub configuration:

$ sudo update-grub

If the problem is in free space and initramfs, but you can't boot with an older kernel, try another LiveCD distribution and try to fix everything in the chroot environment.