kernel panic VFS: Unable to mount root fs 总结

内核找不到根文件系统,不是/etc/fstab配置的问题,根本原因在于你的内核配置参数的,问题,有些选项必须编译进内核(使用*),不能用模块(使用M)

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:
Code:
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:
Code:
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 / :
Code:
/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:
Code:
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:
Code:
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
Code:
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
Code:
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,
Code:
Device drivers
-> SCSI device support
-> SCSI low-level drivers

In the 2.4 kernel,
Code:
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,
Code:
File systems
-> Partition types
-> Advanced partition selection
 
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值