VFS:Unable to mount root fs on unknown block 解決方案
00:1f.2 SATA controller: Intel Corporation 82801JI (ICH10 Family) SATA AHCI Controller
00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller
01:03.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200eW WPCM450 (rev 0a)
02:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
02:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
04:00.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1068E PCI-Express Fusion-MPT SAS (rev 08)
(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
問題解決了 ,方法如下:
把Device Drivers-->SCSI device support-->SCSI low-level drivers下的所有設置成未選擇狀態
Device Drivers-->Fusion MPT device support-->Fusion MPT(base + ScsiHost) drivers選中