在uboot中設置bootargs
引導內核后通過nfs掛載網絡根文件系統時出現所示錯誤。
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0) ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0) random: nonblocking pool is initialized
經過各種試驗發現是nfs服務的問題。
原因是:ubuntu18.04只支持nfs 3和nfs 4,而uboot默認使用nfs 2。
解決方法:
在ubuntu18.04的 “/etc/default/nfs-kernel-server” 文件末尾加一行,如圖所示。
RPCNFSDOPTS="--nfs-version 2,3,4 --debug --syslog"
然后重啟nfs服務即可。
sudo /etc/init.d/nfs-kernel-server restart