NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
NFS Setup
Purpose[edit]
The purpose of this wiki page is to outline the steps to setup a Network File System (NFS) server on an Ubuntu 12.04 LTS development PC. NFS is typically used when you have the filesystem for an embedded device, residing on a development PC. The filesyste
Naming Convention[edit]
UbuntuHost$
This resembles the linux terminal window on the Ubuntu PC
EmbeddedDevice$
This represents the linux terminal windown on the TI embedded device you are using
< >
Anything within a pair of triangular brackets is a variable that changes from environment-to-environment, so you would enter what makes sense for your environment. Example, directory names, IP addresses, etc.
NFS Server on Ubuntu[edit]
Open 'Terminal' in Ubuntu
1. Install the 'nfs-kernel-server' package. This is done as:
UbuntuHost$ sudo apt-get install nfs-kernel-server
2. Your Ubuntu PC might already have a firewall enabled, but if not, it is a good idea to install and enable one to prevent unauthorized network accesses. Install the 'ufw' firewall package and then enable the firewall as follows:
UbuntuHost$ sudo apt-get install ufw UbuntuHost$ sudo ufw enable
3. You should have already created a directory on your Ubuntu PC where the file system for your embedded device resides. If you have not done so, please copy the filesystem zip provided by TI for the embedded device you plan to use, and paste it in a directory on your Ubuntu PC. Unzip the contents in this directory. Let's assume that you create the directory '/nfshost' and unzip the contents in here. Edit the NFS server configuration file as
UbuntuHost$ sudo gedit /etc/exports
This will open the file in edit mode. Add the following line to the file. Please replace '/nfshost' in the line below with the directory path where you have unzipped the TI embedded device's filesystem
/nfshost *(rw,subtree_check,no_root_squash,no_all_squash,sync)
4. In this step, we bind the NFS service (mountd) to a static port number. This is done as follows:
UbuntuHost$ gedit /etc/default/nfs-kernel-server
Comment out the following line
RPCMOUNTDOPTS=--manage-gids
and add the following line
RPCMOUNTDOPTS="-p 13100"
Note that 13100 is a port number that is selected randomly. Most likely, this is not used by your Ubuntu PC for any other services, but it is best to double check. To do this, please check the contents of the file /etc/services as follows:
UbuntuHost$ cat /etc/services
If you see the number 13100 listed in this file, please change the line in /etc/default/nfs-kernel-server to something else that is not used
5. Now, restart the nfs-kernel-server as follows
UbuntuHost$ service nfs-kernel-server restart
6. Add an exception to the firewall to allow incoming requests on port 13100 (or whatever port number you set in step #4 above). Please replace the variable <IP address of Ubuntu PC> in the command below with your PC's IP:
ufw allow from <IP address of Ubuntu PC>/24 to any port 111 ufw allow from <IP address of Ubuntu PC>/24 to any port 2049 ufw allow from <IP address of Ubuntu PC>/24 to any port 13100
7. Please note that if you plan to use TFTP as well, you will also have to add an exception for port 69. Please replace the variable <IP address of Ubuntu PC> in the command below with your PC's IP:
ufw allow from < IP address of Ubuntu PC >/24 to any port 69
You should now have your NFS server running successfully on your Ubuntu 12.04 LTS PC
NFS Client Setup[edit]
Please refer to the device-specific user guide on how to setup the NFS client on your TI embedded device. This is typically provided in the Getting Started Guide. Some client setups are included below
References[edit]