VFS: Cannot open root device “nfs“ or unknown-block(2,0): error -6 NFS挂载不上,内核配置问题

转载于:https://blog.youkuaiyun.com/STL1634614466/article/details/105130813/

VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6 NFS挂载不上,内核配置问题

确认host端的nfs支持的版本,使用命令nfsstat查看

root@Silence:/opt/nfsboot# nfsstat -v
Server packet stats:
packets    udp        tcp        tcpconn
3          3          0          0       

Server rpc stats:
calls      badcalls   badfmt     badauth    badclnt
0          3          3          0          0       

Server reply cache:
hits       misses     nocache
0          0          0       

Server io stats:
read       write
0          0       

Server read ahead cache:
size       0-10%      10-20%     20-30%     30-40%     40-50%     50-60%     60-70%     70-80%     80-90%     90-100%    notfound
32         0          0          0          0          0          0          0          0          0          0          0       

Server file handle cache:
lookup     anon       ncachedir  ncachenondir  stale
0          0          0          0          0     

在给内核传参中指定 setenv bootargs root=/dev/nfs rw nfsroot=192.168.1.141:/opt/nfsboot,v3 ip=192.168.1.10:192.168.1.141:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC2,115200

加上这个v3之后就可以了。原因应该是我使用linux版本是ubuntu 18.04,nfs版本的问题。具体的原因还需要后面去找。

答案来源于:https://www.cnblogs.com/-rzx-/p/12264901.html

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值