Knowledge Base:Unable to mount root fs
When booting a freshly configured kernel, the boot fails with the following message:
VFS: Cannot open root device "hda3" or unknown-block(2,0) 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(2,0)
The numbers in the
unknown-block section can be different.
Any Gentoo Linux system on which a new kernel is being booted (or an update was made on the bootloader configuration).
The panic informs that the Linux kernel is unable to:
- Detect the controller for the hard disk (a likely candidate if the message says
- Detect the partition because it does not have support for the partition type (less likely, but still possible);
- Mount the partition because it does not know how to access the file system (a likely candidate if the message gives a non-zero figure in the first number set, such as
- Detect the partition because the wrong device was passed in the boot loader configuration.
Boot with the old kernel (if available), or with a LiveCD, and open the kernel configuration:
- Ensure that the controller chipset has been configured in the Linux kernel (and in-kernel, not as a module);
- Ensure that the used file systems (such as ext2, ext3, ext4, ReiserFS, Btrfs, etc.) are configured in the Linux kernel (and built into the kernel, not as a module);
- Ensure that, if you use
root=UUID=..., you have built an initramfs when configuring the bootloader, see "Configuring the linux kernel" of your installation handbook
- If running Gentoo as a Qemu guest, ensure that the virtio block drivers and PCI driver for virtio devices are enabled in the kernel (that is,
CONFIG_VIRTIO_PCI=yin the kernel configuration file).
Also verify that the boot loader configuration (/boot/grub/grub.conf for GRUB legacy and /boot/grub/grub.cfg for GRUB2) refers to the correct partition:
title Gentoo Linux root (hd0,0) kernel /kernel-3.0.4 root=/dev/sda3
If you are using an initramfs and upgrade to another kernel version, make sure the initramfs is recreated correctly in /boot for the new kernel version and that the boot loader configuration refers to the correct initramfs.