Show Table of Contents
24.3. Configuring an Exported File System for Diskless Clients
Prerequisites
- Install the necessary packages. See Chapter 24, Setting up a Remote Diskless System
- Configure the
tftpservice. See Section 24.1, “Configuring a tftp Service for Diskless Clients”. - Configure DHCP. See Section 24.2, “Configuring DHCP for Diskless Clients”.
Procedure
- The root directory of the exported file system (used by diskless clients in the network) is shared via NFS. Configure the NFS service to export the root directory by adding it to
/etc/exports. For instructions on how to do so, see the Section 8.7.1, “The/etc/exportsConfiguration File”. - To accommodate completely diskless clients, the root directory should contain a complete Red Hat Enterprise Linux installation. You can either clone an existing installation or install a new base system:
- To synchronize with a running system, use the
rsyncutility:#rsync -a -e ssh --exclude='/proc/*' --exclude='/sys/*' \ hostname.com:/exported-root-directory- Replace hostname.com with the hostname of the running system with which to synchronize via
rsync. - Replace exported-root-directory with the path to the exported file system.
- To install Red Hat Enterprise Linux to the exported location, use the
yumutility with the--installrootoption:#yum install @Base kernel dracut-network nfs-utils \ --installroot=exported-root-directory --releasever=/
The file system to be exported still needs to be configured further before it can be used by diskless clients. To do this, perform the following procedure:
Procedure 24.2. Configure File System
- Select the kernel that diskless clients should use (
vmlinuz-kernel-version) and copy it to thetftpboot directory:#cp /boot/vmlinuz-kernel-version /var/lib/tftpboot/ - Create the
initrd(that is,initramfs-kernel-version.img) with NFS support:#dracut --add nfs initramfs-kernel-version.img kernel-version - Change the initrd's file permissions to 644 using the following command:
#chmod 644 initramfs-kernel-version.imgWarning
If the initrd's file permissions are not changed, thepxelinux.0boot loader will fail with a "file not found" error. - Copy the resulting
initramfs-kernel-version.imginto thetftpboot directory as well. - Edit the default boot configuration to use the
initrdand kernel in the/var/lib/tftpboot/directory. This configuration should instruct the diskless client's root to mount the exported file system (/exported/root/directory) as read-write. Add the following configuration in the/var/lib/tftpboot/pxelinux.cfg/defaultfile:default rhel7 label rhel7 kernel vmlinuz-kernel-version append initrd=initramfs-kernel-version.img root=nfs:server-ip:/exported/root/directory rw
Replaceserver-ipwith the IP address of the host machine on which thetftpand DHCP services reside.
The NFS share is now ready for exporting to diskless clients. These clients can boot over the network via PXE.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.