REBOOTED AFTER A ROUTINE UPDATE. GOT 'VFS: UNABLE TO MOUNT ROOT FS'??? 🤔

bootkernellinux13 replies · 399 views · started
  1. ok weird one home lab drama. fedora on my cloud instance got a kernel update and now it panics during boot:

    2.481214 VFS: Cannot open root device "sda2" or unknown-block(0,0): error -6

    [    2.481214] VFS: Cannot open root device "sda2" or unknown-block(0,0): error -6
    [    2.481362] Please append a correct "root=" boot option; here are the available partitions:
    [    2.481513] 0b00         1048575 sr0
    [    2.481601]  driver: sr
    [    2.481702] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [    2.481843] CPU: 3 PID: 1 Comm: swapper/0 Not tainted
    [    2.481957] Call Trace:
    [    2.482010]  <TASK>
    [    2.482078]  dump_stack_lvl+0x48/0x70
    [    2.482155]  panic+0x118/0x300
    [    2.482231]  mount_block_root+0x1d3/0x1e0
    [    2.482309]  prepare_namespace+0x136/0x165
    [    2.482398] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs ]---
    

    it was running for months without a hiccup.. ;) is this hardware failing at teh worst possible time, or the update?

    i havent touched teh hardware in months. No new disks, no new RAM, nothing. Its just the update and a reboot. Id like to fix this properly instead of reinstalling, because theres quite a bit of cofnig on this box. pls help 🙏

    11
  2. Check /boot space: df -h /boot. if it's full, remove old kernels (sudo apt autoremove --purge or sudo dnf remove --oldinstallonly), then reinstall the new kernel package so its initramfs is generated properly, and run update-grub or grub2-mkconfig -o /boot/grub2/grub.cfg. worked for me anyway 🤷

    3 2 helpful
  3. WOWWW ok update: did what @ivan.petrov44 said and its fine now cant believe it was that simple lol

    4 5 helpful
  4. hmmm after youre up on the old kernel, read the failed boots log if it got that far: journalctl -b -1 -k (requires persistent journal). Also set teh known-good kernel as default temporarily with grub-set-default or grubby --set-default until the new one is fixed. fingers crossed 🤞

    2 0 helpful
  5. hmmm to rule out hardware, check whether the old kernel is stable over time and run smartctl -a on the disks. A failing disk tends to show i/O errors in dmesg well before a panic.

    2 0 helpful
  6. If the panic mentions a module or driver, third-party modules (DKMS, out-of-tree storage or GPU drivers) may not have been rebuilt for the new kernel. dkms status shows what's built for which kernel.

    4 0 helpful
  7. VFS: Unable to mount root fs on unknown-block almost always means the initramfs for the new kernel is missing or incomplete (often because /boot was full during teh update). From the old kernel, rebuild it: sudo update-initramfs -u -k all on Debian/Ubuntu or sudo dracut -f --regenerate-all on RHEL/Fedora.

    this video fixed it for me:

    ▶ How to Fix Kernel Panic Unable to Mount Root FS

    9 0 helpful
  8. hmmmm quick q which version are you on? ??

    thinking

    2 1 helpful
  9. alternatively use snapshots before patching (LVM, Btrfs, or the hypervisor) sooo the rollback is one click intsead of GRUB surgery.

    thinking

    2 0 helpful

Reply to this topic

Sign in or create an account to reply.