Diskless Client SL60
====================

Procedure
---------

Select the kernel that diskless clients should use
(vmlinuz-kernel-version) and copy it to the tftp boot directory::

    # cp /boot/vmlinuz-2.6.32-220.4.1.el6.i686 /afs/psi.ch/service/linux/tftpboot/dl/sl60/i386/


Create the initrd (i.e. initramfs-kernel-version.img) with network support::

    # yum install dracut-network
    # dracut initramfs-dl-2.6.32-220.4.1.el6.i686.img 2.6.32-220.4.1.el6.i686


Copy the resulting initramfs-kernel-version.img into the tftp boot directory as well::

    # cp /tmp/initramfs-dl-2.6.32-220.4.1.el6.i686.img /afs/psi.ch/service/linux/tftpboot/dl/sl60/i386/

Edit the default boot configuration to use the initrd and 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/default` with the following::

    label sl6dl
      kernel dl/sl60/i386/vmlinuz-2.6.32-220.4.1.el6.i686
      append initrd=dl/sl60/i386/initramfs-dl-2.6.32-220.4.1.el6.i686.img root=nfs4:129.129.190.91:/dl/sl60/i386/base rw


Replace server-ip with the IP address of the host machine on which the
tftp and DHCP services reside.  The NFS share is now ready for
exporting to diskless clients. These clients can boot over the network
via PXE.

From the manual::
  
     22.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 12.7.1, “ The /etc/exports Configuration File”.
     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
     Replace hostname.com with the hostname of the running system with which to synchronize via rsync. The /exported/root/directory is the path to the exported file system.
     Alternatively, you can also use yum with the --installroot option 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 22.2. Configure file system
     Configure the exported file system's /etc/fstab to 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
