1、开发板准备:
在uboot命令行设置正确的ip地址,确保系统起来之后PC与开发板能够互相ping通。
若开发板地址与PC端不在同一个网段,可通过以下方法修改开发板IP地址:
vi /etc/eth0-setting
将其中的ip地址改成你想要的ip,重启。pc和开发板能ping通
2、PC 端准备:
安装:sudo apt-get install nfs-kernel-server nfs-common portmap
配置:vim /etc/exports,在最后一行加入:/home/nfs *(rw,sync,no_root_squash,no_subtree_check)
3、重启:
sudo /etc/init.d/rpcbind restart
sudo /etc/init.d/nfs-kernel-server restart
4、本机测试:
sudo mount -t nfs localhost:/home/nfs /mnt
查看内容,以便确定是否挂载成功
取消挂载:
sudo umount /mnt
5、在开发板上挂载nfs:
mount -t nfs -o nolock 192.168.1.100:/home/nfs /mnt
至此挂载完成
若想实现开机自动挂载,可在/etc/init.d/里的rcS 末尾添加:
mount -t nfs -o nolock 192.168.1.100:/home/nfs /mnt
便可实现开机自动挂载nfs
NFS挂载教程
本文详细介绍了如何在开发板上挂载NFS服务的具体步骤,包括开发板与PC端的IP地址设置、NFS服务安装配置及重启、本地测试、远程挂载等,并提供了开机自动挂载的方法。
448

被折叠的 条评论
为什么被折叠?



