installing Gentoo: kernel can't mount root
Hi All,
I have installed Gentoo 2006.1, but I can't boot: while booting, the error message is VFS: Cannot open root device "hda3" or unknown-block(0,0) Please append a correct "root=" boot option Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) I am still pretty new to Linux, so I am following the "HOWTO Install Gentoo Developers Method with NPTL and 2.6 from Stage1" guide (:confused: I am not allowed to post links?) to walk through the process of installing Gentoo. I am learning a lot. Now, I realize that what I describe is a common problem (searching on Google), the common points of failure are GRUB configuration and lack of built-in kernel support for devices and filesystems. But I still can't figure it out. Here is what I am doing.... My partitions are Root: /dev/hda3 (~20GB, ReiserFS file system) Boot: /dev/hda6 (~750MB, ReiserFS file system) Swap: /dev/hda7 my GRUB entry for Gentoo is title Gentoo Linux kernel /vmlinuz ro root=/dev/hda3 and I compiled my 2.6.17-gentoo-r8 kernel with built-in support for
My harddrive is a Maxtor IDE device connected to an ATA storage controller. I am not totally certain that my kernel options cover this (what other IDE-related options might I need?). I also tried using an initrd file (built with mkinitrd, added an initrd line to GRUB), but still have the same problem. Is my GRUB configuration correct? Based on the error message, "Unable to mount root fs", is my problem more likely with the device or the filesystem? I'm really stuck. Any guidance or comments will help. :) |
Since you have boot in one partition, and root in another, you need to tell grub where they both are located.
change your current config: title Gentoo Linux kernel /vmlinuz ro root=/dev/hda3 to this: title Gentoo Linux kernel (hd0,5)/vmlinuz ro root=/dev/hda3 That tells grub that vmlinuz is in partition hda,6, and root is in partition hda,3. |
Hi bigrigdriver, thanks for your reply. I tried
kernel (hd0,5)/vmlinuz ro root=/dev/hda3 and also tried separately specifying a "root", like this: root (hd0,2) kernel (hd0,5)/vmlinuz ro root=/dev/hda3 but all produce the same result (kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)). As I understand, (hd0,5)/vmlinuz and /vmlinuz are equivalent since the latter is relative to GRUB's boot partition. Anything else I could try with the settings? I must be doing something wrong somewhere - where should I look? |
I had the same problem. It was because I had not selected the correct IDE chipset during make menuconfig.
CHeck the options under ATA/ATAPI/MFM/RLL Support for your chipset. I am not sure why we are all getting the issue, maybe some old defaults are not defaults anymore. You will also need the lines bigrigdriver shows you for your grub.conf. |
Success - my gentoo kernel boots now. Thanks for the support! :)
A brief summary... Problem: VFS: Cannot open root device "hda3" or unknown-block(0,0) What was wrong: The kernel compile options were missing some necessary features but it wasn't obvious what those were. The fix: Replace the kernel options with genkernel's defaults and go from there. I will explain what I did, maybe this will help someone: I suspected my kernel, so I made another kernel using the genkernel utility. Code:
emerge genkernel For maximum compatibility, genkernel enables a lot of kernel compile options. But for performance, it is better tune them specifically for your system. Using genkernel's compile options as a starting point, I carefully adjusted them to my liking and built another kernel. Code:
cd /usr/src/linux |
All times are GMT -5. The time now is 05:28 AM. |