lab setup
The lab computers (3 microservers and 2 z600s) boot multiple things tftp serves up the grub boot file, an example looks like this:
DEFAULT menu.c32 ONTIMEOUT boot_razor TIMEOUT 100 NOESCAPE 0 PROMPT 0 MENU VSHIFT 2 MENU ROWS 12 MENU TITLE cwulzenda.local.lan LABEL boot_c66 MENU LABEL Centos 6.6 (cw-c66/hd0) COM32 chain.c32 APPEND hd0 LABEL boot_u14 MENU LABEL Ubuntu 14.04 (cwulzenda/hd1) COM32 chain.c32 APPEND hd1 LABEL boot_core MENU LABEL CoreOS Stable (cw-core/hd2) COM32 chain.c32 APPEND hd2 LABEL boot_razor MENU LABEL Razor Node Boot KERNEL ipxe.krn APPEND initrd=bootstrap.ipxe MENU SEPARATOR LABEL inst_centos66_hd0 MENU LABEL Centos 6.6 Installer (cw-c66/hd0) KERNEL centos/6.5/x86_64/vmlinuz ksdevice=eth0 ks=http://192.168.1.1/preseed/cwulzenda.ks ip=192.168.1.43 gateway=192.168.1.1 netmask=255.255.255.0 APPEND initrd=centos/6.5/x86_64/initrd.img cmdline nousb LABEL inst_u1404_hd1 MENU LABEL Ubuntu 14.04 Installer (cwulzenda/hd1) KERNEL ubuntu/14.04/amd64/vmlinuz APPEND netboot=nfs nfsroot=192.168.1.1:/volume1/pxe-u1404 initrd=ubuntu/14.04/amd64/initrd.gz priority=critical locale=en_AU url=http://192.168.1.1/preseed/cw1404-puppet interface=em1 LABEL inst_centos7 MENU LABEL Centos 7.0 Installer (stack7/hd0-1) KERNEL centos/7.0/x86_64/vmlinuz ksdevice=enp1s0f0 ks=http://192.168.1.1/preseed/stack7.ks ip=192.168.1.98 gateway=192.168.1.1 netmask=255.255.255.0 APPEND initrd=centos/7.0/x86_64/initrd.img nousb LABEL inst_stack MENU LABEL Ubuntu 14.04 Installer (stack/hd0-1) KERNEL ubuntu/14.04/amd64/vmlinuz APPEND netboot=nfs nfsroot=192.168.1.1:/volume1/pxe-u1404 initrd=ubuntu/14.04/amd64/initrd.gz priority=critical locale=en_AU url=http://192.168.1.1/preseed/stack-puppet interface=em1 text LABEL inst_clc1 MENU LABEL Centos 6.6 Installer for euca (clc1/hd0-2) KERNEL centos/6.6/x86_64/vmlinuz ksdevice=eth0 ks=http://192.168.1.1/preseed/clc1.ks ip=192.168.1.120 gateway=192.168.1.1 netmask=255.255.255.0 APPEND initrd=centos/6.6/x86_64/initrd.img cmdline nousb MENU SEPARATOR MENU BEGIN Centos Server MENU TITLE Centos Server LABEL Previous MENU LABEL Previous Menu TEXT HELP Return to previous menu ENDTEXT MENU EXIT MENU SEPARATOR MENU INCLUDE centos/centos.menu MENU END MENU BEGIN Ubuntu Server MENU TITLE Ubuntu Server LABEL Previous MENU LABEL Previous Menu TEXT HELP Return to previous menu ENDTEXT MENU EXIT MENU SEPARATOR MENU INCLUDE ubuntu/ubuntu.menu MENU END MENU BEGIN Utilities MENU TITLE Utilities LABEL Previous MENU LABEL Previous Menu TEXT HELP Return to previous menu ENDTEXT MENU EXIT MENU SEPARATOR MENU INCLUDE utilities/utilities.menu MENU END
There's a little script that enables me to change what these boot on the fly
#!/bin/ash help () { echo "usage: $(basename $0) [<host> <boot_env_name>]" exit 0 } if [ "$1" == "-l" -o "$1" == "" ] then for h in bartledan cwulzenda dangrabad voondon zirzla do printf "%9s :" $h ( grep "^ONTIMEOUT" /volume1/tftp/pxelinux.cfg/boot/$h; grep "^LABEL boot_" /volume1/tftp/pxelinux.cfg/boot/$h ) | sed 's/boot_//' | \ awk '{if(NR==1){a=$2;getline}{if(match(a,$2)){printf(" [\e[1m%s\e[0m]",$2)}else{printf(" %s",$2)}}}' echo done exit 0 fi if [ "$2" == "" ] then help fi case $1 in "bartledan"|"cwulzenda"|"dangrabad"|"voondon"|"zirzla") sed -i "s/ONTIMEOUT boot_.*/ONTIMEOUT boot_$2/" /volume1/tftp/pxelinux.cfg/boot/$1 ;; *) help ;; esac
it also shows the current boot options when ran with no args
bartledan : [c66] u14 core razor cwulzenda : [c66] u14 core razor dangrabad : [u14] esx voondon : [euca] u14 esx zirzla : [c7] esx
Most of these systems are quite dynamic, in that they get rebuilt often, (except voondon at the moment, did I mention I really like euacalyptus ?) not really a problem since it's done with kickstart/preseeding.
I've been trying out razor recently, but can't really comment on it yet since I haven't really given it enough use as the cutom built pxe setup works well and doesn't require much tinkering.