Kernel update and forced shutdown in Linux Mint 20 (with encryption) caused an error which prevented the computer to start. The error is:
- VFS Cannot open root device "mapper"
- Kernel panic - not syncing: VFS Unable to mount root
VFS Cannot open root device "mapper" or unknown-block(0,0): error
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS Unable to mount root fs on unknown-block(0,0)
After starting the computer was showing a blank screen for several minutes. I had to do a cold shutdown from the power button - by keeping it pressed for 12+ seconds. I didn't have access to the terminal and the keyboard was not working.
You can check also this article which cover similar error: Linux Mint - Cannot Login (login loop)
Step 1: Start Linux Mint in advanced mode
By default after failed start Linux Mint will open menu with list of Kernels and GNU GRUB Advanced options. If this is not the case for you then do:
- Reboot
- Hold Shift - during boot
- Select: Advanced Options For Linux Mint 20 Cinnamon
- Select the latest working Kernel with Recovery mode - as the picture below:
In my case the latest kernels were not working. I had to test several before to find the best one.
Note: The Linux Mint installation was encrypted so it required the encryption password for unlock of the volume.
Step 2: Repair broken packages in Linux Mint
Once the Advanced Options are loaded you will see a window like the one below. At this step we are interested in repair of broken packages in Linux Mint 20. So you need to select - dpkg.
The available options are:
- resume - Resume normal boot
- clean - Try to make free space
- dpkg - Repair broken packages
- fsck - Check all file systems
- grup - Update grup bootloader
- network - Enable networking
- root - Drop to root shell prompt
- system-summary - System summary
Step 3: Check all file systems in Linux Mint
After fixing the broken packages in previous steps it's a good idea to check file systems for problems. This time we can select - fsck - Check all file systems.
After this step I was able to boot normally into Linux Mint by selecting - resume - Resume normal boot.
Step 4: Identify the reason of the problem
If you like to find what is the cause of the error you can check information for the latest shutdowns and kernels by commands like:
Several kernels were installed on this system - 5.4.0-45
up to 5.4.0-52
when the error appeared.
It's important to mention that several force shutdowns were performed which might be the root of the error. In order to check last shutdowns you can use commands like - last shutdown -x | more
which will show dates and kernels:
last shutdown -x | more
output:
shutdown system down 4.15.0-118-gener Sat Nov 14 10:44 - 09:52 (23:07)
shutdown system down 4.15.0-118-gener Thu Nov 12 10:36 - 10:30 (1+23:54)
shutdown system down 4.15.0-118-gener Wed Nov 11 17:47 - 09:09 (15:22)
shutdown system down 4.15.0-118-gener Wed Nov 11 09:47 - 17:20 (07:32)
shutdown system down 4.15.0-118-gener Tue Nov 10 17:13 - 09:29 (16:16)
or journalctl | grep shutdown
- which is showing the logs of each shutdown:
journalctl | grep shutdown
result:
Nov 14 10:44:38 xnav-VirtualBox cinnamon-session[1180]: WARNING: t+849.03981s: Requesting system shutdown...
Nov 14 10:44:38 xnav-VirtualBox cinnamon-session[1180]: WARNING: t+849.04014s: Attempting to shutdown using systemd...
Nov 14 10:44:38 xnav-VirtualBox systemd[1]: Stopping Create final runtime dir for shutdown pivot root...
Nov 14 10:44:38 xnav-VirtualBox systemd[1]: Stopped Create final runtime dir for shutdown pivot root.
Nov 14 10:44:39 xnav-VirtualBox systemd-shutdown[1]: Syncing filesystems and block devices.
Nov 14 10:44:39 xnav-VirtualBox systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Nov 15 09:51:18 xnav-VirtualBox systemd[1]: Starting Create final runtime dir for shutdown pivot root...
Nov 15 09:51:18 xnav-VirtualBox systemd[1]: Started Create final runtime dir for shutdown pivot root.
Nov 15 09:52:07 xnav-VirtualBox systemd[1]: Starting Create final runtime dir for shutdown pivot root...
Nov 15 09:52:07 xnav-VirtualBox systemd[1]: Started Create final runtime dir for shutdown pivot root.