## grub2 configuration set default="FAI server via dns" set timeout=20 # make sure we can access partitions insmod part_msdos insmod part_gpt insmod all_video insmod gfxterm set gfxmode=auto set color_normal=white/black set color_highlight=red/black set menu_color_normal=white/black set menu_color_highlight=black/yellow # ian: Added this from fai # note, we could replace faiserver with an ip if we didn't want to mess with dns. # args are copied from myfai-chboot-local. # Note, for a real cd or usb flash, if it is the default boot device, we would need to remove the disk # after install is done very quickly, or else remove the reboot arg here menuentry "FAI server via dns" { set gfxpayload=$resolution search --set=root --file /FAI-CD linux /boot/vmlinuz libata.force=noncq FAI_FLAGS=verbose,sshd,createvt,reboot FAI_CONFIG_SRC=nfs://faiserver/srv/fai/config root=/dev/nfs nfsroot=faiserver:/srv/fai/nfsroot,vers=3,nolock rootovl ip=dhcp initrd /boot/initrd.img } menuentry "FAI server via dns, no reboot" { set gfxpayload=$resolution search --set=root --file /FAI-CD linux /boot/vmlinuz libata.force=noncq FAI_FLAGS=verbose,sshd,createvt FAI_CONFIG_SRC=nfs://faiserver/srv/fai/config root=/dev/nfs nfsroot=faiserver:/srv/fai/nfsroot,vers=3,nolock rootovl ip=dhcp initrd /boot/initrd.img } # ro,noatime,vers=3,rsize=1048576,wsize=same,namelen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.2.0.2,nountvers=3,mountport=49179,mountproto=udp,lock_lock=all,addr=10.2.0.2 menuentry "Autodiscover the FAI server" { search --set=root --file /FAI-CD linux /boot/vmlinuz libata.force=noncq FAI_FLAGS="menu,verbose,createvt" fai.discover rootovl root=/dev/nfs ip=dhcp quiet initrd /boot/initrd.img } menuentry "Boot OS from first partition on first disk" { if [ "$grub_platform" = "efi" ]; then if [ -f (hd0,gpt1)/efi/debian/grub.cfg ]; then configfile (hd0,gpt1)/efi/debian/grub.cfg elif [ -f (hd1,gpt1)/efi/debian/grub.cfg ]; then configfile (hd1,gpt1)/efi/debian/grub.cfg elif [ -f (hd0,gpt2)/boot/grub/grub.cfg ]; then configfile (hd0,gpt2)/boot/grub/grub.cfg elif [ -f (hd1,gpt2)/boot/grub/grub.cfg ]; then configfile (hd1,gpt2)/boot/grub/grub.cfg else echo "cannot find grub.cfg" sleep 7 fi # legacy BIOS booting elif [ -d (cd) ]; then set root=(hd0) chainloader +1 else set root=(hd1) chainloader +1 fi }