Nfs startup Development Board

Source: Internet
Author: User

The establishment of an NFS development environment involves two aspects: Configuring the NFS server and configuring the client.

 

---------------- InPCOn-board (NFS server )-----------------

 

1. Ensure that the NFS service is installed by checking whether NFS files exist in the/etc/rc. d/init. d directory.

2. Edit exports

# Gedit/etc/exports

Add the following content:

/Opt/liuxb2440/root_liuxb * (RW, sync, no_root_squash)

Where:

/Opt/liuxb2440/root_liuxb indicates the NFS shared directory, which is mounted to the root file system of the Development Board through NFS;

* Indicates that all clients can mount the directory;

RW indicates that the Client Connected to this directory has the permission to read and write the directory;

No_root_squash indicates that the Client Connected to this directory is allowed to have the root identity of the host.

You can set the following parameters:
RW: read/write permission;
RO: Read-Only permission;
Sync: data is synchronized to the storage.
Async: The data is temporarily stored in the memory and not directly written to the hard disk.

3.. Make the modification of the/etc/exports file take effect

After NFS is started,/etc/exports is modified. Do you want to restart NFS? At this time, we can use the exportfs command to make the change take effect immediately. The command format is as follows: exportfs [-aruv]
-A: All content in Mount or unmount/etc/exports
-R: Re-mount the directory shared in/etc/exports
-U: umount directory
-V: when the export is used, the detailed information is output to the screen.
Example: the command line exportfs-RV must be output again.
Run this command every time you modify the/etc/exports file.

4. Disable the firewall and enable the NFS service

# Lokkit (or # setup)

#/Etc/init. d/nfs start (or # service NFS start)

Then configure the kernel to support the NFS file system. (Omitted)

------------------------- In the Super Terminal --------------------------

 

(Set to start from NAND Flash, press any key from K1 to K6 at startup, and the BIOS interface appears to go to Vivi)

Supervivi>Param set linux_cmd_line "console = ttysac0 root =/dev/nfs nfsroot = 192.168.1.108:/opt/print/root_liuxb IP = 192.168.1.70: 192.168.1.108: 192.168.1.1: 255.255.255.0: Disabled: eth0: off"

Here, Param set linux_cmd_line is the command parameter for Linux Startup. The meanings of parameters are as follows:

The nfsroot is the IP address of the host.

IP = 192.168.1.70 ---------- temporary IP address of the target board

192.168.1.108 ------------ IP address of the host

192.168.1.1 ------------- GW on the target board

255.255.255.0 ----------- is the subnet mask;

Sbc2440.arm9.net -------- Host Name (enter it as needed)

Eth0 --------------------- name of the NIC Device

 

Supervivi>Boot ----------------------------

# Mount-T nfs-O nolock 192.168.1.108:/opt/liuxb2440/root_liuxb/mnt

The following are some problems encountered during the work:

Possible causes for failed nfs startup: 1. If the Kernel configuration is incorrect, select support for MTD. 2. The network configuration in the NFS file system is incorrect. Ensure that the network is in the same CIDR block as the host. The location of the configuration file may be different. In/ltib/etc/rc. d/rc. conf.

 

Some work records:

1. VI/etc/hosts host name and IP binding

# Do not remove the following line, or various programs
# That require Network functionality will fail.

172.16.1.196 (board) ftpserver ftp120

2. VI/etc/exports shared Configuration
/Tftpboot 172.16.1.196/255.255.255.0 (RW, no_root_squash, async)

3. showmount-E [IP]: View NFS resource sharing on the client
CAT/var/lib/nfs/etab view local Resource Sharing

/Etc/rc. d/init. d/nfs restart Restart service

 

 

RedHat parameter settings:

Set clock frequency
Clock 266

Download zimage from the server through TFTP
Load-r-v-B 0x100000 zimage

Load kernel files in local flash
The command is used to load the kernel. the kernel is the partition name when the kernel partition is created.

Run the kernel and pass the startup parameters (local flash jffs2 file system startup)
Exec-B 0x100000-l 0x200000-c "console = ttymxc0 root =/dev/mtdblock2 rootfstype = jffs2 RW init =/linuxrc"

Run the kernel and pass the startup parameters (Network NFS File System)
Exec-B 0x100000-l 0x200000-c "noinitrd console = ttymxc0, 115200 root =/dev/nfs nfsroot = 172.16.1.166: /tftpboot/ltib init =/linuxrc IP = 172.16.1.189: 172.16.1.166"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.