If you’re facing the kernel panic error “Unable to mount root fs on unknown-block(0 0)” after using Ventoy to install a Linux distribution, don’t worry. This guide will show you how to fix the dreaded “unable to mount root fs” error by identifying and removing problematic boot parameters from GRUB.
The exact error I was getting after installing openSUSE Leap via Ventoy was:
Unable to mount root fs on unknown-block(0 0)
Interestingly, the recovery mode entries in GRUB worked fine. Upon further investigation, I discovered the culprit: the boot parameter rdinit=/vtoy/vtoy
was included in the default boot entry but not in the recovery mode entry. Here’s how I identified and resolved the issue.
This guide will show you how to fix the “unable to mount root fs” kernel panic by identifying and removing problematic boot parameters from GRUB.
Steps to Fix Linux Unable to Mount Root FS Kernel Panic After Ventoy Install
1. Boot into Recovery Mode
Since the default GRUB entry triggered a kernel panic, I selected the recovery mode entry to boot into the system. This allowed me to access a functional shell for diagnosis.
2. Inspect Boot Parameters
To pinpoint the issue, I compared the boot parameters of the default and recovery mode entries. Using the following command, I listed the relevant boot parameters for the default entries:
grep -A2 "linux.*default.*root=" /boot/grub2/grub.cfg | grep -v "recovery"
This command filtered and displayed the GRUB boot parameters associated with the default entry. In the output, I noticed the parameter rdinit=/vtoy/vtoy
, which was absent from the recovery mode entries. This discrepancy indicated the cause of the kernel panic.
3. Edit GRUB Configuration
To resolve the issue, I edited the GRUB configuration to remove the faulty parameter:
- Open the GRUB configuration:
sudo nano /etc/default/grub
- Locate the line containing
GRUB_CMDLINE_LINUX_DEFAULT
. It looked similar to this:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash rdinit=/vtoy/vtoy"
- Remove the
rdinit=/vtoy/vtoy
parameter, leaving the rest of the line unchanged:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
- Save the file and exit the editor.
Step 4: Regenerate GRUB Configuration
After editing the configuration, I regenerated the GRUB configuration file to apply the changes:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Step 5: Reboot the System
Finally, I rebooted the system:
sudo reboot
This time, the default GRUB entry worked perfectly, and the kernel panic was resolved. My laptop then booted into openSUSE successfully.
Remarks
- Ventoy adds the parameter
rdinit=/vtoy/vtoy
during installation, which can interfere with booting certain Linux distributions. - While this guide focuses on openSUSE, similar issues may arise with other Linux distributions installed via Ventoy.
By carefully inspecting and editing the boot configuration, I was able to resolve the kernel panic and successfully boot openSUSE installed from Ventoy. This method should help others facing similar challenges.
Leave a Reply