mini2440通过nfs挂载linux文件夹

您所在的位置:网站首页 nfs如何挂载文件夹 mini2440通过nfs挂载linux文件夹

mini2440通过nfs挂载linux文件夹

#mini2440通过nfs挂载linux文件夹| 来源: 网络整理| 查看: 265

linux

1.安装nfs服务器

sudo apt-get install nfs-kernel-server

2.修改配置文件/etc/exports

vim /etc/exports

在最后一行加上

/home/stu/nfs *(rw,sync,no_root_squash,no_subtree_check)

其中/home/stu/nfs是你要挂载的目录

3.端口映射

sudo service rpcbind restart

4.重启

sudo service nfs-kernel-server restart

5.测试

showmount -e

mini2440

mount -t nfs -o nolock 192.168.0.102:/home/stu/nfs /mnt

要传送比较大的文件时用这个命令

mount -t nfs -o intr,nolock,rsize=1024,wsize=1024 192.168.0.102:/home/stu/nfs /mnt

/mnt是mini2440上的目录

192.168.0.102是linux主机的IP地址

挂载前要保证mini2440开发板能ping通linux主机

linux的/home/stu/nfs将挂载在mini2440的/mnt

2440通过nfs里的内核启动

1.先reboot进入u-boot界面

2.设置ipaddr和serverip

OpenJTAG> set ipaddr 192.168.1.17

OpenJTAG> set serverip 192.168.1.103

OpenJTAG> save

3.ping主机,看能不能通

OpenJTAG> ping 192.168.1.103

ERROR: resetting DM9000 -> not responding

dm9000 i/o: 0x20000000, id: 0x90000a46 

DM9000: running in 16 bit mode

MAC: 08:00:3e:26:0a:5b

could not establish link

host 192.168.1.103 is alive

看到alive已经可以通

4.通过nfs启动内核

nfs 32000000 192.168.1.103:/home/book/nfs/uImage_4_3;bootm 32000000



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3