There have been much discussion on how to fix this. This summarizes some of the tips given so far in these discussions. Note that this error has nothing to do with /etc/fstab! If the kernel can't mount the root file system, then there's no way it can read /etc/fstab. This is purely a kernel configuration problem.
Fix your kernel boot parameters.
Make sure your kernel has a "root=" parameter passed to it in your bootloader and that the parameter points to your root file system. For example, my root file system is on /dev/hde2. My grub.conf contains:
代码:
kernel (hd0,0)/boot/bzImage-2.6.1-rc2-gentoo-1 root=/dev/hde2
If you use LILO, then your lilo.conf should contain something analogous to:
代码:
image=/boot/bzImage-2.6.1-rc2-gentoo-1
root=/dev/hde2
Remember to rerun lilo after editing lilo.conf!
If you don't know which partition is your root, then check /etc/fstab and look for the entry for / :
代码:
/dev/hde2 / reiserfs noatime 1 2
Ensure the proper options and drivers are built into the kernel.
Don't forget to mount /boot when installing a new kernel!
devfs support
You need devfs support built in and mounted at boot time. In the 2.6 kernel, these are listed as:
代码:
File systems
-> Pseudo file systems
-> /dev file system support (OBSOLETE) DEVFS_FS
-> Automatically mount at boot DEVFS_MOUNT
In the 2.4 kernel, they are:
代码:
File systems
-> /dev file system support (EXPERIMENTAL)
Automatically mount at boot
File system support
You need support for your root file system built in (not built as a module). My root file system is Reiser. So I have reiserfs built into my kernel. If you are unsure what your root file system is, check /etc/fstab.
Drive controller support
You need supoort for your drive controller built into the kernel. If you are unsure what to build, check with `lspci', part of the sys-apps/pciutils package. If all else fails, build them all and use the process of elimination.
IDE
Make sure you have support for your IDE chipset compiled in. In the 2.6 kernel, these can be found in
代码:
Device Drivers
-> ATA/ATAPI/MFM/RLL support
-> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
-> PCI IDE chipset support
-> Generic PCI bus-master DMA support
For the 2.4 kernel, they are in
代码:
ATA/IDE/MFM/RLL support
-> IDE, ATA and ATAPI Block devices
-> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
-> Generic PCI IDE chipset support
You also need "Include IDE/ATA-2 DISK support" built in. This can be found in the "Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support" branch of the kernel configuration menu.
SCSI
Make sure you have support for your SCSI device compiled in. In the 2.6 kernel,
代码:
Device drivers
-> SCSI device support
-> SCSI low-level drivers
In the 2.4 kernel,
代码:
SCSI support
-> SCSI low-level drivers
You also need "SCSI disk support" built in. This can be found in the "SCSI [device] support" branch of the kernel configuration menu.
Partition selection support
If you partitioned your drive under a different operating system, you may need to enable partition selection support in the kernel. In both the 2.4 and 2.6 kernels,
代码:
File systems
-> Partition types
-> Advanced partition selection
[ 此贴被木独猪在2008-09-13 01:33重新编辑 ]