Chapter 24. Setting up a Remote Diskless System
Chapter 24. 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 : 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. 24.1. Configuring a tftp Service for Diskless Clients Prerequisites Install the necessary packages. See Chapter 24, Setting up a Remote Diskless System Procedure To configure tftp , perform the following steps: Procedure 24.1. To Configure tftp Enable PXE booting over the network: The tftp root directory ( chroot ) is located in /var/lib/tftpboot . Copy /usr/share/syslinux/pxelinux.0 to /var/lib/tftpboot/ : Create a pxelinux.cfg directory inside the tftp root directory: Configure firewall rules to allow tftp traffic. As tftp supports TCP wrappers, you can configure host access to tftp in the /etc/hosts.allow configuration file. For more information on configuring TCP wrappers and the /etc/hosts.allow configuration file, see the Red Hat Enterprise Linux 7 Security Guide . The hosts_access (5) also provides information about /etc/hosts.allow . Steps After configuring tftp for diskless clients, configure DHCP, NFS, and the exported file system accordingly. For instructions on configuring the DHCP, NFS, and the exported file system, see Section 24.2, "Configuring DHCP for Diskless Clients" and Section 24.3, "Configuring an Exported File System for Diskless Clients" .
add_dracutmodules+=" nfs" systemctl enable --now tftp cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ mkdir -p /var/lib/tftpboot/pxelinux.cfg/