Lỗi unable to mount root fs on unknown-block 0 0 năm 2024

I have recently done some sort of update on my Linux Mint installation and it didn't go well. All was well until it restarted and I was faced with a black screen with a horizontal white bar on the top left of the screen, as if I was able to type something (but I wasnt). I assumed it was part of the update process and left it overnight. When I woke up it was in the same state so I turned my computer off and then on again and it booted as usual. I tried to open telegram and it kept crashing until it gave an error (not sure if it said something about GPU or GPL or whatever) so I decided to use timeshift to boot an older snapshot. It seemed to fix the telegram issue but it messed with my firefox settings and Firefox said something about an update or older version, I can't quite recall. I then proceeded to use timeshift again in order to try to fix this and loaded a more recent snapshot that according to the date and hour was made during the night time while I left my computer "updating" in that weird black screen state.

This is when I was faced with my current issue: my computer boots to GNU Grub and whatever version of mint I try to load from the advanced options menu gives me the same issue: Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0).

I have seen another post for a similar issue but the fix was confusing and involved a USB or something.

Does someone know how to fix this so that I can access my computer again? (sorry if I added too much information to the post, its my first time using the forum and I just wanted to make sure the person helping me gets as much context as possible)

dan63043 Level 1

Lỗi unable to mount root fs on unknown-block 0 0 năm 2024
Posts: 19 Joined: Fri Oct 06, 2023 6:34 pm

by dan63043 » Sat Oct 07, 2023 11:35 am

On the upside, timeshift seems to have done something, so your data is all sitting somewhere waiting to be found.

Grub is handing the kernel a starting partition that doesn't exist. The (0,0) are the major and minor numbers of the device node, for what that's worth. The trick is to fix Grub.

You say "some sort of update" and I would like to know more. Did you update from a USB stick? In fact, do you have any external media plugged in when you reboot?

One idea I have is to boot from a live image, and then use some tools to find your old installation. Then maybe we can figure out how to update grub.cfg to point the kernel in the right direction.

Although I've fixed these before, I no longer do this professionally, it is just a hobby, now. Yes, I have installed Linus from a floppy drive

Lỗi unable to mount root fs on unknown-block 0 0 năm 2024
I'm hoping that besides getting more information out of you, just bumping your thread will get someone more up-to-date to get involved.

Lỗi unable to mount root fs on unknown-block 0 0 năm 2024

arvy Level 6

Lỗi unable to mount root fs on unknown-block 0 0 năm 2024
Posts: 1286 Joined: Sat Mar 26, 2016 11:22 am

by arvy » Sun Oct 08, 2023 8:34 am

That "Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)" is the same error that I'm getting after updating my system's UEFI BIOS. (See this thread.) In my case, it occurs if I try to boot Mint as previously installed and working on my system's hard drive, or even if I just try to boot the Mint USB stick that was used to create that installation in the first place. So the underlying issue would appear to pre-date any recent changes to Mint's installation and usage of Ubuntu's version of Grub and shim.

Interestingly, Ubuntu itself and its Grub usage installed on my same system has worked and continues to work just fine, both before and after that system's UEFI BIOS update. Whatever may be the root cause, it does appear unique to Mint alone and not confined to just any singular Mint setup. In fact, in my own case, as noted, the problem occurs with its default setup configuration on a Mint USB stick installer setup.

Very puzzling. I sure hope someone is able to get to the root of this issue. I've tried everything I could think of, but not being able to boot even the installer USB stick severely limits my possibilities.

I have an Ubuntu 22.04 on an Hetzner VPS and I have an update of the packages to the latest version. During the update the Ubuntu Kernal updated also to the latest version which was: 5.15.0-71-generic

All went good and I have rebooted the server but it never went up. I have logged in to the console and I have seen that it was getting stuck during boot at the error:

Kernel Panic - Not Syncing: VFS: Unable to Mount Root FS on Unknown-Block(0,0)

Kernel Panic - Not Syncing: VFS: Unable to Mount Root FS on Unknown-Block(0,0) is a common error that can occur in Ubuntu when the system is unable to mount the root file system during boot. This error message indicates that the kernel is unable to find the root file system, which is necessary for the operating system to start up properly.

How to Fix Kernel Panic on Ubuntu

The steps below helped me move past the error and achieve a clean boot in the end. I will detail the steps so that you can follow along and effectively resolve your issue.

Login to Console and Choose Advanced Options For Ubuntu

If you are not on a laptop and you are using a VPS server the provider needs to have a console that will allow you to see what is happening during boot and choose the Advanced Options For Ubuntu in there you will have the latest Kernels to choose from and you need not to choose the latest one like in bellow picture:

Lỗi unable to mount root fs on unknown-block 0 0 năm 2024

This will allow your system to boot.

Check The File System

Login to your VPS and runn the bellow command:

sudo fdisk -l

Output:

sudo fdisk -l
Disk /dev/sda: 76.3 GiB, 81923145728 bytes, 160006144 sectors
Disk model: QEMU HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 6288F8C3-0B08-4091-9A39-F8940D8E5D62

Device      Start       End   Sectors  Size Type
/dev/sda1  528384 160006110 159477727   76G Linux filesystem
/dev/sda14   2048      4095      2048    1M BIOS boot
/dev/sda15   4096    528383    524288  256M EFI System

Partition table entries are not in disk order.

In here you will see the device for Linux filesystem in my case is /dev/sda1

Update the root FS

Next you need to mount and update the FS:

sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt

Update The Temporary File System

Next run the bellow command:

root@cloud:/# update-initramfs -u -k 5.15.0-71-generic
output:
update-initramfs: Generating /boot/initrd.img-5.15.0-71-generic

In my case the problem was on 5.15.0-71-generic Kernal that was installed with the upgrade, you need to use your kernal, which should be in the Ubuntu Advanced options.

The command update-initramfs -u -k 5.15.0-71-generic is used to update the initial RAM file system (initramfs) for the kernel version 5.15.0-71-generic in Ubuntu.

The initramfs is a temporary file system that is loaded into memory during the boot process before the root file system is mounted. It contains the necessary files and drivers to initialize the hardware and load the root file system.

By running this command, you are updating the initramfs for the specified kernel version and ensuring that the necessary files and drivers are available during the boot process. This can be useful if you have recently installed new hardware or made changes to the system that require updated drivers.

The -u option tells the command to update the initramfs, and the -k option specifies the kernel version to update. The 5.15.0-71-generic part of the command specifies the specific kernel version to update.

Update Your GRUB

Next run:

root@cloud:/# update-grub

Output:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-71-generic
Found initrd image: /boot/initrd.img-5.15.0-71-generic
Found linux image: /boot/vmlinuz-5.15.0-56-generic
Found initrd image: /boot/initrd.img-5.15.0-56-generic
Found linux image: /boot/vmlinuz-5.15.0-53-generic
Found initrd image: /boot/initrd.img-5.15.0-53-generic
Found linux image: /boot/vmlinuz-5.15.0-46-generic
Found initrd image: /boot/initrd.img-5.15.0-46-generic
Found linux image: /boot/vmlinuz-5.15.0-41-generic
Found initrd image: /boot/initrd.img-5.15.0-41-generic
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done

The command update-grub is used to update the GRUB bootloader configuration in Ubuntu.

GRUB (Grand Unified Bootloader) is a bootloader that is used to load the Linux kernel and start the boot process for Ubuntu. The GRUB configuration file is located at /boot/grub/grub.cfg and contains information about the available kernels and boot options.

When you run the update-grub command, it scans your system and detects any changes to the available kernels and boot options. It then updates the GRUB configuration file with the new information.