When building an embedded NFS, the system on the embedded development board must support the NFS client.
1. Download and install NFS on the computer server
$ Sudo apt-Get install nfs-kernel-server Portmap
2. Configure shared files
A folder on the server (Computer) is used as a shared folder, which will be accessed by the client (Development Board) through the Network File System NFS in the future. Here I use/work/nfs_root as the shared directory.
Open the configuration file
$ Sudo gedit/etc/exports
Add the following sentence to the end of the file.
/Tmp * (RW, sync, no_root_squash)
Note that there must be spaces between nfs_root and. There is no space between the "*" and. * Indicates the IP address. * Indicates that all network segments can be accessed. RW indicates the read/write permission. Save.
3. Restart the NFS service.
Sudo/etc/init. d/Portmap restart
Sudo/etc/init. d/nfs-kernel-server restart
4. You can perform this test after the server is installed.
Local test: $ sudo Mount 192.168.74.38:/tmp/mnt
After the command is executed, the files in my shared directory can be found in the MNT directory.
In this way, NFS should be set up successfully. 192.168.74.38 is the IP address of the server (computer.
5. Connect the client (Development Board) to the server
Plug the client (Development Board) into the network and set the IP address.
Enter:
# Mount-T nfs-O nolock 192.168.74.38:/tmp/mnt
If no output exists, the connection is successful.
# Cd/mnt
# Ls
You can see the contents in the shared directory of my host in this directory. In this way, the NFS connection is successful.
Modify the Development Board IP Address: Under jaffs/startup. Sh.