感谢支持
我们一直在努力

VMware安装Gentoo 启动出错 VFS:Unable to mount root fs on unknown block

在VMware中安装Gentoo后,启动报错:

VFS:Unable to mount root fs on unknown block

解决方案
1)
(1)Root-NFS:No NFS server available,giving up;  
(2)VFS:Unable to mount root fs via NFS,trying floppy;
(3)VFS:Cannot open root device “sda3” or unknown block(2,0);
(4)Please append a correct “root = ” boot option;here are the available patitions:0b00  1048575 sr0 drivers:sr;
(5)kernel panic -not syncing:VFS:Unable to mount root fs on unknown block(2,0)
当时我查了很多资料,问题定位在虚拟机的SCSI硬盘上,默认kernel的
虚拟机硬盘类型可在Other Linux 2.6.x kernel文件里找到:
 scsi0.virtualDev = “lsilogic”
#lspci
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX – 82443BX/ZX/DX Host bridge (rev 01)
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX – 82443BX/ZX/DX AGP bridge (rev 01)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.2 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:0f.0 VGA compatible controller: VMware Inc Abstract SVGA II Adapter
00:10.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ul
tra320 SCSI (rev 01)
00:11.0 PCI bridge: VMware Inc Unknown device 0790 (rev 02)
02:00.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10)
02:01.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 02)
02:02.0 USB Controller: VMware Inc Abstract USB2 EHCI Controller

kernel的配置如下:
#make menuconfig
Device Drivers —>
SCSI device support —>
[*] SCSI low-level drivers —>
│ │ [*] LSI Logic New Generation RAID Device Drivers │ │
│ │ <*> LSI Logic Management Module (New Driver) │ │
│ │ <*> LSI Logic MegaRAID Driver (New Driver) │ │
│ │ <*> LSI Logic Legacy MegaRAID Driver │ │
│ │ <*> LSI Logic MegaRAID SAS RAID Module │ │
│ │ <*> LSI MPT Fusion SAS 2.0 Device Driver │ │
│ │ (128) LSI MPT Fusion Max number of SG Entries (16 – 128) │ │
│ │ [ ] LSI MPT Fusion logging facility
<*> SCSI Device Handlers —>
<*> LSI RDAC Device Handler


2)

出现错误: 重启选择开启的选项后运行到这里:[ 2.889093]Root-NFS :NO NFS server available, giving up [ 2.889174]VFS : unable to mount root fs via NFS , trying floppy [ 2.892325]VFS : cannot open root derice”sda3″ or unknown-block(2,0) [ 2.892406]Please append a correct “root=” boot option; here are the available partitions: [ 2.892488] 0b00 1048575 sro driver : sr [ 2.892569]Kernel panic – not syncing : VFS : unable-block(2,0) 然后就停止运行


解决方法:上面出现的问题是grub的是指错误,在kerkenl /kernel root=/dev/sda3的后边加上一个参数:sda=stroke就可以了(2.6.7以上的内核都要加这个参数的)。重启后成功启动了


相关阅读:Gentoo内核编译选项说明 http://www.linuxidc.com/Linux/2012-01/52188.htm


3)


问题解决了 ,方法如下:
把Device Drivers–>SCSI device support–>SCSI low-level drivers下的所有设置成未选择状态
Device Drivers–>Fusion MPT device support–>Fusion MPT(base + ScsiHost) drivers选中

然后将内核重新编译、安装,将grub.conf设置正确:







代码:
default 0
timeout 30
title=Gentoo Linux 2.6.12-r6
root (hd0,0)
kernel /kernel-2.6.12-gentoo-r6 root=/dev/sda3

重启,OK。

“Fusion MPT(base + ScsiHost) drivers”是我的SCSI控制器的驱动,你可以用LiveCD启动然后用lspci查看你的硬件型号及厂商(不单能看到SCSI控制器的,还能看网卡、显卡、声卡的型号)然后在make menuconfig里面用“/”查找一下刚才找到的型号和厂商,一般结果都有好几个,注意看看,一般都能看出来是哪方面的驱动,找几个可疑对象逐个试试(呵呵,我是一次就找对了 )。

综上,我认为:我在启动时出现的问题,是一个SCSI驱动选择不正确所致。

赞(0) 打赏
转载请注明出处:服务器评测 » VMware安装Gentoo 启动出错 VFS:Unable to mount root fs on unknown block
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏