There are multiple causes for the error Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0), but this is how I caused and later fixed my hosed system. Also I will explain the related issues.
I upgraded Fedora 13 to Fedora 14 using PreUpgrade (much nicer than CDs/DVDs), but after I rebooted and it was installing packages, it failed about at 90% on the VirtualBox-3.2 package. The only option was to reboot, and then I got the dreaded error message: Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0). The system was in a partially-upgraded, inconsistent state.
When I booted in the fc14 kernel, I got kernel panic error, but the fc13 booted fine into the console on init 3. There I spent a few hours following Fedora’s Yum Upgrade FAQ. The most useful step from the FAQ is running the command: yum –releasever=14 distro-sync which I piped to a text file, so I could scroll through it. Near the bottom (above the duplicate RPM section) it had a section where dependencies could not be resolved (search for “not found”), so I had to remove each of those dependencies—most using rpm -e –nodeps packagename (a potentially dangerous command).
Now the the rest of the FAQ worked: I carefully installed the packages I ripped out using yum groupupdate Base and re-ran yum –releasever=14 distro-sync. I scanned for errors with package-cleanup –problems, fix those manually using rpm, and removed hundreds of duplicate packages with package-clean —-cleandupes.
Then I could reboot into a graphical (init 5) session using the old fc13 kernel. Reading Bugzilla Bug 632412 – Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0) has a gem at the bottom: a note about rebuilding /boot/initramfs-126.96.36.199-64.fc14.i686.img using dracut. Indeed, inspecting /etc/grub.conf shows the fc14 kernel has no initrd line at all, but rebuilding it with dracut wasn’t working. Easier, though, is simply to uninstall and reinstall (isn’t that a Microsoft trick?) like this:
rpm -e kernel-188.8.131.52-64.fc14.i686 yum upgrade
Now the fc14 kernel boots fine. I’ve been a Fedora user for years since the beginning and this “adventure” isn’t a unique experience, but I do hope they build better logic into the installer/upgrade mechanisms for the non-happy-path.
- The kernel panic was fixed by reinstalling the kernel
- The yum upgrade was finished by booting the old kernel, using yum distro-sync to identify conflicts, deleting them with rpm -e, and later reinstalling the critical packages
- The yum upgrade FAQ guide has additional tips