Chapter 23. Setting up a Remote Diskless System

To set up a basic remote diskless system booted over PXE, you need the following packages:
  • tftp-server
  • xinetd
  • dhcp
  • syslinux
  • dracut-network

    Note

    After installing the dracut-network package, add the following line to /etc/dracut.conf:
    add_dracutmodules+="nfs"
Remote diskless system booting requires both a tftp service (provided by tftp-server) and a DHCP service (provided by dhcp). The tftp service is used to retrieve kernel image and initrd over the network via the PXE loader.

Note

SELinux is only supported over NFSv4.2. To use SELinux, NFS must be explicitly enabled in /etc/sysconfig/nfs by adding the line:
RPCNFSDARGS="-V 4.2"
Then, in /var/lib/tftpboot/pxelinux.cfg/default, change root=nfs:server-ip:/exported/root/directory to root=nfs:server-ip:/exported/root/directory,vers=4.2.
Finally, reboot the NFS server.
The following sections outline the necessary procedures for deploying remote diskless systems in a network environment.

Important

Some RPM packages have started using file capabilities (such as setcap and getcap). However, NFS does not currently support these so attempting to install or update any packages that use file capabilities will fail.

23.1. Configuring a tftp Service for Diskless Clients

The tftp service is disabled by default. To enable it and allow PXE booting via the network, set the Disabled option in /etc/xinetd.d/tftp to no. To configure tftp, perform the following steps:

Procedure 23.1. To Configure tftp

  1. The tftp root directory (chroot) is located in /var/lib/tftpboot. Copy /usr/share/syslinux/pxelinux.0 to /var/lib/tftpboot/, as in:
    cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
  2. Create a pxelinux.cfg directory inside the tftp root directory:
    mkdir -p /var/lib/tftpboot/pxelinux.cfg/
You will also need to configure firewall rules properly to allow tftp traffic; as tftp supports TCP wrappers, you can configure host access to tftp via /etc/hosts.allow. For more information on configuring TCP wrappers and the /etc/hosts.allow configuration file, refer to the Red Hat Enterprise Linux 7 Security Guide; man hosts_access also provides information about /etc/hosts.allow.
After configuring tftp for diskless clients, configure DHCP, NFS, and the exported file system accordingly. Refer to Section 23.2, “Configuring DHCP for Diskless Clients” and Section 23.3, “Configuring an Exported File System for Diskless Clients” for instructions on how to do so.