-
Notifications
You must be signed in to change notification settings - Fork 0
/
grub.cfg
270 lines (225 loc) · 10.7 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# Created manually: August 8, 2022.
#
# resources:
# https://wiki.archlinux.org/title/GRUB
# https://wiki.archlinux.org/title/GRUB/Tips_and_tricks
# https://wiki.archlinux.org/title/Multiboot_USB_drive
# https://help.ubuntu.com/community/Grub2/ISOBoot
# https://help.ubuntu.com/community/Grub2/ISOBoot/Examples
# https://help.ubuntu.com/community/Grub2/CustomMenus
# https://github.com/thias/glim
#
# path to the partition holding ISO images (using UUID)
probe -u $root --set=rootuuid
set imgdevpath="/dev/disk/by-uuid/$rootuuid"
search --no-floppy --set=root --fs-uuid #PARTITION_UUID
# never save a default
GRUB_SAVEDEFAULT=false
GRUB_TIMEOUT=-1
# show menu on grub immediately
GRUB_TIMEOUT_STYLE=menu
# stuff to boot ISOs
insmod part_bsd
insmod part_gpt
insmod part_msdos
insmod chain
insmod lzopio
insmod xzio
insmod gzio
insmod fat
insmod ufs2
insmod ext2
insmod iso9660
insmod all_video
insmod font
# GUI stuff
if loadfont "${prefix}/fonts/unicode.pf2" ; then
insmod gfxterm
set gfxmode="auto"
terminal_input console
terminal_output gfxterm
fi
##########################
## T E M P L A T E :
##########################
## Linux Distro Linux - Jul 23, 2022
#menuentry "Linux Distro v42.0 x86_64 - linux-distro-x86_64.iso" --class linuxdistro --class gnu-linux --class gnu --class os --id 'linuxdistro' {
# set isofile='/boot/iso/linux-distro-x86_64.iso'
# loopback loop $isofile
# linux (loop)/boot/vmlinuz iso-scan/filename=$isofile img_dev=$imgdevpath img_loop=$isofile earlymodules=loop
# initrd (loop)/boot/initrd
#}
##########################
## Linux - Jul 23, 2022
#menuentry " x86_64 - " --class --class gnu-linux --class gnu --class os --id '' {
# set isofile='/boot/iso/'
# loopback loop $isofile
# linux (loop)/boot/vmlinuz img_dev=$imgdevpath img_loop=$isofile earlymodules=loop
# initrd (loop)/boot/initramfs-linux.img
#}
##########################
# Arch Linux - Jun 29, 2022
menuentry "Arch Linux x86_64 - archlinux-2022.06.01-x86_64.iso" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
set isofile='/boot/iso/archlinux-2022.06.01-x86_64.iso'
loopback loop $isofile
linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=$imgdevpath img_loop=$isofile earlymodules=loop
initrd (loop)/arch/boot/intel-ucode.img (loop)/arch/boot/amd-ucode.img (loop)/arch/boot/x86_64/initramfs-linux.img
}
# Alma Linux 8.6 - Jul 23, 2022
menuentry "Alma Linux 8.6 x86_64 - AlmaLinux-8.6-x86_64-dvd.iso" --class alma --class almalinux --class gnu-linux --class gnu --class os --id 'almalinux' {
set isofile='/boot/iso/AlmaLinux-8.6-x86_64-dvd.iso'
loopback loop $isofile
linux (loop)/isolinux/vmlinuz iso-scan/filename=$isofile inst.stage2=hd:LABEL=AlmaLinux-8-6-x86_64-dvd
initrd (loop)/isolinux/initrd.img
}
# Alma Linux 9 - Jul 23, 2022
menuentry "Alma Linux 9.0 x86_64 - AlmaLinux-9.0-x86_64-dvd.iso" --class alma --class almalinux --class gnu-linux --class gnu --class os --id 'almalinux' {
set isofile='/boot/iso/AlmaLinux-9.0-x86_64-dvd.iso'
loopback loop $isofile
linux (loop)/isolinux/vmlinuz iso-scan/filename=$isofile inst.stage2=hd:LABEL=AlmaLinux-9-0-x86_64-dvd
initrd (loop)/isolinux/initrd.img
}
# CentOS Stream 9 Linux - Jul 23, 2022
menuentry "CentOS Stream 9 x86_64 - CentOS-Stream-9-latest-x86_64-dvd1.iso" --class centos --class gnu-linux --class gnu --class os --id 'centos' {
set isofile='/boot/iso/CentOS-Stream-9-latest-x86_64-dvd1.iso'
loopback loop $isofile
linux (loop)/isolinux/vmlinuz iso-scan/filename=$isofile inst.stage2=hd:LABEL=CentOS-Stream-9-BaseOS-x86_64
initrd (loop)/isolinux/initrd.img
}
# Debian Linux DVD - Jul 23, 2022
menuentry "Debian 11 'Bullseye' x86_64 - debian-11.4.0-amd64-DVD-1.iso" --class debian --class gnu-linux --class gnu --class os --id 'debian' {
set isofile='/boot/iso/debian-11.4.0-amd64-DVD-1.iso'
loopback loop $isofile
linux (loop)/install.amd/gtk/vmlinuz iso-scan/filename=$isofile
initrd (loop)/install.amd/gtk/initrd.gz
}
# Debian Linux BD - Jul 23, 2022
menuentry "Debian 11 'Bullseye' x86_64 - debian-11.4.0-amd64-BD-1.iso" --class debian --class gnu-linux --class gnu --class os --id 'debian' {
set isofile='/boot/iso/debian-11.4.0-amd64-BD-1.iso'
loopback loop $isofile
linux (loop)/install.amd/gtk/vmlinuz iso-scan/filename=$isofile
initrd (loop)/install.amd/gtk/initrd.gz
}
# Fedora Workstation Linux - Jul 23, 2022
menuentry "Fedora Workstation 36 x86_64 - Fedora-Workstation-Live-x86_64-36-1.5.iso" --class fedora --class gnu-linux --class gnu --class os --id 'fedora' {
set isofile='/boot/iso/Fedora-Workstation-Live-x86_64-36-1.5.iso'
loopback loop $isofile
linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-WS-Live-36-1-5 rd.live.image iso-scan/filename=$isofile
initrd (loop)/isolinux/initrd.img
}
# Fedora Server Linux - Jul 23, 2022
menuentry "Fedora Server 36 x86_64 - Fedora-Server-dvd-x86_64-36-1.5.iso" --class fedora --class gnu-linux --class gnu --class os --id 'fedora' {
set isofile='/boot/iso/Fedora-Server-dvd-x86_64-36-1.5.iso'
loopback loop $isofile
linux (loop)/isolinux/vmlinuz root=live:CDLABEL=Fedora-S-dvd-x86_64-36 rd.live.image iso-scan/filename=$isofile
initrd (loop)/isolinux/initrd.img
}
# Gentoo Linux - Jul 23, 2022
menuentry "Gentoo x86_64 - livegui-amd64-20220605T170549Z.iso" --class gentoo --class gnu-linux --class gnu --class os --id 'gentoo' {
set isofile='/boot/iso/livegui-amd64-20220605T170549Z.iso'
loopback loop $isofile
linux (loop) /boot/gentoo isofrom=$isofile
initrd (loop) /boot/gentoo.igz
}
# Guix Linux - Jul 23, 2022
menuentry "Guix 1.3 x86_64 - guix-system-install-1.3.0.x86_64-linux.iso" --class guix --class gnu-linux --class gnu --class os --id 'guix' {
set isofile='/boot/iso/guix-system-install-1.3.0.x86_64-linux.iso'
loopback loop $isofile
linux (loop)/gnu/store/5axms2d6yqx1zqbcjn3cl015cbcaf7i1-linux-libre-5.11.15/bzImage --root=31393730-3031-3031-3139-343934363833 --system=(loop)/gnu/store/a361dixcmijs70zlq0rhc917fci1qfy0-system --load=(loop)/gnu/store/a361dixcmijs70zlq0rhc917fci1qfy0-system/boot
initrd (loop)/gnu/store/6gqlkmklgvqks6nqf6bc39vj044pjvjd-raw-initrd/initrd.cpio.gz
}
# Linux Mint Linux - Jul 23, 2022
menuentry "Linux Mint 20.3 x86_64 - linuxmint-20.3-cinnamon-64bit.iso" --class mint --class linuxmint --class gnu-linux --class gnu --class os --id 'linuxmint' {
set isofile='/boot/iso/linuxmint-20.3-cinnamon-64bit.iso'
loopback loop $isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
initrd (loop)/casper/initrd.lz
}
# Manjaro Linux - Jul 23, 2022
menuentry "Manjaro x86_64 - manjaro-kde-21.3.4-220718-linux515.iso" --class manjaro --class gnu-linux --class gnu --class os --id 'manjaro' {
set isofile='/boot/iso/manjaro-kde-21.3.4-220718-linux515.iso'
loopback loop $isofile
linux (loop)/boot/vmlinuz-x86_64 img_dev=$imgdevpath img_loop=$isofile earlymodules=loop
initrd (loop)/boot/amd_ucode.img (loop)/boot/intel_ucode.img (loop)/boot/initramfs-x86_64.img
}
# openSUSE Leap Linux - Jul 23, 2022
menuentry "openSUSE Leap 15 x86_64 - openSUSE-Leap-15.4-DVD-x86_64-Build243.2-Media.iso" --class suse --class opensuse --class gnu-linux --class gnu --class os --id 'opensuse-leap' {
set isofile='/boot/iso/openSUSE-Leap-15.4-DVD-x86_64-Build243.2-Media.iso'
loopback loop $isofile
linux (loop)/boot/x86_64/loader/linux install=hd:$isofile iso-scan/filename=$isofile
initrd (loop)/boot/x86_64/loader/initrd
}
# openSUSE Tumbleweed Linux - Jul 23, 2022
menuentry "openSUSE Tumbleweed x86_64 - openSUSE-Tumbleweed-DVD-x86_64-Snapshot20220714-Media.iso" --class suse --class opensuse --class gnu-linux --class gnu --class os --id 'opensuse-tumbleweed' {
set isofile='/boot/iso/openSUSE-Tumbleweed-DVD-x86_64-Snapshot20220714-Media.iso'
loopback loop $isofile
linux (loop)/boot/x86_64/loader/linux install=hd:$isofile iso-scan/filename=$isofile
initrd (loop)/boot/x86_64/loader/initrd
}
# POP!_OS Linux NVIDIA Drivers - Jul 23, 2022
menuentry "POP!_OS 22.04 NVIDIA Drivers Pre-installed Edition x86_64 - pop-os_22.04_amd64_nvidia_10.iso" --class pop_os --class gnu-linux --class gnu --class os --id 'pop_os' {
set isofile='/boot/iso/pop-os_22.04_amd64_nvidia_10.iso'
loopback loop $isofile
linux (loop)/casper_pop-os_22.04_amd64_nvidia_debug_125/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
initrd (loop)/casper_pop-os_22.04_amd64_nvidia_debug_125/initrd.gz
}
# POP!_OS Linux Open-source MESA AMD and Intel Drivers - Jul 23, 2022
menuentry "POP!_OS 22.04 NVIDIA Drivers Pre-installed Edition x86_64 - pop-os_22.04_amd64_intel_10.iso" --class pop_os --class gnu-linux --class gnu --class os --id 'pop_os' {
set isofile='/boot/iso/pop-os_22.04_amd64_intel_10.iso'
loopback loop $isofile
linux (loop)/casper_pop-os_22.04_amd64_intel_debug_125/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
initrd (loop)/casper_pop-os_22.04_amd64_intel_debug_125/initrd.gz
}
# Rocky Linux 8.6 - Jul 23, 2022
menuentry "Rocky Linux 8.6 x86_64 - Rocky-8.6-x86_64-dvd1.iso" --class rocky --class rockylinux --class gnu-linux --class gnu --class os --id 'rocky' {
set isofile='/boot/iso/Rocky-8.6-x86_64-dvd1.iso'
loopback loop $isofile
linux (loop)/isolinux/vmlinuz iso-scan/filename=$isofile inst.stage2=hd:LABEL=Rocky-8.6-x86_64-dvd1
initrd (loop)/isolinux/initrd.img
}
# Rocky Linux 9.0 - Jul 23, 2022
menuentry "Rocky Linux 9.0 x86_64 - Rocky-9.0-x86_64-dvd.iso" --class rocky --class rockylinux --class gnu-linux --class gnu --class os --id 'rocky' {
set isofile='/boot/iso/Rocky-9.0-x86_64-dvd.iso'
loopback loop $isofile
linux (loop)/isolinux/vmlinuz iso-scan/filename=$isofile inst.stage2=hd:LABEL=Rocky-9-0-x86_64-dvd
initrd (loop)/isolinux/initrd.img
}
# Ubuntu Linux - Jul 23, 2022
menuentry "Ubuntu 22.04 x86_64 - ubuntu-22.04-desktop-amd64.iso" --class ubuntu --class gnu-linux --class gnu --class os --id 'ubuntu' {
set isofile='/boot/iso/ubuntu-22.04-desktop-amd64.iso'
loopback loop $isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
initrd (loop)/casper/initrd
}
# NetBSD UNIX - Jul 23, 2022
menuentry "NetBSD 9.2 - NetBSD-9.2-amd64.iso" --class netbsd --class bsd --class unix --class os --id 'netbsd' {
set isofile='/boot/iso/NetBSD-9.2-amd64.iso'
loopback loop $isofile
knetbsd (loop)/netbsd
}
# OpenBSD UNIX - Jul 23, 2022
menuentry "OpenBSD 7.1 - install71.iso" --class openbsd --class bsd --class unix --class os --id 'openbsd' {
set isofile='/boot/iso/install71.iso'
loopback loop $isofile
kopenbsd (loop)/7.1/amd64/bsd.rd
}
# Empty line
menuentry ' ' {
true
}
# "Shutdown" menu entry
menuentry "System shutdown" {
echo "System shutting down..."
halt
}
# "Restart" menu entry
menuentry "System restart" {
echo "System rebooting..."
reboot
}
# "UEFI Firmware Settings" menu entry
if [ ${grub_platform} == "efi" ]; then
menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
fwsetup
}
fi