问题一:
报错:VFS: Unable to mount root fs via NFS, trying floppy
[ 83.929713] random: fast init done
[ 100.366640] VFS: Unable to mount root fs via NFS, trying floppy.
[ 100.373516] VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
[ 100.380855] P
原因: 从Ubuntu17.04开始,nfs默认只支持协议3和协议4,而kernel中默认支持协议2。
修改:
1.修改 NFS 配置文件:
sudo vim /etc/default/nfs-kernel-server
2.在末尾添加:
RPCNFSDOPTS="--nfs-version 2,3,4 --debug --syslog"
3.重启 NFS 服务:
sudo /etc/init.d/nfs-kernel-server restart
完美解决。