ok6410 Ubuntu设置mount挂载 文件系统NFS启动

Ubuntu

  1. 在虚拟机上配置nfs服务

首先判断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


   2.    编辑 exports文件

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值