nfs

记个事,nfs系统作为根文件系统

启动参数没有使用u-boot中传入的参数,内核中自己指定。

ubuntu中安装nfs服务端

开发板:

  General setup--->取消Initial RAM filesystem and RAM disk (initramfs/initrd) support设置

      Boot options--->取消Passing CMDLINE from u-boot,并设置启动内核指定启动参数root=/dev/nfs rw nfsroot=192.168.0.1:/nfs,v3 ip=192.168.0.2:192.168.0.1:192.168.0.1:255.255.255.0:sep611:eth0:on console=ttyS0,115200 mem=256mb

  File systems--->选中Network File Systems--->选中NFS client support、 NFS client support for NFS version 3、  NFS client support for the NFSv3 ACL protocol extension、 NFS client support for NFS version 4 (EXPERIMENTAL)、 Root file system on NFS、 Secure RPC: Kerberos V mechanism (EXPERIMENTAL)

宿主机:/etc/exports文件中写入:

   /nfs 192.168.0.2(rw,sync,no_root_squash)

注意红色字符间不要有空格,否则客户端无法向服务端中的目录写入内容。

原文地址:https://www.cnblogs.com/openix/p/2865880.html