forked from aguslr/multibootusb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grub.cfg
126 lines (107 loc) · 2.33 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
# MultiBoot USB with Grub2
# Config for GNU GRand Unified Bootloader (GRUB)
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=auto
set gfxpayload=auto
terminal_output gfxterm
if terminal_output gfxterm ; then true ; else
terminal gfxterm
fi
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
# Enable pager for GRUB command-line
set pager=1
# Partition holding files
search --file --no-floppy --set=root $prefix/multiboot.6U4YzT
probe -u $root --set=rootuuid
set imgdevpath="/dev/disk/by-uuid/$rootuuid"
export root imgdevpath
# Custom variables
set drive_label=multiboot
export drive_label
set binpath="/boot/bin"
set isopath="/boot/isos"
export binpath isopath
# Boot from disk by default
menuentry "Boot from First HD (default)" {
chainloader +1
}
# For globbing
insmod regexp
# Boot kenel/ISO file
submenu "Boot kernel/ISO file ->" {
for configfile in $prefix/grub.d/*.cfg; do
source $configfile
done
}
submenu "Other ->" {
# Memtest86+ (http://www.memtest.org/)
menuentry "Test memory with Memtest86+" {
linux16 $binpath/memtest86+-5.01.bin
}
}
# Grub options
submenu "GRUB2 options ->" {
menuentry "List devices/partitions" {
ls -l
sleep --interruptible 9999
}
menuentry "Enable GRUB2's LVM support" {
insmod lvm
}
menuentry "Enable GRUB2's RAID support" {
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)" {
insmod ata
update_paths
}
menuentry "Enable GRUB2's USB support *experimental*" {
insmod ohci
insmod uhci
insmod usbms
update_paths
}
menuentry "Mount encrypted volumes (LUKS and geli)" {
insmod luks
insmod geli
cryptomount -a
}
menuentry "Enable serial terminal" {
serial
terminal_input --append serial
terminal_output --append serial
}
}
# Reboot
menuentry "Reboot" {
reboot
}
# Poweroff
menuentry "Poweroff" {
halt
}