"Kernel panic - not syncing: VFS: Unable to mount root fs": boot the old kernel, rebuild the initramfs
Fix "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)": boot an older kernel, rebuild the initramfs, and check /boot space and disk drivers.
by OhSudo ··
Checked on real software: Linux kernel, QEMU · November 2026How we check
VFS: Cannot open root device "UUID=3f1c..." or unknown-block(0,0): error -6Please 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)The kernel started, and couldn’t find the disk to continue from. Normally a small file loaded next to the kernel, the initramfs, brings the drivers needed to reach that disk. unknown-block(0,0) almost always means the initramfs is missing, or is broken, so the kernel never saw the disk at all.
It typically appears right after a kernel update that didn’t finish: /boot was full, or the upgrade was interrupted. The previous kernel still works, and that’s the way back in.
- The kernelstarts(works)loads
- initramfsmissing or broken (an unfinished update)(breaks here)no drivers for the disk(fails)
- Root filesystemroot= never mounted
TL;DR
- Restart, and in the GRUB menu choose Advanced options, then the previous kernel.
- Once logged in, rebuild the initramfs for the broken kernel and update GRUB:
# Ubuntu, Debiansudo update-initramfs -c -k 6.8.0-51-genericsudo update-grub
# RHEL, Rocky, AlmaLinuxsudo dracut -f --kver 5.14.0-503.14.1.el9_5.x86_64Use the version of the kernel that panicked, which ls /boot shows.
1. Get to the GRUB menu
If the menu doesn’t appear, hold Shift while the machine starts, on BIOS systems, or press Esc repeatedly, on UEFI. On a virtual machine, open its console early. Choose the entry for an older kernel. Most distributions keep two or three.
2. Find what’s missing
Once you’re in, compare the kernels with their initramfs files:
ls -l /boot-rw------- 1 root root 14M Nov 10 09:12 vmlinuz-6.8.0-51-generic-rw-r--r-- 1 root root 68M Oct 2 10:40 initrd.img-6.8.0-49-generic-rw------- 1 root root 14M Oct 2 10:40 vmlinuz-6.8.0-49-genericHere the new kernel, 6.8.0-51, has no initrd.img beside it. On RHEL, the files are called initramfs-<version>.img. A file that exists and is much smaller than the others is suspect too.
Then find why it wasn’t built:
df -h /bootA full /boot is the classic cause. The file couldn’t be written, and the update went on anyway. Remove old kernels you don’t use, never the one you’re running (uname -r):
sudo apt autoremove --purgesudo dnf remove --oldinstallonlyIf apt itself complains that an install was interrupted, finish that first: see dpkg was interrupted. For space in general, see No space left on device.
3. Rebuild it
# Ubuntu, Debian: create the file for one kernelsudo update-initramfs -c -k 6.8.0-51-genericsudo update-grub
# RHEL, Rocky, AlmaLinuxsudo dracut -f --kver 5.14.0-503.14.1.el9_5.x86_64update-initramfs -u -k all rebuilds the files for every installed kernel. On RHEL, sudo dracut --regenerate-all -f does the same, and sudo grubby --info=ALL lists the boot entries.
Restart, and choose the new kernel. If it boots, it’ll be the default again.
4. A different number: the disk is seen, and can’t be used
When the numbers aren’t (0,0), as in unknown-block(8,1), the kernel did find a disk, 8 being SCSI and SATA disks, and couldn’t mount it. The usual reasons:
- The
root=setting points at the wrong partition. This happens after cloning a disk, or editing/etc/default/grub. Compare the kernel’s command line, withcat /proc/cmdlinefrom the working kernel, andblkid. - The file system’s driver is missing from the initramfs, which a rebuild fixes.
- The file system is damaged. Check it from a live USB with
fsck, orxfs_repairfor XFS, on the unmounted partition.
5. Virtual machines that were moved
A VM converted from another platform, or whose disk controller was changed, for example from IDE to virtio or SCSI, may boot a kernel whose initramfs lacks that controller’s driver. Switch the controller back, boot, and rebuild the initramfs with all drivers:
# RHELsudo dracut -f --no-hostonly --kver "$(uname -r)"On Debian and Ubuntu, set MODULES=most in /etc/initramfs-tools/initramfs.conf, which is the default, then rebuild.
6. No working kernel left
Boot from a live USB of the same distribution, mount the system, and rebuild from inside it:
sudo mount /dev/sda2 /mntsudo mount /dev/sda1 /mnt/boot # if /boot is separatefor d in dev proc sys run; do sudo mount --bind /$d /mnt/$d; donesudo chroot /mntupdate-initramfs -c -k 6.8.0-51-genericupdate-grubexitlsblk -f shows which partition is which. On a UEFI system, also mount the EFI partition at /mnt/boot/efi.
7. A related message: the initramfs shell
If you land at a prompt like this, the initramfs is fine, and it couldn’t find the root partition:
ALERT! UUID=3f1c... does not exist. Dropping to a shell!(initramfs)Type blkid there to see the real UUIDs, and compare with root= in GRUB and with /etc/fstab.
Warning
Don’t delete the kernel you booted from to make room in /boot, and keep at least one older kernel installed: it’s your way back the next time an update goes wrong. On servers, check /boot space in your monitoring, as this is entirely preventable.
Shell, we have a problem!
Similar, but different: grub rescue> means GRUB itself can’t find its files, before any kernel loads: see grub rescue: unknown filesystem. Read-only file system after boot means the root was mounted and then switched to read-only. wrong fs type, bad option, bad superblock is the same kind of problem for other disks, after boot. A system that freezes with soft lockup messages is a different problem.
Found this useful? Share it.
Found a mistake? Let us know at contact@ohsudo.com.