实习笔记--------------nfs安装与配置及arm板的挂载

本文详细介绍如何在Ubuntu系统上安装并配置NFS服务,包括安装NFS组件、配置服务参数、设置防火墙规则及主机访问权限等步骤,并提供了一个实际的板卡参数设置案例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一安装nfs

    apt-get install nfs-kernel-server

 

二 配置nfs

     yelei@ubuntu:~$ sudo dpkg-reconfigure portmap  (对Should portmap be bound to the loopback address? 选N)

     yelei@ubuntu:~$ sudo gedit /etc/default/portmap    (清除 "-i 127.0.0.1")

 

三 配置hosts.deny
     yelei@ubuntu:~$ sudo gedit /etc/host.deny

    文本末添加:
    portmap: ALL
    lockd:   ALL
    mountd:  ALL
    rquotad: ALL
    statd:   ALL
四 配置hosts.allow
    yelei@ubuntu:~$ sudo gedit /etc/host.allow
   文本末加入: 
    portmap:192.168.1. 
    lockd:192.168.1. 
    rquotad:192.168.1.
    mountd:192.168.1.
    statd:192.168.1.

    yelei@ubuntu:~$ sudo /etc/init.d/portmap restart
    Rather than invoking init scripts through /etc/init.d, use the service(8)
    utility, e.g. service portmap restart
    Since the script you are attempting to invoke has been converted to an
    Upstart job, you may also use the restart(8) utility, e.g. restart portmap
    portmap start/running, process 5399
五 配置/etc/exports
    yelei@ubuntu:~$ sudo/gedit /etc/exports
   /home/yelei/filesys/rootfs *(rw,sync,no_subtree_check)
   yelei@ubuntu:~$ sudo /etc/init.d/nfs-kernel-server restart
   * Stopping NFS kernel daemon                                            [ OK ] 
   * Unexporting directories for NFS kernel daemon...                      [ OK ] 
   * Exporting directories for NFS kernel daemon...                        [ OK ] 
   * Starting NFS kernel daemon                                                [ OK ]
   yelei@ubuntu:~$ sudo showmount -e
   Export list for ubuntu:
   /home/yelei/filesys/rootfs *
六 板卡参数设置
    setenv bootargs mem=128M console=ttyS2,115200n8 root=/dev/nfs nfsroot=192.168.1.146:/home/yelei/filesys/rootfs ip=192.168.1.200:192.168.1.146:192.168.1.1:255.255.255.0::eth0:off
    saveenv
即可
这里解释一下参数
"nfsroot="  后面是我NFS主机的IP地址和我的文件系统的路径, 上面说过
"ip="后面
一 目标板IP  192.168.0.5(我的启动参数里print给大家了,就是ipaddr)
二 主机IP    192.168.0.3
三 目标板网关   192.168.0.1
四 子网掩码       255.255.255.0
五 开发板名字(随你便)没有名字用:代替
六  eth0(网卡设备名称)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值