NFS挂载网络文件系统
来源:互联网 发布:mysql bit类型比较 编辑:程序博客网 时间:2024/05/17 08:43
1.首先将电脑本地ip、ubuntu虚拟系统ip、开发板的ip地址设在同一网段,通过路由器连接开发板和电脑,然后互ping确保三者互联。
2.重新启动开发板进入boot菜单,按q退出菜单,输入print
命令可以看到打印信息:
其中:
bootargs=noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
表示文件系统的启动位置,在后面步骤中将其换成在网络中虚拟ubuntu上的文件系统即可。
3.在命令行设置ipaddr和serverip
set ipaddr 202.204.53.71
set serverip 202.204.53.70
然后用save
命令保存。
4.linux-2.6.22.6\Documentation\nfsroot.txt文件中的指示设置网络文件系统位置如何进行设置:
When the kernel has been loaded by a boot loader (see below) it needs to betold what root fs device to use. And in the case of nfsroot, where to findboth the server and the name of the directory on the server to mount as root.This can be established using the following kernel command line parameters:root=/dev/nfs This is necessary to enable the pseudo-NFS-device. Note that it's not a real device but just a synonym to tell the kernel to use NFS instead of a real device.nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>] If the `nfsroot' parameter is NOT given on the command line, the default "/tftpboot/%s" will be used. <server-ip> Specifies the IP address of the NFS server. The default address is determined by the `ip' parameter (see below). This parameter allows the use of different servers for IP autoconfiguration and NFS. <root-dir> Name of the directory on the server to mount as root. If there is a "%s" token in the string, it will be replaced by the ASCII-representation of the client's IP address. <nfs-options> Standard NFS options. All options are separated by commas. The following defaults are used: port = as given by server portmap daemon rsize = 4096 wsize = 4096 timeo = 7 retrans = 3 acregmin = 3 acregmax = 60 acdirmin = 30 acdirmax = 60 flags = hard, nointr, noposix, cto, acip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf> This parameter tells the kernel how to configure IP addresses of devices and also how to set up the IP routing table. It was originally called `nfsaddrs', but now the boot-time IP configuration works independently of NFS, so it was renamed to `ip' and the old name remained as an alias for compatibility reasons. If this parameter is missing from the kernel command line, all fields are assumed to be empty, and the defaults mentioned below apply. In general this means that the kernel tries to configure everything using autoconfiguration. The <autoconf> parameter can appear alone as the value to the `ip' parameter (without all the ':' characters before) in which case auto- configuration is used. <client-ip> IP address of the client. Default: Determined using autoconfiguration. <server-ip> IP address of the NFS server. If RARP is used to determine the client address and this parameter is NOT empty only replies from the specified server are accepted. Only required for for NFS root. That is autoconfiguration will not be triggered if it is missing and NFS root is not in operation. Default: Determined using autoconfiguration. The address of the autoconfiguration server is used. <gw-ip> IP address of a gateway if the server is on a different subnet. Default: Determined using autoconfiguration. <netmask> Netmask for local network interface. If unspecified the netmask is derived from the client IP address assuming classful addressing. Default: Determined using autoconfiguration. <hostname> Name of the client. May be supplied by autoconfiguration, but its absence will not trigger autoconfiguration. Default: Client IP address is used in ASCII notation. <device> Name of network device to use. Default: If the host only has one device, it is used. Otherwise the device is determined using autoconfiguration. This is done by sending autoconfiguration requests out of all devices, and using the device that received the first reply. <autoconf> Method to use for autoconfiguration. In the case of options which specify multiple autoconfiguration protocols, requests are sent using all protocols, and the first one to reply is used. Only autoconfiguration protocols that have been compiled into the kernel will be used, regardless of the value of this option. off or none: don't use autoconfiguration (default) on or any: use any protocol available in the kernel dhcp: use DHCP bootp: use BOOTP rarp: use RARP both: use both BOOTP and RARP but not DHCP (old option kept for backwards compatibility) Default: any
按照以上指示在命令行输入:
set bootargs noinitrd root=/dev/nfs nfsroot=202.204.53.70:/home/lvxiao/Nfs/fs_mini ip=202.204.53.71:202.204.53.70:202.204.53.1:255.255.255.0: :eth0:off init=/linuxrc console=ttySAC0
表示利用ubuntu系统上/home/lvxiao/Nfs文件夹下的fs_mini文件系统启动开发板,然后输入save
命令保存,重新启动。
注意:同时确保在内核中配置了对NFS网络文件系统启动的支持。
1 0
- NFS挂载网络文件系统
- nfs挂载网络文件系统,常用命令
- Linux使用NFS(网络文件系统)挂载网络磁盘
- nfs文件系统挂载
- NFS 文件系统挂载
- nfs网络文件系统挂载笔记整理1
- DevKit8500开发板-NFS挂载网络文件系统
- NFS(网络文件系统)服务器搭建及挂载
- 网络文件系统nfs文件系统使用
- 网络文件系统nfs文件系统使用
- NFS (网络文件系统)
- 使用网络文件系统(NFS)
- 关于网络文件系统NFS
- NFS网络文件系统配置
- 网络文件系统(NFS)
- 网络文件系统nfs
- NFS网络文件系统
- NFS-网络文件系统
- 第五次作业
- (4.1.23.6)自定义控件三部曲之动画篇(四)——ValueAnimator基本使用
- Leetcode Everyday: 346. Moving Average from Data Stream
- 【CodeForces 626C】Block Towers
- POJ1064
- NFS挂载网络文件系统
- (4.1.23.7) 自定义控件三部曲之动画篇(五)——ValueAnimator高级进阶(一)
- 百度之星 2015资格赛 列变位法解密【字符串】
- hdu 2586 How far away ?【rmq+lca】
- ecshop二次开发--节日关怀
- Java学习-选择排序1-直接选择排序
- POJ1146 ID Codes(next_permutation全排列)
- HOG特征描述算子
- 1001. A+B Format (20)