/
grub.cfg
402 lines (343 loc) · 14.4 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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
# Multiboot USB Stick grub.cfg
# Required with MBR for GUI
if [ "${grub_platform}" = "pc" ]; then
insmod vbe
fi
## Required with EFI for GUI and to prevent "No video mode set" error
#if [ "${grub_platform}" = "efi" ]; then
# insmod efi_gop
#fi
# Keep the same graphic mode for kernel booting (passed as vga=)
# other values are "text" or any gfxmode value
set gfxpayload=keep
# Enable GUI
#terminal_output gfxterm
#EFI: special characters (lines composing menu frame)
#replaced by '?' in text _fallback_ text mode if absent
# (useless if gfxterm is not enabled or if GUI theme loading success)
#loadfont ascii
# Timeout for menu; set to -1 for "infinite"
set timeout=-1
# Default boot entry
set default=0
# Menu Colours
set menu_color_normal=white/black
set menu_color_highlight=white/green
# Setup to allow console AND serial redirect on Dell M1000E CMC console:
#serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1
#terminal_input console serial
#terminal_output console serial
#set CMCCONSOLE="console=tty0 console=ttyS0,115200n8"
# Then, for most LINUXen, append "$CMCCONSOLE" to "linux" entry.
# Where are the iso(s) stored?
set isodir=/iso
export isodir
# Typical recipes:
# * vmlinuz : add findiso=$iso to end
if [ -d ${isodir}/grml ]; then
menuentry "Grml >" --class grml { configfile "${prefix}/grml.cfg" }
fi
# ---- DEBIAN ----
submenu 'Debian GNU/Linux >>' {
# NOTE - do not try to download the "netinst" iso(s) as they do not
# contain the iso-scan/findiso in the init disk. FMI:
# - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=785512
# - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=724931
# Instead, use the network boot (mini.iso) images found linked from:
# - https://www.debian.org/distrib/netinst
# Debian Live (https://www.debian.org/CD/live/)
menuentry "Debian GNU/Linux Live 9.3.0 amd64 Cinnamon" --class debian {
set iso="/iso/debian-live-9.3.0-amd64-cinnamon.iso"
set kernel="4.9.0-4"
loopback loop $iso
linux (loop)/live/vmlinuz-${kernel}-amd64 boot=live findiso=${iso} components
initrd (loop)/live/initrd.img-${kernel}-amd64
}
# 9.x/Stretch: http://ftp.nl.debian.org/debian/dists/stretch/main/installer-amd64/current/images/netboot/
menuentry "Debian 9.x/Stretch - AMD64 Mini/Netboot-Installer" {
set iso="/iso/debian-9.x-amd64-mini.iso"
loopback loop $iso
linux (loop)/linux
initrd (loop)/initrd.gz
}
# 8.x/Jessie: http://ftp.nl.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/
menuentry "Debian 8.x/Jessie - AMD64 Mini/Netboot-Installer" {
set iso="/iso/debian-8.x-amd64-mini.iso"
loopback loop $iso
linux (loop)/linux
initrd (loop)/initrd.gz
}
# 7.x/Wheezy: http://ftp.nl.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/
menuentry "Debian 7.x/Wheezy - AMD64 Mini/Netboot-Installer" {
set iso="/iso/debian-7.x-amd64-mini.iso"
loopback loop $iso
linux (loop)/linux
initrd (loop)/initrd.gz
}
menuentry "Debian 7.x/Wheezy - 32bit Mini/Netboot-Installer" {
set iso="/iso/debian-7.x-i386-mini.iso"
loopback loop $iso
linux (loop)/linux
initrd (loop)/initrd.gz
}
}
# ---- UBUNTU ----
# For GA v. HWE discussion: https://askubuntu.com/questions/248914/what-is-hardware-enablement-hwe
# - GA == General Availablility / HWE - Hardware Enablement
submenu 'Ubuntu GNU/Linux >>' {
# 18.x Beaver - https://www.ubuntu.com/download/alternative-downloads#network-installer
menuentry "Ubuntu 18.04/Bionic Beaver LTS - 64bit Mini-Installer" {
set iso="/iso/ubuntu-18.04-mini-amd64.iso"
loopback loop $iso
linux (loop)/linux iso-scan/filename=$iso noprompt noeject
initrd (loop)/initrd.gz
}
# 18.x Beaver - https://www.ubuntu.com/download/alternative-downloads#alternate-ubuntu-server-installer
menuentry "Ubuntu 18.04/Bionic Beaver LTS - 64bit Ubuntu Server LTS" {
set iso="/iso/ubuntu-18.04-server-amd64.iso"
loopback loop $iso
linux (loop)/install/vmlinuz iso-scan/filename=$iso file=(loop)/preseed/ubuntu-server.seed quiet ---
initrd (loop)/install/initrd.gz
}
# 18.x Beaver - https://www.ubuntu.com/download/server
menuentry "Ubuntu 18.04/Bionic Beaver LTS - 64bit Ubuntu Server LTS (Ubuntu+MAAS Installer)" {
set iso="/iso/ubuntu-18.04-live-server-amd64.iso"
loopback loop $iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$iso quiet ---
initrd (loop)/casper/initrd.gz
}
# 17.x Zesty - https://www.ubuntu.com/download/alternative-downloads
menuentry "Ubuntu 17.10/Zesty - 64bit Mini-Installer" {
set iso="/iso/ubuntu-17.10-mini-amd64.iso"
loopback loop $iso
linux (loop)/linux boot=casper iso-scan/filename=$iso noprompt noeject
initrd (loop)/initrd.gz
}
# 16.x Xenial LTS - https://help.ubuntu.com/community/Installation/MinimalCD
menuentry "Ubuntu 16.04/Xenial LTS - 64bit Mini-Installer" {
set iso="/iso/ubuntu-16.04-mini-amd64.iso"
loopback loop $iso
linux (loop)/linux boot=casper iso-scan/filename=$iso noprompt noeject
initrd (loop)/initrd.gz
}
# 16.x Xenial LTS - https://help.ubuntu.com/community/Installation/MinimalCD
menuentry "Ubuntu 16.04/Xenial LTS - 64bit Mini-Installer - GA" {
set iso="/iso/ubuntu-16.04-mini-amd64-ga.iso"
loopback loop $iso
linux (loop)/linux boot=casper iso-scan/filename=$iso noprompt noeject
initrd (loop)/initrd.gz
}
# 16.x Xenial LTS - https://help.ubuntu.com/community/Installation/MinimalCD
menuentry "Ubuntu 16.04/Xenial LTS - 64bit Mini-Installer - HWE" {
set iso="/iso/ubuntu-16.04-mini-amd64-hwe.iso"
loopback loop $iso
linux (loop)/linux boot=casper iso-scan/filename=$iso noprompt noeject
initrd (loop)/initrd.gz
}
# 14.x Trusty LTS - https://www.ubuntu.com/download/alternative-downloads
menuentry "Ubuntu 14.04/Trusty LTS - 64bit Mini-Installer" {
set iso="/iso/ubuntu-14.04-mini-amd64.iso"
loopback loop $iso
linux (loop)/linux boot=casper iso-scan/filename=$iso noprompt noeject
initrd (loop)/initrd.gz
}
# 16.x Xenial LTS -- Live Desktop
menuentry "Ubuntu Live CD - 16.04/Xenial LTS - 64bit Desktop" {
set iso="/iso/ubuntu-16.04.3-desktop-amd64.iso"
loopback loop $iso
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$iso noprompt noeject splash --
initrd (loop)/casper/initrd.lz
}
# 14.x Trusty LTS - https://www.ubuntu.com/download/alternative-downloads
menuentry "Ubuntu 14.04/Trusty LTS - 32bit Mini-Installer" {
set iso="/iso/ubuntu-14.04-mini-i386.iso"
loopback loop $iso
linux (loop)/linux boot=casper iso-scan/filename=$iso noprompt noeject
initrd (loop)/initrd.gz
}
# 14.x Trusty LTS -- 32bit for Pentium M
menuentry "Ubuntu 14.04/Trusty LTS - 32bit Installer ('forcepae' for Pentium M)" {
set iso="/iso/ubuntu-14.04-mini-i386.iso"
loopback loop $iso
linux (loop)/linux boot=casper iso-scan/filename=$iso noprompt noeject forcepae
initrd (loop)/initrd.gz
}
}
# ---- MINT ----
# menuentry "Linux Mint ISO" {
# loopback loop /linuxmint.iso
# linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=/linuxmint.iso noeject noprompt splash --
# initrd (loop)/casper/initrd.lz
# }
# ---- CentOS ----
submenu 'CentOS GNU/Linux >>' {
menuentry "CentOS 7 Live GNOME" --class centos {
set iso="/iso/CentOS-7-x86_64-LiveGNOME-1708.iso"
loopback loop $iso
linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=CentOS-7-x86_64-LiveGNOME-1708 rootfstype=auto ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0 iso-scan/filename=${iso}
initrd (loop)/isolinux/initrd0.img
}
menuentry "CentOS 6.9 Live DVD" --class centos {
set iso="/iso/CentOS-6.9-x86_64-LiveDVD.iso"
loopback loop $iso
linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=CentOS-6.9-x86_64-LiveDVD rootfstype=auto ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0 iso-scan/filename=${iso}
initrd (loop)/isolinux/initrd0.img
}
# see also: https://www.if-not-true-then-false.com/2011/centos-6-netinstall-network-installation/
menuentry "CentOS 6.9 Net-Install" --class centos {
set iso="/iso/CentOS-6.9-x86_64-netinstall.iso"
loopback loop $iso
linux (loop)/isolinux/vmlinuz iso-scan/filename=${iso}
initrd (loop)/isolinux/initrd.img
}
}
# ---- FreeBSD ----
# ---- Others/Utility ----
menuentry "" { true }
submenu 'Disk / Partition Utilities >>' {
# GParted - http://gparted.org/download.php
# see also: https://github.com/thias/glim/blob/master/grub2/inc-gparted.cfg
menuentry "GParted Live 0.30.x AMD64" {
set iso="/iso/gparted-live-0.30.0-1-amd64.iso"
loopback loop "($root)$iso"
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components noswap ip= net.ifnames=0 nosplash findiso=$iso
initrd (loop)/live/initrd.img
}
menuentry "GParted Live 0.20.x i486" {
set iso="/iso/gparted-live-0.20.0-2-i486.iso"
loopback loop $iso
linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt ip=frommedia toram=filesystem.squashfs findiso=$iso
initrd (loop)/live/initrd.img
}
menuentry "Clonezilla Live" --class clonezilla {
set iso="/iso/clonezilla-live-2.5.2-31-amd64.iso"
loopback loop $iso
linux (loop)/live/vmlinuz boot=live findiso=${iso} union=overlay components quiet toram=live,syslinux
initrd (loop)/live/initrd.img
}
# DBAN - http://www.dban.org/download
menuentry "Darik's Boot and Nuke" {
set iso="/iso/dban-2.3.0_i586.iso"
loopback loop $iso
linux (loop)/DBAN.BZI nuke="dwipe"
}
# PartedMagic (not free) - http://partedmagic.com/downloads/
# LOTS of other options in the iso-embedded grub.cfg that might be useful.
# related helpful tip from: http://www.rmprepusb.com/tutorials/128-partedmagiclive
submenu 'PartedMagic >>' {
set pmiso="/iso/pmagic_2017_09_05.iso"
set pmbase="iso_filename=${pmiso} edd=on gfxpayload=vga=normal"
set pmlive="boot=live eject=no"
menuentry "Parted Magic 2017-09-05 64bit (from RAM)" {
set iso="${pmiso}"
loopback loop $iso
linux (loop)/pmagic/bzImage64 ${pmbase}
initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m64.img
}
menuentry "Parted Magic 2017-09-05 32bit (from RAM)" {
set iso="/iso/pmagic_2017_09_05.iso"
loopback loop $iso
linux (loop)/pmagic/bzImage ${pmbase}
initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m32.img
}
menuentry "Parted Magic 2017-09-05 64bit (LIVE)" {
set iso="${pmiso}"
loopback loop $iso
linux (loop)/pmagic/bzImage64 ${pmbase} ${pmlive}
initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m64.img
}
menuentry "Parted Magic 2017-09-05 32bit (LIVE)" {
set iso="/iso/pmagic_2017_09_05.iso"
loopback loop $iso
linux (loop)/pmagic/bzImage ${pmbase} ${pmlive}
initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m32.img
}
menuentry "" { true }
menuentry "NOTE: PartedMagic is NOT free; It is mostly a repackaging of other tools," { true }
menuentry "including gparted, nswipe, clonezilla, clamav, etc. Useful? YMMV." { true }
}
}
#menuentry "Ultimate Boot CD" {
# set iso="/iso/ubcd511.iso"
# loopback loop $iso
# linux (loop)/bootlinux
# initrd (loop)/initrd.gz
#}
# needs to know where the cd root is - guesses sda1, but should be hda1. Kernel option?
menuentry "Trinity Rescue Kit" {
set iso="/iso/trinity-rescue-kit.3.4-build-372.iso"
loopback loop $iso
linux (loop)/kernel.trk ramdisk_size=65536 root=/dev/ram0 vga=788 splash=verbose pci=conf1 trkmenu
initrd (loop)/initrd.trk
}
# NT Change Password:
menuentry "Change Windows (NT+) Password CD" {
set iso="/iso/chntpw-140201.iso"
loopback loop $iso
linux (loop)/vmlinuz findiso=$iso
initrd (loop)/initrd.cgz
}
# Notes from JPS:
# I found that I don't need to create an NT recovery boot disk. I just
# need the static version of the executable from here:
# http://pogostick.net/~pnh/ntpasswd/editor.html
# Then I can launch it from any linux environment.
#menuentry "GRML - Friend of the sysadmin" {
# iso_path="/iso/grml96-full.iso"
# export iso_path
# loopback loop $iso_path
# search --set=root --file $iso --no-floppy --fs-uuid
# set root=(loop)
# configfile /boot/grub/loopback.cfg
#}
#menuentry "TAILS - The Amnesic Incognito Live System" {
# set iso="/iso/tails-i386.iso"
# loopback loop $iso
# linux (loop)/live/vmlinuz boot=live config live-media=removable nopersistent noprompt quiet timezone=America/Toronto block.events_dfl_poll_msecs=1000 splash nox11autologin module=Tails findiso=$iso quiet_
# initrd (loop)/live/initrd.img
#}
#
#menuentry "Tinycore ISO" {
# loopback loop /tinycore.iso
# linux (loop)/boot/bzImage --
# initrd (loop)/boot/tinycore.gz
#}
#
#menuentry "SystemRescueCd" {
# loopback loop /systemrescuecd.iso
# linux (loop)/isolinux/rescuecd isoloop=/systemrescuecd.iso setkmap=us docache dostartx
# initrd (loop)/isolinux/initram.igz
# Older version, for which I previously wrote this note, which I now believe to be false or OBE.
# When using DBAN remove the USB stick immediately when the boot
# messages begin to scroll past... otherwise it will scan for USB
# drives and later fail when selecting a hard drive to wipe.
#menuentry "Darik's Boot and Nuke - (remove USB after boot starts)" {
# set iso="/iso/dban-2.2.8_i586.iso"
# loopback loop $iso
# linux (loop)/DBAN.BZI nuke="dwipe"
# #linux (loop)/DBAN.BZI nuke="dwipe" iso-scan/filename=/dban.iso silent --
#}
# Memtest86+ - http://www.memtest.org/#downiso
menuentry "Memtest86+ - RAM Tester" {
linux16 /iso/memtest86+-5.01.bin
}
# "Default" entries:
menuentry ' ' { true } # empty line
# Chainloading - sort of works; notes:
# - https://wiki.gentoo.org/wiki/GRUB2/Chainloading
# - https://unix.stackexchange.com/questions/343632/uefi-chainloading-grub-from-grub
# - https://www.gnu.org/software/grub/manual/grub/grub.html#configfile
# - https://askubuntu.com/questions/320810/what-is-the-recommended-way-to-chainload-separate-ubuntu-boot-partition
menuentry "Chainload Next Disk (hd1,msdos1/sdb1)" {
insmod chain
insmod part_msdos
insmod ext2
insmod lvm
#set root=(hd1,msdos1)
#chainloader +1
#chainloader (hd1,msdos1)+1
configfile (hd1,msdos1)/grub/grub.cfg
}
menuentry "Shutdown" --class shutdown { halt }
menuentry "Reboot" --class shutdown { reboot }
# EOF grub.cfg