compared with
Current by Nata Ramanenka
on Mar 05, 2012 01:47.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (36)

View Page History

NFS server is used to keep the read-only image of PXE boot file system. To install NFS server on the Linux distribution that supports yum, such as Fedora, CentOS, and RedHat, run the following command:
{code}
yum -y install nfs-utils
{code}yum -y install nfs-utils{code}
{code}
!yum-y-install.png!
 
Other Linux distributions have their own methods of software installation. For example, on distributions that support aptitiude, such as Debian and Ubuntu, NFS server can be installed with the command
{code}
apt-get install nfs-kernel-server
{code}apt-get install nfs-kernel-server{code}
{code}
!apt-get.png!

After the installation, you will have to create NFS share. NFS share is just a directory that can be mounted from remote clients. It is recommended that NFS share directory is not used for any other purposes. Create the directory to be shared over NFS with the command
{code}
mkdir /nfsroot
{code}mkdir /nfsroot{code}
{code}
 
After creating the directory, open the file {color:blue}/etc/exports{color} in your favorite text editor.

This file contains a list of NFS shares, IP addresses they can be mounted from, type of access (read-only or read-write), and other sharing options. Let's assume that your IP subnet with the servers for Bare-Metal Restore is {color:blue}192.168.5.0/24{color}. Add to {color:blue}/etc/exports{color} the following line:
{code}
/nfsroot 192.168.5.0/24(ro,no_root_squash,no_subtree_check)
{code}/nfsroot 192.168.5.0/24(ro,no_root_squash,no_subtree_check){code}
{code}
!nfsroot.png!
 
Save the file and run the following command:
{code}
exportfs -r
{code}exportfs -r{code}
{code}
Then you can start NFS service by executing the following command:
{code}
/etc/init.d/nfs start
{code}/etc/init.d/nfs start{code}
{code}
To make sure your NFS share is visible to the client, run the following command on NFS server:
{code}
showmount -e
{code}showmount -e{code}
{code}
!exportfs.png!

The command should return something like this:
{code}
{code}Export list for pxeserver:
/nfsroot 192.168.5.0/24{code}
{code}
{info:title=Note}NFS service depends on the portmap service and usually will not work if portmap is not running. But this dependency is not always hardcoded into the startup script, so sometimes the script will try to start NFS service without trying to find out if portmap is already started and start it if it is not. In such case NFS will fail to start. So if for any reason NFS service fails to start, try to start portmap first by executing the command
{code}
/etc/init.d/portmap start
{code}/etc/init.d/portmap start{code}
{code}
{info}
Now you can proceed to [Installing PXE Network Boot].