Tux
Communication
Mailing lists
Documentation
User Manual
Target board info.
Target chip info.
Support
Linux support
Bugzilla
Downloads
STLinux
Updates
Search
Google


The web
stlinux.com
Getting Started Guide
Network File System (NFS)
Setting up the NFS server
ST Logo
Previous   Contents   Next


Setting up the NFS server

Depending on the options chosen when installing the Linux distribution, the NFS server may already be installed and running. To check this, log onto the host PC and type:

host# chkconfig  --list  portmap
host# chkconfig --list nfs
host# chkconfig --list nfslock

Each of these three commands should print a line such as:

portmap 0:off 1:off 2:off 3:on 4:on 5:on 6:off

If the error message "No such file or directory" is printed then these packages are not installed and you will need to install them from the RPMs for your host distribution, which have names like portmap-4.0-19 and nfs-utils-0.1.9.1-1 (actual version numbers will depend on the distribution). See the documentation for your host distribution for details of how to install these packages.

Once the RPMs have been installed, repeat the chkconfig commands above. If the services are still listed as off for run levels 3, 4 and 5 then start them with the commands:

host# chkconfig  portmap on
host# chkconfig nfs on
host# chkconfig nfslock on

When the services are running, the NFS server must be told which file systems to make available to other machines. To do this, edit the file /etc/exports (create it if it does not already exist) and add a line describing each directory to be exported and the associated permissions. This should look something like:

/opt/STM/ST40Linux-2.0/devkit/sh4/target *(rw,no_root_squash,async)

If the root file system has been copied elsewhere replace the name of the root directory with the root of the copied directory tree.

The last thing to be checked is whether a firewall is running. Recent versions of many Linux distributions install a firewall by default, and most of these have a very conservative rule set. In general this is a good thing, as it helps to keep the host PC secure if it is connected to the Internet. However, this usually prevents the target connecting to the NFS server as, with the default configuration, NFS is not considered secure.

Reconfiguring a firewall to permit the safe use of NFS is beyond the scope of these instructions. However, if additional security is in place (for example, a corporate firewall) it should be safe to disable the firewall on the host PC completely.

Most Linux firewalls are based around ipchains or iptables. To check if either of these are in use, enter:

host# chkconfig  --list  ipchains
host# chkconfig --list iptables

If a line is displayed listing this service as on in one or more run levels it can be disabled by typing (for example):

host# chkconfig --del iptables

Finally, reboot the PC to get the NFS services started.

Previous   Contents   Next
Valid HTML 4.01! Last updated: 2005/10/07 20:56:57
© Copyright STMicroelectronics Limited, 2005
Printer