The NFS Network File System is mounted on the A8 board.

Source: Internet
Author: User

The NFS Network File System is mounted on the A8 board.

I admit that I am a newbie. I have no network knowledge to mount the nfs Network File System. It takes five days to mount the nfs Network File System on the A8 board, implements file sharing between A8 boards and virtual machines. Share your personal experience:

The following describes the nfs-based installation.

Board wiring problem: I connected both the Board and the computer to the same vro and ensured that my gateway is 192.168.0.1 in the same network segment, therefore, my computer, virtual machine, and board gateway are the same. My computer ip address is 192.168.0.111, the virtual machine ip is 192.168.0.121, and the Board ip is 192.168.0.120. *. Haha, they are in the same CIDR block.

Command explanation

Ifconfig (the network information such as IP address and gateway is actually viewed on the virtual machine. In the window, you can use ipconfig to view the information)

How to start an NFS File System

Step 1. PC Virtual Machine terminal settings

① Set the Virtual Machine IP Address

[Root @ localhost rootfs] # ifconfig eth0 192.168.0.121

This is to modify the IP address of a virtual machine.

② Start the NFS server

[Root @ localhost rootfs] #/etc/init. d/nfs restart

③ Set the NFS shared directory

[Root @ localhost rootfs] # vim/etc/exports

/* Write the following content to the/etc/exports file */

/Rootfs * (rw, sync, no_root_squash)

Note: rootfs is the root directory of the nfs file system you share. It is equivalent to root. What do you know in the folder? bin, sbin, usr, and so on, not your image file. Don't get it wrong. I 've been dragged by this problem for many days. The files on the net peak are in: source code/porting part/after transplantation code/root file system/

This file is used:

Rw: read/write permission. the read-only permission is ro.

Sync: data is written to the memory or hard disk synchronously. You can also use async. At this time, data is saved to the memory and not written to the hard disk.

No_root_squash: Specifies the attribute of the NFS server shared directory. If the user is root, the root permission is granted to the shared directory.

Step 2. Select [1] to download u-boot to NAND FLASH

Step 3. Select [2] to download kernel to NAND FLASH

Ps: If you have downloaded the yaffs2 file system, it will not be affected if the following settings are completed.

After the preceding two writes are completed, press q to enter the u-boot command line. Input printenv: You can view your current environment variables.

Step 4. Enter the u-boot environment variable to set the IP address

① Set the development board IP Address

[Webee_210] # set ipaddr 192.168.0.120

② Set the pc ip address (also set in the u-boot command line)

[Webee_210] # set serverip 192.168.0.121 // set the Virtual Machine ip address as the server

[Webee_210] # set gatewayip 192.168.0.1 // set the A8 Gateway

③ Set NFS startup parameters

[Webee_210] # setenv bootargs noinitrd root =/dev/nfs

Nfsroot = 192.168.0.121:/webee, tcp

Ip = 192.168.0.120: 192.168.0.121: 192.168.0.1: 255.255.255.0: eth0: off init = linuxrc

Console = fig, 115200

What are the meanings of each parameter?

Root =/dev/nfs, // indicates the mounted nfs File System

Nfsroot = 192.168.0.121:/webee, tcp // indicates the Virtual Machine IP Address: directory to be shared by the Virtual Machine

Ip = 192.168.0.120: 192.168.0.121: 192.168.0.1: 255.255.255.0: eth0: off // indicates the Board IP Address: Virtual Machine IP address (server): gateway IP Address: mask: eth0: off

④ Write the newly set parameters to NAND FLASH

[Webee_210] # saveenv

You can use printenv to view the parameters.

We can see that many environment variables above are set by ourselves.

In this step, you can ping each other on a computer, virtual machine, or board to find the following situation. This is normal:

Computer ping failure

Virtual Machine ping board failure

Board ping computer connection

Board ping VM connection

Virtual Machine ping

Ping the VM on the computer

Paste an image

⑤ Read the Linux kernel from nand flash into the memory and then start the kernel.

[Webee_210] # nand read 0x2000 7fc0 0x100000 0x500000

⑥ Enable NFS Kernel

[Webee_210] # bootm 0x20007fc0

After startup

As shown above, VFS: mount root (nfs filesystem) ondevice 0: 9 indicates that the nfs file system has been mounted successfully.

In this step, you can ping each other on a computer, virtual machine, or board to find the following situation. This is normal:

Computer ping Board

Virtual Machine ping Board Sub-pass

Board ping computer connection

Board ping VM connection

Virtual Machine ping

Ping the VM on the computer

SMD

Board ping computer, gateway, Virtual Machine

Virtual Machine ping Board

Computer ping Board

Haha, is it successful?

Try to create a new 123. c file on the board

Check whether the VM has

If yes, the operation is successful.

-------------------------------------- Split line --------------------------------------

Install NFS server in Ubuntu 12.04

Install and configure the NFS server to share the Ubuntu 12.04 and ARM files.

Build an nfs server in Ubuntu

File Server NFS configuration details

Build an NFS Network File System server in Ubuntu

Heartbeat_ldirector + LB + NFS for HA, LB, and file sharing

How to Configure NFS server in CentOS 5.5

Install and use NFS in Ubuntu 12.10

-------------------------------------- Split line --------------------------------------

This article permanently updates the link address:

Related Article

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.