24.3. Configuring an Exported File System for Diskless Clients
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, refer to Section 9.7.1, “The
To accommodate completely diskless clients, the root directory should contain a complete Red Hat Enterprise Linux installation. You can synchronize this with a running system via
rsync, as in:
# rsync -a -e ssh --exclude='/proc/*' --exclude='/sys/*' hostname.com:/ /exported/root/directory
hostname.comwith the hostname of the running system with which to synchronize via
/exported/root/directoryis the path to the exported file system.
Alternatively, you can also use
--installrootoption to install Red Hat Enterprise Linux to a specific location. For example:
yum groupinstall Base --installroot=/exported/root/directory
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
- Configure the exported file system's
/etc/fstabto contain (at least) the following configuration:
none /tmp tmpfs defaults 0 0 tmpfs /dev/shm tmpfs defaults 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0
- Select the kernel that diskless clients should use (
vmlinuz-kernel-version) and copy it to the
# cp /boot/vmlinuz-kernel-version /var/lib/tftpboot/
- Create the
initramfs-kernel-version.img) with network support:
# dracut initramfs-kernel-version.img kernel-versionCopy the resulting
tftpboot directory as well.
- Edit the default boot configuration to use the
initrdand kernel inside
/var/lib/tftpboot. This configuration should instruct the diskless client's root to mount the exported file system (
/exported/root/directory) as read-write. To do this, configure
/var/lib/tftpboot/pxelinux.cfg/defaultwith the following:
default rhel6 label rhel6 kernel vmlinuz-kernel-version append initrd=initramfs-kernel-version.img root=nfs:server-ip:/exported/root/directory rwReplace
server-ipwith the IP address of the host machine on which the
tftpand DHCP services reside.
The NFS share is now ready for exporting to diskless clients. These clients can boot over the network via PXE.