This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
硬件平台是TI的DM816X/AM389X开发板,SD卡启动后,在Uboot下,通过TFTP可以下载内核到内存并运行,但是不能通过NFS挂接根文件系统,bootargs=noinitrd root=/dev/nfs nfsroot=172.16.114.24:/nfsdir/xxb/rootfs ip=172.16.114.180:172.16.114.24:172.16.114.1:255.255.255.0::eth0 off' 内核通过TFTP下载到内存后通过bootm命令启动内核,故障信息如下:
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00 128 mtdblock0 (driver?)
1f01 128 mtdblock1 (driver?)
1f02 512 mtdblock2 (driver?)
1f03 2048 mtdblock3 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
请问可能是什么原因?NFS主机端自己可以挂载自己,kernel配置也检查了
是同一个文件夹。
出错时内核打印信息如下:
NFS:MNTPATH:/home/sony/targetfs'
NFS:sending MNT request for 192.168.0.11:/home/sony/targetfs
PHY:0:01-Link is Up -1000/Full
NFS:failed to create MNT RPC client, status=-113
NFS;unable to mount server 192.168.0.11,error -113
貌似这个过程中,你的serverip变了。你uboot的设置不是172...,怎么到了内核是192.168.0.11?
手动指定板的ip的时候,启动参数不要加dhcp。
谢谢你的回复,之前我贴的bootargs有误,更正为:bootargs=consolettyO2 115200n8, root=/dev/nfs nfsroot=192.168.0.11:/home/sony/targetfs ip=192.168.0.12:192.168.0.11:192.168.0.1:255.255.255.0::eth0 off' dhcp的方式我也用过,也不行。想请教下开发板的IP是通过设置ipaddr来设置的吗?
to ke liao:
ipaddr是你的板的ip,serverip是你nfs所在系统的ip,如果你的nfs是在虚拟机里的,就是虚拟机的ip。网关可以不填,一般不会有那么复杂的网络环境。但掩码是要填的。
现在问题定位在/net/sunrpc/clnt.c文件344行rpc_create()函数的int err=rpc_ping(clnt)这一行,函数返回值为1,说明PING的时候出错。请问什么原因?有没有能打印出当前IP地址的语句?