## grub2 configuration
set default="Boot OS of first partition on first disk"
set timeout=20

if loadfont /boot/grub/ascii.pf2 ; then
   insmod png
   set gfxmode=640x480
   insmod gfxterm
   insmod vbe
   terminal_output gfxterm
fi

if background_image /boot/grub/fai.png ; then
  set color_normal=black/black
  set color_highlight=red/black
  set menu_color_normal=black/black
  set menu_color_highlight=black/yellow
else
  set menu_color_normal=white/black
  set menu_color_highlight=black/yellow
fi

# make sure we can access partitions
insmod part_msdos
insmod part_gpt

if [ ${iso_path} ] ; then
    set loopback="findiso=${iso_path}"
fi


menuentry "+------------------------------------------------------+" {
    set gfxpayload=1024x768
    linux   /boot/vmlinuz boot=live
}
menuentry "|    FAI-CD        (c) Thomas Lange, lange@debian.org  |" {
    set gfxpayload=1024x768
    linux   /boot/vmlinuz boot=live
}
menuentry "| _VERSIONSTRING_ |" {
    set gfxpayload=1024x768
    linux   /boot/vmlinuz boot=live
}
menuentry "+------------------------------------------------------+" {
    set gfxpayload=1024x768
    linux   /boot/vmlinuz boot=live
}

menuentry "Fully Automatic Installation - mainserver" {
    set gfxpayload=1024x768
    set root=(cd)
    linux   /boot/vmlinuz boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=install hostname=mainserver
    initrd  /boot/initrd.img
}

menuentry "Fully Automatic Installation - workstation00" {
    set gfxpayload=1024x768
    set root=(cd)
    linux   /boot/vmlinuz boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=install hostname=workstation00
    initrd  /boot/initrd.img
}

menuentry "Fully Automatic Installation - demohost" {
    set gfxpayload=1024x768
    set root=(cd)
    linux   /boot/vmlinuz boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=install hostname=demohost
    initrd  /boot/initrd.img
}

menuentry "Fully Automatic Installation with XFCE" {
    set gfxpayload=1024x768
    set root=(cd)
    linux /boot/vmlinuz boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=install hostname=xfcehost
    initrd /boot/initrd.img
}

menuentry "Fully Automatic Installation with GNOME" {
    set gfxpayload=1024x768
    set root=(cd)
    linux /boot/vmlinuz boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=install hostname=gnomehost
    initrd /boot/initrd.img
}

menuentry "Fully Automatic Installation - faiserver" {
    set gfxpayload=1024x768
    set root=(cd)
    linux /boot/vmlinuz boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=install hostname=faiserver
    initrd /boot/initrd.img
}

menuentry "FAI rescue system, no installation" {
    set gfxpayload=1024x768
    set root=(cd)
    linux /boot/vmlinuz boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=sysinfo hostname=demohost
    initrd /boot/initrd.img
}

menuentry "Boot OS of first partition on first disk" {
    set root=(hd0,1)
    chainloader +1
}
