Ubuntu:
- 在虚拟机上配置nfs服务
2. 编辑 exports文件首先判断linux上是否安装有nfs
我的是在/etc/init.d文件下看看是否有portmap nfs
/etc/init.d/portmap
/etc/init.d/nfs
如果没有这些执行:
su - root
apt-get install portmap
apt-get install nfs-kernel-server
vi /etc/exports
添加这个:/nfs/root *(rw,sync,no_root_squash)
3. 启动nfs服务
/etc/init.d/portmap restart
/etc/init.d/nfs restart
检测运行状态(也可以不检测)
/etc/init.d/portmap status
出现 is running...
否则
/etc/init.d/portmap start
/etc/init.d/nfs start
设备:
mount -t nfs 192.168.1.31:/forlinx /mnt -o nolock
这样既可以挂载了
设置文件系统NFS启动:
在uboot阶段设置启动环境变量
如果要恢复为从本地启动setenv bootargs"root=/dev/nfs nfsroot=192.168.1.31:/forlinx/FileSystem-Yaffs2ip=192.168.1.32:192.168.1.31:192.168.1.25:255.255.255.0:witech.com.cn:eth0:offconsole=ttySAC0,115200" sa reboot
set bootargs "root=/dev/mtdblock2 rootfstype=yaffs2 init=/linuxrcconsole=ttySAC0,115200"
sa
reboot