Support

How to clean boot space for Ubuntu Linux

  • Document NO.

    2023103106

  • Category

    SoftwareApplication
  • Rev.

    A1

  • Update Date

    2023-11-08

Model Name

Test_Product

Purpose

Sometimes users encounter the following error message on Linux. This is very likely because the
/boot space is full. If so, please follow the methods below to clean the space of /boot, and the operating system will be normal.

Error Message:
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Environment:

Model: SID-10W9
O.S: Ubuntu 16.04


  • Error message: Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

The possible root cause:

The problem was that /boot has no enough space (100% capacity). Therefore, the last two kernel updates didn't complete successfully, and Grub2 picked the latest kernel after reboot and then it failed.

How to solve it:

1. Restart the system and it will boot into the Ubuntu boot menu and please select the option of Advanced options for Ubuntu.

2. Once inside you will see a list of many different versions of the kernel, probably as shown below. Please select the oldest version and please don't select with recovery mode.

3. Then check the capacity status with the following command:

$ df -h

  • 100% means that the capacity of /boot is full

4. Please check the current kernel version by the command below.

$ uname -a

5. Enter to /boot folder and manually delete dependent files older than the current working version until the capacity of /boot is not 100%.

  • For example: until 35% remaining

6. The try to fix some damage kernel files by following command. (Please connected to Internet)
$ sudo apt-get -f install

7. List the current all kernel version.
$ dpkg --list | grep linux-image

8. Remove lower version kernel.
$ sudo apt-get purge linux-image-xxxx-generic
Or
$ sudo apt-get purge linux-image-extra-xxx-xx-generic

9. After removed, please update Grub2.
$ sudo update-grub2

10. Then reboot.
$ sudo reboot