-
Notifications
You must be signed in to change notification settings - Fork 1
/
grub.cfg
153 lines (130 loc) · 3.42 KB
/
grub.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# Dyanamic Multiboot USB
# vars
set drive_label=multiboot
export drive_label
set binpath="/boot/bin"
set isopath="/boot/iso"
set krnlpath="/boot/krnl"
export binpath isopath krnlpath
set theme_name=xion
export theme_name
# visual
insmod font
if loadfont unicode ; then
if keystatus --shift ; then true ; else
if [ "${grub_platform}" == "efi" ]; then
insmod efi_gop
insmod efi_uga
else
insmod vbe
insmod vga
fi
insmod gfxterm
set gfxmode=1024x768
set gfxpayload=auto
terminal_output gfxterm
if terminal_output gfxterm ; then true ; else
terminal gfxterm
fi
insmod gfxmenu
loadfont ${prefix}/themes/${theme_name}/Sans-10.pf2
loadfont ${prefix}/themes/${theme_name}/Sans-12.pf2
loadfont ${prefix}/themes/${theme_name}/Sans-14.pf2
insmod png
set theme=${prefix}/themes/${theme_name}/theme.txt
export theme
fi
fi
# timeout for menu
set timeout=30
# default boot entry
set default=0
# menu colours
# set color_normal=white/black
# set color_highlight=white/green
# export color_normal
# export color_highlight
# partition holding files
insmod search_fs_uuid
search --file --no-floppy --set=root /boot/grub/multiboot.6U4YzT
probe -u $root --set=rootuuid
set imgdevpath="/dev/disk/by-uuid/$rootuuid"
export root imgdevpath
# boot from disk by default
menuentry "Boot from first HD" --class reboot {
insmod chain
search --no-floppy --fs-uuid --set=root 0B3C-606C
chainloader ($root)/EFI/Boot/BOOTX64.EFI
}
# for globbing
insmod regexp
# live ISOs
submenu "Live ISOs ->" --class gnu-linux {
for configfile in /boot/grub/grub.d/*-live.cfg; do
source $configfile
done
}
# installer ISOs
submenu "Installer ISOs ->" --class gnu-linux {
for configfile in /boot/grub/grub.d/*-install.cfg; do
source $configfile
done
}
# ipxe installers
submenu "iPXE installers ->" --class gnu-linux {
for configfile in /boot/grub/grub.d/*-ipxe.cfg; do
source $configfile
done
}
submenu "Other ->" --class arrow {
# memtest86+ (http://www.memtest.org/)
menuentry "Test memory with Memtest86+" --class arrow {
linux16 $binpath/memtest86+-5.01.bin
}
}
# grub options
submenu "GRUB2 options ->" --class arrow {
menuentry "List devices/partitions" --class arrow {
ls -l
sleep --interruptible 9999
}
menuentry "Enable GRUB2's LVM support" --class arrow {
insmod lvm
}
menuentry "Enable GRUB2's RAID support" --class arrow {
insmod dm_nv
insmod mdraid09_be
insmod mdraid09
insmod mdraid1x
insmod raid5rec
insmod raid6rec
}
menuentry "Enable GRUB2's PATA support (to work around BIOS bugs/limitations)" --class arrow {
insmod ata
update_paths
}
menuentry "Enable GRUB2's USB support *experimental*" --class arrow {
insmod ohci
insmod uhci
insmod usbms
update_paths
}
menuentry "Mount encrypted volumes (LUKS and geli)" --class arrow {
insmod luks
insmod geli
cryptomount -a
}
menuentry "Enable serial terminal" --class arrow {
serial
terminal_input --append serial
terminal_output --append serial
}
}
# reboot
menuentry "Reboot" --class reboot {
reboot
}
# poweroff
menuentry "Poweroff" --class shutdown {
halt
}