nfs使用步骤(前提Ubuntu,开发板,Windows三者ping通)

1. sudo vi /etc/exports

2. 在文件里面添加 /work/nfs_root *(rw,sync,no_root_squash)

3. 重启  sudo /etc/init.d/nfs-kernel-server restart

4. 开发板ping通Ubuntu

5. 把需要拷贝到开发板上的文件都复制到刚才设置的目录:/work/nfs_root

6. 在开发板执行挂载命令    其中192.168.2.100是Ubuntu的ip

   mount -t nfs -o intr,nolock,rsize=1024,wsize=1024 192.168.2.100:/work/nfs_root /mnt  

   注意:这里不是 mount -t nfs -o nolock 192.168.2.100:/work/nfs_root /mnt

   否则会遇到一个问题   nfs: server 192.168.2.100 not responding, still trying 然后一直卡在这里

 

参考:

https://blog.csdn.net/adaixiaoxiao/article/details/50916758

https://blog.csdn.net/u014742281/article/details/88171989

 

补充:开发板(jz2440)设置

1.上电,按下空格,进去uboot     

2.按下q

3.printenv   // 查看当前几个ip

             // 其中 gatewayip 开发板网关

                      //      ipaddr 开发板ip

                                    serverip 服务主机ip,即Ubuntu ip

4.如果ip不对,需要设置

  setenv   serverip 192.168.2.100

5.保存

  saveenv

6.重启开发板,ifconfig 确认已经修改过了

7.设置后的几个ip

jz2440 nfs: server 192.168.xxx.xxx not responding, still trying 然后一直卡

相关文章:

  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
猜你喜欢
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
  • 2021-09-21
相关资源
相似解决方案