安装(ubuntu)
sudo apt install nfs-kernel-server
export
sudo vim /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/home/flinn/work/bin *(rw,sync,no_root_squash)
重启nfs服务
sudo /etc/init.d/nfs-kernel-server restart
board参数设置
#board ip : 192.168.1.123
#serverip : 192.168.1.100
# board ping server success
setenv ipaddr 192.168.1.123
setenv serverip 192.168.1.100
setenv bootargs "noinitrd init=/linuxrc console=ttySAC0,115200 root=/dev/nfs rw nfsroot=192.168.1.100:/home/flinn/work/bin/rootfs ip=192.168.1.123:192.168.1.100:192.168.1.1:255.255.255.0::eth0:off"
setenv bootcmd "nfs 0x30007FC0 192.168.1.100:/home/flinn/work/bin/uImage;bootm 0x30007FC0"