LFS(5)

在完成所有工作重新啓動進入LFS系統時提示:

md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: Autorun ...
md: ... autorun DONE.
Root-NFS: on NFS server address
VFS: Unable to mount root fs via NFS. trying floppy.
VFS: cannot open root device "sdb1" or unknown-block(2.0)
Please append a correct "root=" boot option; here are the available partitions:
0b00    1048575   sr0 driver: sr
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2.0)
Pid: 1. comm: swapper/0 Not tained 3.2.6 #1
Call trace:
...mount_block_root+0x141/0x1c9...mount_root...kernel_init...

這是因爲內核缺少正確的磁盤驅動和文件系統驅動導致,重新編譯內核,包含全部的SCSI和fs的驅動,還有兩個關於VMware的驅動CONFIG_VMWARE_PVSCSI=y和CONFIG_VMWARE_BALLOON=y(因爲我是用VM上的ubuntu做宿主機)。
重新啓動後順利進入LFS系統,但提示eth0啓動失敗,
Bringing up the eth0 interface... interface eth0 doesn't exist [FAIL]

仍舊是內核問題,缺少網卡驅動,在宿主機上執行 lspci 或 lspci | grep -i ethernet 查看參數如下:
02:01.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10)

表明VM使用的是AMD PCnet32虛擬網卡,更改內核配置文件中此項爲“y“
CONFIG_PCNET32=y
重新編譯,進入LFS,網卡啓動成功,可以正常使用。

至此,LFS 7.1搭建完成,只是前面還遺留了一些問題,希望後面能找到答案補充上。高人路過,敬請解答,拜謝。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章