Hall A Diskless Setup
Table of Contents
Boot Process
Power On -> PXE
- Client : MAC address to DHCP
- DHCP : IP address, next-server, filename
- Client : executes filename acquired from next-server
- TFTP : provides kernel, kernel arguments, initial ramdisk (initrd)
example kernel arguments:
initrd=CentOS7-x86_64-Diskless/initramfs-3.10.0-1062.9.1.el7.x86_64.img ip=dhcp root=nfs:129.57.29.103:/raid/diskless/CentOS7-devel/x86_64/root ro vga=0x305 quiet
Client Boots kernel
- DHCP request
- Mount root filesystem using NFS
- systemd :
rhel-readonly.service
/usr/lib/systemd/rhel-readonly
- Configuration
/etc/sysconfig/readonly-root
- snapshot nfs path: where to find persistent storage
/etc/statetab
- persistent files/directories
/etc/rwtab
- very temporary files/directories
- Configuration
- mount
snapshot/$hostname
- Path must already exist
- Contents are empty, copied over from readonly-root mount
- systemd :
ypbind.service
- CUE/halla user and group ids for logins and file permissions
systemd :
autofs.service
/site /apps /home
setup for halla
install script config file
CLIENT_HOSTNAME[0]="lhrsfb3" NFS_SERVER_HOSTNAME=chafs NFS_PATH=/diskless/CentOS7/x86_64 NFS_ROOT_PATH=${NFS_PATH}/root NFS_SNAPSHOT_PATH=${NFS_PATH}/snapshot TFTP_PATH=/tftpboot/linux-install
TFTP configuration
- Untar bootfiles
diskless_gen.sh -f halla.cfg -b
tftp_x86_64-rc3.tgz -> /tftpboot/linux-install/CentOS7-x86_64-Diskless/
- Configure pxelinux / tftp
diskless_gen.sh -f halla.cfg -p
Creates
/tftpboot/linux-install/pxelinux.cfg/centos7-x86_64.default
kernel CentOS7-armv7-Diskless/vmlinuz-3.10.0-1062.9.1.el7.x86_64 append initrd=CentOS7-armv7-Diskless/initramfs-3.10.0-1062.9.1.el7.x86_64.img ip=dhcp root=nfs:129.57.164.32:/diskless/CentOS7/x86_64/root ro vga=0x305
Creates soft-link
8139C083 -> centos7-x86_64.default
NFS configuration
- Untar root filesystem
diskless_gen.sh -f halla.cfg -r
root_x86_64-rc3.tgz -> /diskless/CentOS7/x86_64/root/
- Hall A specifics for Client OS
diskless_gen.sh -f halla.cfg -u
Generates
/etc/sysconfig/readonly-root /etc/yp.conf /etc/auto.master.d/home.autofs
- snapshot
diskless_gen.sh -f halla.cfg -s
Generates
/diskless/CentOS7/x86_64/snapshot/lhrsfb3/