During embedded Linux development, NFS is often used to facilitate program debugging. With NFS, you can place the root file system used by the Board under the host directory. The Development Board mounts the file to this directory over Ethernet and uses the file under this directory as the content of the root file system, in this way, the user's program can be re-used without having to re-burn the root file system of the writing board, which can greatly speed up program debugging. To install the NFS server in Ubuntu, follow these steps: 1. Install the NFS server and client: apt-get
During embedded Linux development, NFS is often used to facilitate program debugging. With NFS, you can place the root file system used by the Board under the host directory. The Development Board mounts the file to this directory over Ethernet and uses the file under this directory as the content of the root file system, in this way, the user's program can be re-used without having to re-burn the root file system of the writing board, which can greatly speed up program debugging.
To install the NFS server in Ubuntu, follow these steps:
1. Install the NFS server and client:
Apt-get install nfs-kernel-server nfs-common portmap
The client can be installed to test the NFS service on the local machine.
2. Configure portmap
You can choose either of the two methods:
(1) emacs, etc/default/portmap
Remove-I 127.0.0.1
(2) dpkg-reconfigure portmap
Select "no" after running"
In addition, it is very important to use the sysv-rc-conf tool to check the status of the current nfs and portmap. If it is off, use sysv-rc-conf portmap on and sysv-rc-conf nfs-kernel-server on.
3. Configure the Mount directory and permissions
Emacs/etc/exports
Add
/Nfs * (rw, sync)
Explanations:
/Nfs is the NFS shared directory. * indicates that any IP Address can share this directory. You can change it to a restricted IP address. rw indicates permissions and sync indicates default permissions.
4. Update the exports file
If you update/etc/exports, you can update this file through exportfs-r.
5. Restart the NFS service.
/Etc/init. d/nfs-kernel-server restart NFS service
6. Test
Try mounting a local disk (My Ubuntu system IP address is 192.168.0.3 and/nfs is mounted to/mnt)
Mount 192.168.0.3:/nfs/mnt
Run df to view results
Umount/mnt