a bunch of fixes and improvements
[automated-distro-installer] / grub.cfg.autodiscover
1 ## grub2 configuration
2 set default="FAI server via dns"
3 set timeout=2
4 set resolution=1024x768
5
6 if loadfont /boot/grub/unicode.pf2 ; then
7 insmod png
8 set gfxmode=640x480
9 insmod gfxterm
10 insmod vbe
11 terminal_output gfxterm
12 fi
13
14 if background_image /boot/grub/fai.png ; then
15 set color_normal=black/black
16 set color_highlight=red/black
17 set menu_color_normal=black/black
18 set menu_color_highlight=black/yellow
19 else
20 set menu_color_normal=white/black
21 set menu_color_highlight=black/yellow
22 fi
23
24 # make sure we can access partitions
25 insmod part_msdos
26 insmod part_gpt
27
28 if [ ${iso_path} ] ; then
29 set loopback="findiso=${iso_path}"
30 fi
31
32 menuentry "" --unrestricted {
33 set gfxpayload=$resolution
34 }
35 menuentry " +------------------------------------------------------+" --unrestricted {
36 set gfxpayload=$resolution
37 }
38
39 menuentry " | Fully Automatic Installation |" --unrestricted {
40 set gfxpayload=$resolution
41
42 }
43 menuentry " | _VERSIONSTRING_ |" --unrestricted {
44 set gfxpayload=$resolution
45
46 }
47 menuentry " | (c) Thomas Lange lange@debian.org |" --unrestricted {
48 set gfxpayload=$resolution
49 }
50 menuentry " +------------------------------------------------------+" --unrestricted {
51 set gfxpayload=$resolution
52 }
53 }
54 menuentry "" --unrestricted {
55 set gfxpayload=$resolution
56 }
57
58 # ian: Added this from fai
59 # note, we could replace faiserver with an ip if we didn't want to mess with dns.
60 # args are copied from myfai-chboot-local.
61 # Note, for a real cd or usb flash, we probably do not want reboot, so we can remove the disk
62 # after install is done
63 menuentry "FAI server via dns" {
64 set gfxpayload=$resolution
65 linux /boot/vmlinuz FAI_FLAGS=verbose,sshd,createvt,reboot FAI_CONFIG_SRC=nfs://faiserver/srv/fai/config root=/dev/nfs rw nfsroot=faiserver:/srv/fai/nfsroot,vers=3,nolock aufs rootovl ip=dhcp FAI_FLAGS=verbose,sshd,createvt
66 initrd /boot/initrd.img
67 }
68
69 menuentry "Autodiscover the FAI server" {
70 set gfxpayload=$resolution
71 linux /boot/vmlinuz FAI_FLAGS="menu,verbose,createvt,reboot" fai.discover aufs rootovl root=/dev/nfs ip=dhcp quiet
72 initrd /boot/initrd.img
73 }
74
75
76 menuentry "Boot OS of first partition on first disk" --unrestricted {
77 if [ -d (cd) ]; then
78 chainloader (hd0)+1
79 fi
80
81 if [ "$root" = "hd1" ]; then
82 chainloader (hd0)+1
83 fi
84
85 if [ "$root" = "hd0" ]; then
86 set root=(hd1)
87 chainloader (hd1)+1
88 fi
89 }