Linux Error: Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block — Cause, Fix, and Troubleshooting Guide
How to fix the Linux 'Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block' error: repair a missing initramfs, wrong root=, or missing storage driver.
- #linux
- #troubleshooting
- #boot
- #kernel
Summary
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) means the kernel finished loading but could not mount the root filesystem, so it has nothing to hand control to and halts. The unknown-block(0,0) is the giveaway: the kernel found no usable root device at all. The three classic causes are a missing or broken initramfs, a wrong root= argument, and a storage driver that is not built into the kernel or the initramfs. This is a hard stop — no shell — so you recover from a previous kernel entry, a live USB, or the rescue image.
Common Symptoms
- Boot ends in a full-screen kernel panic with a stack trace; the machine hangs (no shell).
- The last lines before the panic mention
VFS: Cannot open root deviceorunknown-block(0,0). - It started right after a kernel update, an initramfs rebuild, a migration between hypervisors, or a disk/controller change.
On the console:
VFS: Cannot open root device "UUID=..." or unknown-block(0,0): error -6
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)
Note whether the panic lists available partitions (kernel sees disks → likely wrong root=) or lists none (kernel sees no disks → missing driver).
Most Likely Causes of the ‘VFS: Unable to mount root fs on unknown-block’ Error
Common production causes first:
- Missing or corrupt initramfs — an interrupted
update-initramfs/dracut, a full/boot, or a kernel installed without its matchinginitrd. The kernel has no early userspace to assemble LVM/RAID and mount root. - Missing storage driver — the disk controller module (virtio_blk/virtio_scsi, NVMe, RAID/HBA, iSCSI/multipath) is neither built-in nor in the initramfs, common after moving an image between platforms.
- Wrong
root=—root=UUID=/root=/dev/...points at a device that changed after a clone, resize, or disk reorder. - Missing root filesystem module — the kernel/initramfs lacks the driver for the root FS type (e.g., XFS or Btrfs root without the module).
/bootmismatch — GRUB loaded a kernel and a stale/absent initramfs pair after a partial upgrade.
Quick Triage
# You cannot get a shell from the panic itself. Recover another way:
# 1) At the GRUB menu, pick "Advanced options" and boot a PREVIOUS kernel.
# If it boots, the current kernel's initramfs or config is the problem.
# 2) Read what the panic told you:
# - Did it list available partitions? -> disks seen, fix root=
# - No partitions listed? -> missing storage driver
# 3) From a live USB, inspect the installed system:
sudo blkid
lsblk -f
ls -l /mnt/boot # does an initrd.img/initramfs exist for each vmlinuz?
Diagnostic Commands
# What root device did this kernel try to use?
cat /proc/cmdline # (from a working kernel) shows root=UUID=...
# Do disks and root FS match what the bootloader expects?
sudo blkid
lsblk -f
cat /etc/fstab
# Is there a matching initramfs for every installed kernel?
ls -l /boot/vmlinuz-* /boot/initrd.img-* # Debian/Ubuntu
ls -l /boot/vmlinuz-* /boot/initramfs-*.img # RHEL/Rocky
# Is /boot full (a silent cause of a missing initramfs)?
df -h /boot
# What drivers are inside the initramfs?
lsinitramfs /boot/initrd.img-$(uname -r) | grep -Ei 'virtio|nvme|xfs|megaraid' # Debian/Ubuntu
lsinitrd /boot/initramfs-$(uname -r).img | grep -Ei 'virtio|nvme|xfs' # RHEL/Rocky
If the panic listed available partitions, focus on root= and the root FS module. If it listed none, focus on the storage controller driver.
Fix / Remediation
Boot a working (previous) kernel or chroot from a live USB first, then apply the matching fix.
Set up a chroot (if no kernel boots)
sudo mount /dev/sda2 /mnt # root
sudo mount /dev/sda1 /mnt/boot # separate /boot, if any
sudo mount /dev/sda1 /mnt/boot/efi # EFI, if UEFI
for d in dev proc sys; do sudo mount --bind /$d /mnt/$d; done
sudo chroot /mnt
Fix 1 — rebuild a missing/corrupt initramfs
Warning: Regenerating the initramfs is safe, but only if you target the correct installed system. Inside a chroot, confirm you mounted the right disk with
lsblkfirst — rebuilding against the wrong root produces an initramfs that still will not boot.
# First make room if /boot is full
df -h /boot
# Debian / Ubuntu
sudo update-initramfs -u -k all
sudo update-grub
# RHEL / Rocky
sudo dracut -f --regenerate-all
sudo grub2-mkconfig -o /boot/grub2/grub.cfg # or /boot/efi/EFI/rocky/grub.cfg on UEFI
Fix 2 — add the missing storage/root-FS driver
# Debian/Ubuntu: add modules then rebuild
echo -e "virtio_blk\nvirtio_scsi\nnvme" | sudo tee -a /etc/initramfs-tools/modules
sudo update-initramfs -u -k all
# RHEL/Rocky: force-add drivers into the initramfs
sudo dracut -f --add-drivers "virtio_blk virtio_scsi nvme xfs" /boot/initramfs-$(uname -r).img $(uname -r)
Fix 3 — correct the root= argument
# Confirm the real root UUID
sudo blkid /dev/sda2
# Edit GRUB_CMDLINE / the menu entry to the correct root=UUID=..., then regenerate:
sudo update-grub # Debian/Ubuntu
sudo grub2-mkconfig -o /boot/grub2/grub.cfg # RHEL/Rocky
For a one-off boot, edit the kernel line at the GRUB menu (press e), fix root=UUID=..., and press Ctrl-X to boot — then make it permanent above.
Fix 4 — reinstall the kernel if /boot is inconsistent
# Debian/Ubuntu
sudo apt install --reinstall linux-image-$(uname -r)
# RHEL/Rocky
sudo dnf reinstall kernel-core
Validation
cat /proc/cmdline # root= matches blkid
ls -l /boot/initrd.img-$(uname -r) 2>/dev/null || ls -l /boot/initramfs-$(uname -r).img
lsinitramfs /boot/initrd.img-$(uname -r) | grep -Ei 'virtio|nvme|xfs'
findmnt /
Reboot into the target kernel (not just the fallback) and confirm it reaches login with no panic.
Prevention
- After every kernel install or disk/controller change, confirm a matching initramfs exists and test-boot the new kernel before removing the old one.
- Keep at least one known-good previous kernel installed as a fallback.
- Monitor
/bootfree space soupdate-initramfs/dracutnever fails silently on a full partition. - Reference root by UUID and keep
GRUB_CMDLINEconsistent; rebuild GRUB after changes. - Bake platform storage drivers (virtio, NVMe, RAID/HBA) into images that migrate between hypervisors.
- Enable a serial/remote console to read the panic text, and keep snapshots/backups so a bad kernel is a quick rollback.
Related Errors
- ALERT! UUID=… does not exist. Dropping to a shell!
- grub rescue> … no such device
- mount: wrong fs type, bad option, bad superblock
- UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY
- Dependency failed for mountpoint
Final Notes
unknown-block(0,0) means “no root device at all,” so the diagnosis splits cleanly: if the panic lists partitions, fix root= or the root FS module; if it lists none, add the storage driver. In every case the durable fix is a correct, tested initramfs paired with the kernel — rebuild it, boot the actual target kernel, and keep a fallback kernel so the next bad upgrade is a one-line rollback.
Want faster Linux incident response? Use DevOps AI Toolkit to turn production errors into clear diagnostics, remediation steps, and reusable runbooks.
Download the Free 500-Prompt DevOps AI Toolkit
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.