## grub2 configuration set default="Boot OS from first partition on first disk" set timeout=20 # make sure we can access partitions insmod part_msdos insmod part_gpt insmod all_video insmod gfxterm insmod regexp 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 menuentry " +------------------------------------------------------+" { set timeout=20 } menuentry " | Fully Automatic Installation |" { set timeout=20 } menuentry " | _VERSIONSTRING_ |" --unrestricted { set timeout=20 } menuentry " | (c) Thomas Lange lange@debian.org |" { set timeout=20 } menuentry " +------------------------------------------------------+" { set timeout=20 } menuentry "" { set timeout=20 } menuentry "Client standalone installation - select installation type from menu " { search --set=root --file /FAI-CD linux /boot/vmlinuz FAI_FLAGS="menu,verbose,createvt" FAI_ACTION=install FAI_CONFIG_SRC=detect:// rd.live.image root=live:CDLABEL=FAI_CD rd.neednet ip=dhcp quiet initrd /boot/initrd.img } menuentry "Boot OS from first partition on first disk" { if [ "$grub_platform" = "efi" ]; then for d in (hd*,gpt*); do for cfg in efi/debian/grub.cfg grub/grub.cfg boot/grub/grub.cfg ; do if [ -e "$d/$cfg" ]; then found=true echo "FOUND $d/$cfg" sleep 1 configfile "$d/$cfg" fi done done if [ "$found" != true ]; then echo "Cannot find grub.cfg" sleep 7 fi else # legacy BIOS booting # detect which disk has a DOS partitions, and boot the MBR via chainloader found=false for d in (hd*,msdos*) (hd*,gpt*); do if [ "$found" == "false" ]; then regexp -s device '^\((.+),' $d if [ -e "($device)/FAI-CD" ]; then # FAI-CD detected, ignore it device="" continue fi if [ "$device" != "" ]; then if [ "$device" == "hd*" ]; then continue fi found=true set root=($device) chainloader +1 fi fi done if [ "$device" != "" ]; then echo "Booting from $device" sleep 2 else echo "Cannot find grub.cfg" sleep 7 fi fi } menuentry "Rescue system, no installation" { search --set=root --file /FAI-CD linux /boot/vmlinuz FAI_FLAGS="verbose,createvt" FAI_ACTION=sysinfo FAI_CONFIG_SRC=detect:// rd.live.image root=live:CDLABEL=FAI_CD quiet initrd /boot/initrd.img } menuentry "FAI server installation - using external DHCP server" { search --set=root --file /FAI-CD linux /boot/vmlinuz FAI_FLAGS="verbose,createvt" FAI_ACTION=install hostname=faiserver FAI_CONFIG_SRC=detect:// rd.live.image root=live:CDLABEL=FAI_CD rd.neednet ip=dhcp quiet initrd /boot/initrd.img } menuentry "FAI server installation - using internal DHCP and a fixed IP" { search --set=root --file /FAI-CD linux /boot/vmlinuz FAI_FLAGS="verbose,createvt" FAI_ACTION=install ip=192.168.33.250::192.168.33.1:255.255.255.0:faiserver:eth0:off FAI_CONFIG_SRC=detect:// rd.live.image root=live:CDLABEL=FAI_CD quiet net.ifnames=0 hostname=faiserver initrd /boot/initrd.img } if [ ${grub_platform} == "efi" ]; then menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' { fwsetup } fi