tmpfs root for diskless clients
Using initrd to create root partition in RAM (tmpfs)
- create /etc/client_etc where you collect all the files and directories that should be different between NFS server and diskless clients. Partial list:
- cron.d/
- cron.daily/
- cron.weekly/
- default/
- init.d/
- network/
- rc*.d/
- exports
- fstab
- inetd.conf
- inittab
- ntp.conf
- rc.local
- syslog.conf
- copy initramfs-tools from /etc to /etc/client_etc and add the following scripts to it in /etc/client_etc/initramfs-tools : conf.d/diskless and scripts/nfs-bottom/ramdisk_root
- in /etc/client_etc/initramfs-tools/scripts/nfs-bottom/ramdisk_root several files are specified that are copied from original server /etc during a boot. This allows diskless clients to modify the files by scripts. Some of the files mentioned in the scripts are: adjtime hostname iftab mtab sudoers
- generate initrd image:
sudo mkinitramfs -d /etc/client_etc/initramfs-tools -o /var/lib/tftpboot/cluster/initrd.img-diskless-2.6.XX-X 2.6.XX-X-generic
- '2.6.XX-X-generic' is the version of linux you are building an image for (see /lib/modules/ for version name).
- configure pxelinux to use this new initrd.img file. All other steps (DHCP, TFTP, and NFS server configuration are the same as in the common diskless boot solutions)