使用U-Boot的NFS(远程/网络用户空间)
前提条件
假设您的主机PC运行的是Ubuntu 14.04.1 LTS或更高版本,并且与您的开发平台在同一个本地网络上;为了简单起见,我们假设网络上也有DHCP服务器。
如果使用Juno,请确保使用的是前端以太网端口。
设置NFS服务器
在主机上安装以下软件包:
sudo apt-get update && sudo apt-get install nfs-kernel-server rpcbind
切换到超级用户:
sudo su -
创建一个根“/export/”目录,我们将使用它作为存放文件系统的目录:
mkdir /export/
设置文件系统的权限,并在'/etc/exports'文件末尾添加以下行:
/export/ *(rw,nohide,insecure,no_subtree_check,async,no_root_squash)
为了避免潜在的文件权限问题,我们将避免使用NFSv4。通过编辑' /etc/default/ ns -kernel-server',将默认值设置为NFSv3,如下所示:
# Number of servers to start up
# To disable nfsv4 on the server, specify `--no-nfs-version ' here
#RPCNFSDCOUNT=
RPCNFSDCOUNT="--no-nfs-version 4"
然后重启nfs-kernel-server服务:
service nfs-kernel-server restart
现在检查一下,“portmapper”、“nfs”和“mountd”都同时运行在“tcp”和“udp”上:
#rpcinfo -p
program vers proto port service
tcp portmapper
tcp portmapper
tcp portmapper
udp portmapper
udp portmapper
udp portmapper
udp status
tcp status
tcp nfs
tcp nfs
tcp nfs
tcp
tcp
udp nfs
udp nfs
udp nfs
udp
udp
udp nlockmgr
udp nlockmgr
udp nlockmgr
tcp nlockmgr
tcp nlockmgr
tcp nlockmgr
udp mountd
tcp mountd
udp mountd
tcp mountd
udp mountd
tcp mountd
接下来,将您需要的根文件系统提取到“/export/”目录中,也可以选择将其放在子目录中。在本例中,我们将根文件系统提取为“/export/juno/fs/”。
挂载主机目录到juno板
mount -t nfs 192.168.1.101:/export/ /mnt -o nolock
挂载完成以后你就可以在开发板上/mnt目录下看到主机/export目录下的内容,可以使用cp命令把主机/export目录下的内容拷贝到开发板上。
使用网络文件系统启动
打开Juno板并中断U-Boot的默认启动选择:
The default boot selection will start in 3 seconds
将主机PC的IP地址保存到“serverip”环境变量:
VExpress64# set serverip <host_pc_ip_address>
VExpress64# saveenv
接下来修改U-Boot的引导args,使用NFS找到根文件系统:
VExpress64# set origbootargs "$bootargs"
VExpress64# set bootargs "console=ttyAMA0,115200n8 root=/dev/nfs ip=dhcp nfsroot=${serverip}:/export/juno/fs rw rootwait earlyprintk=pl011,0x7ff80000 debug"
VExpress64# saveenv
然后重新启动juno板, 它应该会使用NFS找到根文件系统。
恢复到默认启动行为的办法:
VExpress64# set bootargs "$origbootargs"
使用U-Boot的NFS(远程/网络用户空间)的更多相关文章
- 39.NFS(网络文件系统)
要共享文件的主机都是Linux系统时推荐在客户端部署NFS 服务来共享文件. NFS(网络文件系统)服务可以将远程Linux 系统上的文件共享资源挂载到本地主机的目录上,从而使得本地主机(Linux ...
- NFS (网络文件系统)
NFS (网络文件系统) https://www.cnblogs.com/wahaha02/p/9559345.html Linux网络文件系统的实现与调试 NFS协议 NFS (网络文件系统)不是传 ...
- window连接linux nfs服务器 —— 网络错误 53
在度娘以"win7 nfs mount 网络错误 - 53"为关键字,翻了第一页,GG... 于是去找谷哥,第一页 [all variants] Get NFS working w ...
- 深入理解linux网络技术内幕读书笔记(三)--用户空间与内核的接口
Table of Contents 1 概论 1.1 procfs (/proc 文件系统) 1.1.1 编程接口 1.2 sysctl (/proc/sys目录) 1.2.1 编程接口 1.3 sy ...
- mysql创建远程登陆用户并授权
在创建安装微擎的过程中,针对第四步 创建远程登陆用户并授权 > grant all PRIVILEGES on database.* to root@'127.0.0.1' id ...
- 用户空间网络提升 NFV 的性能
本文是一篇翻译,翻译自https://software.intel.com/en-us/blogs/2015/06/12/user-space-networking-fuels-nfv-perform ...
- linux nfs远程挂载和卸载
一.nfs远程挂载 1.首先确定服务端(实体挂载节点)的IP 2.通过cat /etc/hosts 查看服务端的server name 3.mount -t nfs servername:/挂载文件 ...
- php实现远程网络文件下载到服务器指定目录(方法一)
PHP实现远程网络文件下载到服务器指定目录(方法一) <?php function getFile($url, $save_dir = '', $filename = '', $type = 0 ...
- iOS 播放远程网络音乐的核心技术点
一.前言 这两天做了个小项目涉及到了远程音乐播放,因为第一次做这种音乐项目,边查资料边做,其中涉及到主要技术点有: 如何播放远程网络音乐 如何切换当前正在播放中的音乐资源 如何监听音乐播放的各种状态( ...
随机推荐
- [hihocoder][Offer收割]编程练习赛64
公平划分 若条件满足,则所有数异或和为零,这时候随便分都可以,答案为2^n-2,否则答案为0 #pragma comment(linker, "/STACK:102400000,102400 ...
- js中添加node.js语法支持
File——>settings
- Codeforces_The least round way
B. The least round way time limit per test 2 seconds memory limit per test 64 megabytes input standa ...
- 怎么设置font awesome图标的大小?
<i class="fa fa-camera-retro fa-lg"></i> fa-lg <i class="fa fa-camera- ...
- CAD保存DWG文件,设置保存的文件版本号和密码
主要用到函数说明: MxDrawXCustomFunction::Mx_SaveDwgEx 保存DWG文件,可以设置保存的文件版本号和密码,详细说明如下: 参数 说明 IN CString sFile ...
- iptables详解(4):iptables匹配条件总结之一
所属分类:IPtables Linux基础 在本博客中,从理论到实践,系统的介绍了iptables,如果你想要从头开始了解iptables,可以查看iptables文章列表,直达链接如下 iptab ...
- c++ map迭代器
#include <stdio.h> #include <map> using namespace std; int main(){ map<int, int> m ...
- js 计算是今天多少周
/** * 判断年份是否为润年 * * @param {Number} year */ function isLeapYear(year) { return (year % 400 == 0) || ...
- zk strom 本地环境启动命令
bin/zkServer.sh statusbin/zkServer.sh startbin/storm nimbus &bin/storm ui &bin/storm drpc &a ...
- Python模块 os.walk
Os.walk os.walk(top,topdown=True,onerror=None,followlinks=False) os.walk()是python中内置(built-in)的目录树生成 ...