Kernel panic... Unable to mount root fs
dbn.lists at gmail.com
Tue Jul 1 10:10:14 PDT 2008
On Tue, Jul 1, 2008 at 9:39 AM, Christian Gardner
<christian_gardner at yahoo.co.uk> wrote:
> Hi all, hope someone can help me out, it's been five years since I last used LFS (or linux for that matter!) so I'm a bit rusty...
> I've gone through the LFS6.3 book. It all seems to go fine until I boot up the new system. These are the last three lines before it totally freezes:
> List of all partitions:
> No file system could mount root, tried:
> Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
> So what's going on? I've looked through the FAQ and the mailing-list archive. These suggest that I need to enable SCSI support when compiling the kernel (in the Ubuntu 7.xx distro I'm using as a host, my hard drive is sda not hda). Well I'm pretty sure I've done that!
> Tried compiling a 'vanilla' kernel, ie left everything alone in menuconfig - didn't work.
> Tried ticking a few options in menuconfig with the letters 'scsi' in them - didn't work... but there are so damn many, what *exactly* am I supposed to be enabling?
> Tried using the .config from the Ubuntu distro... didn't work.
> Tried plopping the kernel from the Ubuntu distro straight into the /boot of the LFS partition... didn't work.
Almost certainly it's because the necessary driver is not compiled
into the kernel. The Ubuntu .config and kernel will probably not work
for you because the drivers are modules and you need to have an
initramfs to load them before mounting root. I don't recall the exact
settings, but I think you'll need the following:
For libata (newer SATA/PATA drivers):
CONFIG_BLK_DEV_SD=y # this is SCSI disk support
For IDE (older drivers):
You can compile both libata and IDE into your kernel, and only one
will be used. I forget which one is default in 2.6.22, but I think
SATA disks will use libata and PATA disks will use IDE. If libata is
loaded, you'll get /dev/sd* disks, and /dev/hd* disks for IDE.
More information about the lfs-support