-
Notifications
You must be signed in to change notification settings - Fork 13
/
grub.cfg
72 lines (65 loc) · 2.3 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
# Example grub.cfg file
if [ "${grub_platform}" = "efi" ]; then
rmmod tpm # See https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1851311
fi
menuentry 'Xubuntu 22.04 amd64' {
set isofile="/isos/xubuntu-22.04.5-desktop-amd64.iso"
loopback isoloop $isofile
linux (isoloop)/casper/vmlinuz locale=en_US console-setup/layoutcode=us boot=casper iso-scan/filename=$isofile quiet --
initrd (isoloop)/casper/initrd
loopback --delete isoloop
}
menuentry 'Arch Linux install medium (x86_64)' {
set isofile="/isos/archlinux-2024.09.01-x86_64.iso"
loopback isoloop $isofile
probe --set=rootuuid --fs-uuid $root
linux (isoloop)/arch/boot/x86_64/vmlinuz-linux img_loop=$isofile img_dev=UUID=$rootuuid
initrd (isoloop)/arch/boot/x86_64/initramfs-linux.img
loopback --delete isoloop
}
menuentry 'SliTaz GNU/Linux' {
set isofile="/isos/slitaz-rolling-core-5in1.iso"
loopback isoloop $isofile
set slitaz_img="/boot/bzImage"
if [ "${grub_platform}" = "efi" ]; then
if [ "${grub_cpu}" = "x86_64" ]; then
set slitaz_img="${slitaz_img}64"
fi
elif cpuid -l; then
set slitaz_img="${slitaz_img}64"
fi
linux (isoloop)$slitaz_img root=/dev/null video=-32 autologin
initrd (isoloop)/boot/rootfs5.gz (isoloop)/boot/rootfs4.gz (isoloop)/boot/rootfs3.gz (isoloop)/boot/rootfs2.gz (isoloop)/boot/rootfs1.gz
loopback --delete isoloop
}
menuentry 'Memtest86+ 7.00' {
set mt86plus_ext=".bin"
set mt86plus_loader="linux16"
set mt86plus_bitness="32"
if [ "${grub_platform}" = "efi" ]; then
set mt86plus_ext=".efi"
set mt86plus_loader="chainloader"
if [ "${grub_cpu}" = "x86_64" ]; then
set mt86plus_bitness="64"
fi
elif cpuid -l; then
set mt86plus_bitness="64"
fi
set mt86plus_file="/mt86plus_7.00.binaries/memtest${mt86plus_bitness}${mt86plus_ext}"
$mt86plus_loader $mt86plus_file
}
# The examples above only require a single partition. The example below assumes
# that a second partition, formatted as NTFS and labeled `W10_ISO`, contains the
# files extracted from a Windows 10 installation ISO.
# This also works with Windows 11, except with a 32-bit UEFI.
menuentry 'Windows 10 installation media' {
insmod ntfs
search --set=root --label W10_ISO
if [ "${grub_platform}" = "pc" ]; then
ntldr /bootmgr
elif [ "${grub_cpu}" = "i386" ]; then
chainloader /efi/boot/bootia32.efi
else
chainloader /efi/boot/bootx64.efi
fi
}