linux主机版本:ubuntu-18.04
开发板:Marsboard
1、首先安装nfs服务
ubuntu@ubuntu:~$ sudo apt-get install nfs-kernel-server
2、配置nfs服务
打开文件/etc/exports
ubuntu@ubuntu:~$ sudo vim /etc/exports
添加如下内容 /home/ubuntu/rootfs *(rw,sync,no_root_squash)这个文件就是根文件系统的目录
# /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/ubuntu/rootfs *(rw,async,no