Debian Codegraph @

conf/grub.cfg

raw
1 ## grub2 configuration
2 set default="Boot OS from first partition on first disk"
3 set timeout=20
4
5 # make sure we can access partitions
6 insmod part_msdos
7 insmod part_gpt
8 insmod all_video
9 insmod gfxterm
10 insmod regexp
11
12 set gfxmode=auto
13 set color_normal=white/black
14 set color_highlight=red/black
15 set menu_color_normal=white/black
16 set menu_color_highlight=black/yellow
17
18 menuentry " +------------------------------------------------------+" {
19 set timeout=20
20 }
21
22 menuentry " | Fully Automatic Installation |" {
23 set timeout=20
24
25 }
26 menuentry " | _VERSIONSTRING_ |" --unrestricted {
27 set timeout=20
28
29 }
30 menuentry " | (c) Thomas Lange [email protected] |" {
31 set timeout=20
32 }
33 menuentry " +------------------------------------------------------+" {
34 set timeout=20
35 }
36
37 menuentry "" {
38 set timeout=20
39 }
40
41 menuentry "Client standalone installation - select installation type from menu " {
42 search --set=root --file /FAI-CD
43 linux /boot/vmlinuz FAI_FLAGS="menu,verbose,createvt" FAI_ACTION=install FAI_CONFIG_SRC=detect:// rd.live.overlay.overlayfs root=live:CDLABEL=FAI_CD rd.neednet quiet
44 initrd /boot/initrd.img
45 }
46
47 menuentry "Boot OS from first partition on first disk" {
48
49 if [ "$grub_platform" == "efi" ]; then
50
51 for d in (hd*,gpt*); do
52 for cfg in efi/debian/grub.cfg grub/grub.cfg boot/grub/grub.cfg ; do
53 if [ -e "$d/$cfg" ]; then
54 found=true
55 echo "FOUND $d/$cfg"
56 sleep 1
57 configfile "$d/$cfg"
58 fi
59 done
60 done
61
62 if [ "$found" != true ]; then
63 echo "Cannot find grub.cfg"
64 sleep 7
65 fi
66
67 else
68
69 # legacy BIOS booting
70 # detect which disk has a DOS partitions, and boot the MBR via chainloader
71 found=false
72 for d in (hd*,msdos*) (hd*,gpt*); do
73 if [ "$found" == "false" ]; then
74 regexp -s device '^\((.+),' $d
75 if [ -e "($device)/FAI-CD" ]; then
76 # FAI-CD detected, ignore it
77 device=""
78 continue
79 fi
80 if [ "$device" != "" ]; then
81 if [ "$device" == "hd*" ]; then
82 continue
83 fi
84 found=true
85 set root=($device)
86 chainloader +1
87 fi
88 fi
89 done
90 if [ "$device" != "" ]; then
91 echo "Booting from $device"
92 sleep 2
93 else
94 echo "Cannot find grub.cfg"
95 sleep 7
96 fi
97 fi
98 }
99
100 menuentry "Rescue system, no installation" {
101 search --set=root --file /FAI-CD
102 linux /boot/vmlinuz FAI_FLAGS="verbose,createvt" FAI_ACTION=sysinfo FAI_CONFIG_SRC=detect:// rd.live.overlay.overlayfs root=live:CDLABEL=FAI_CD quiet
103 initrd /boot/initrd.img
104 }
105
106 menuentry "FAI server installation - using external DHCP server" {
107 search --set=root --file /FAI-CD
108 linux /boot/vmlinuz FAI_FLAGS="verbose,createvt" FAI_ACTION=install hostname=faiserver FAI_CONFIG_SRC=detect:// rd.live.overlay.overlayfs root=live:CDLABEL=FAI_CD rd.neednet quiet
109 initrd /boot/initrd.img
110 }
111
112 menuentry "FAI server installation - using internal DHCP and a fixed IP" {
113 search --set=root --file /FAI-CD
114 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.overlay.overlayfs root=live:CDLABEL=FAI_CD quiet net.ifnames=0 hostname=faiserver
115 initrd /boot/initrd.img
116 }
117
118 if [ ${grub_platform} == "efi" ]; then
119 menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
120 fwsetup
121 }
122 fi