Symptoms
During Linux boot, the system halts with a message similar to:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)Other variations include VFS: Cannot open root device or No filesystem could mount root. The boot process stops at a kernel panic, and no shell is available unless a recovery environment is used.
Root Causes
- Missing or corrupted initramfs – The initial RAM filesystem lacks required drivers (e.g., for SATA, NVMe, or LVM).
- Incorrect root= parameter in GRUB – The kernel is told to mount a wrong device or UUID.
- Filesystem corruption – The root partition has errors preventing mounting.
- Missing kernel module – The kernel does not have the driver for the storage controller compiled in.
- Changed hardware – Disk controller or disk ID changed after hardware swap.
Step-by-Step Fix
1. Boot into Rescue Mode
Use a live USB/CD of the same Linux distribution. Boot from it and open a terminal.
2. Identify the Root Partition
Run lsblk or fdisk -l to list disks. Identify your root partition (e.g., /dev/sda2 or /dev/nvme0n1p2).
3. Check Filesystem Integrity
Unmount the partition if mounted: umount /dev/sdXY. Then run:
fsck -y /dev/sdXYReplace /dev/sdXY with your root partition. Answer yes to all repairs.
4. Mount the Root Partition
mkdir /mnt/root
mount /dev/sdXY /mnt/root5. Chroot into the System
mount --bind /dev /mnt/root/dev
mount --bind /proc /mnt/root/proc
mount --bind /sys /mnt/root/sys
chroot /mnt/root6. Rebuild Initramfs
For Debian/Ubuntu:
update-initramfs -u -k allFor RHEL/CentOS/Fedora:
dracut -f7. Verify GRUB Configuration
Check /etc/default/grub for correct GRUB_CMDLINE_LINUX. Ensure root=UUID=... matches the UUID of your root partition. Get UUID with blkid /dev/sdXY.
Update GRUB:
update-grub # Debian/Ubuntu
grub2-mkconfig -o /boot/grub2/grub.cfg # RHEL/CentOS8. Reboot
Exit chroot (exit), unmount everything, and reboot:
umount -R /mnt/root
rebootAlternative Fixes
Edit Boot Parameters at GRUB Prompt
During boot, press e on the kernel entry. Find the line starting with linux or linux16. Add rootdelay=10 to give the disk time to initialize, or change root= to root=/dev/sdXY (e.g., root=/dev/sda2). Press Ctrl+X or F10 to boot.
Use Fallback Initramfs
If you have a backup initramfs (e.g., initramfs-5.10.0-8-amd64-fallback.img), boot with that by selecting it in GRUB advanced options.
Prevention
- Always keep a recent live USB for recovery.
- After kernel updates, ensure initramfs rebuilds automatically (enabled by default).
- Use UUIDs in
/etc/fstaband GRUB instead of device names (/dev/sda). - Periodically run
fsckon root partition from a live environment. - Test boot after hardware changes before relying on the system.
This error is often recoverable without reinstallation. Following the steps above will restore normal boot in most cases.