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 menuentry "FAI server via dns" {
62 set gfxpayload=$resolution
63 linux /boot/vmlinuz FAI_FLAGS=verbose,sshd,createvt 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
64 initrd /boot/initrd.img
65 }
66
67
68 menuentry "Autodiscover the FAI server" {
69 set gfxpayload=$resolution
70 linux /boot/vmlinuz FAI_FLAGS="menu,verbose,createvt" fai.discover aufs rootovl root=/dev/nfs ip=dhcp quiet
71 initrd /boot/initrd.img
72 }
73
74
75 menuentry "Boot OS of first partition on first disk" --unrestricted {
76 if [ -d (cd) ]; then
77 chainloader (hd0)+1
78 fi
79
80 if [ "$root" = "hd1" ]; then
81 chainloader (hd0)+1
82 fi
83
84 if [ "$root" = "hd0" ]; then
85 set root=(hd1)
86 chainloader (hd1)+1
87 fi
88 }