Skip to content

Commit fc563bc

Browse files
committed
live ISO grub config
1 parent f1d3f34 commit fc563bc

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

grub/grub.cfg

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Load partition table and file system modules
2+
insmod part_gpt
3+
insmod part_msdos
4+
insmod fat
5+
insmod iso9660
6+
insmod ntfs
7+
insmod ntfscomp
8+
insmod exfat
9+
insmod udf
10+
11+
# Use graphics-mode output
12+
insmod all_video
13+
insmod font
14+
if loadfont "${prefix}/fonts/unicode.pf2" ; then
15+
set gfxmode="auto"
16+
terminal_input console
17+
terminal_output console
18+
fi
19+
20+
# Enable serial console
21+
if serial --unit=0 --speed=115200; then
22+
terminal_input --append serial
23+
terminal_output --append serial
24+
fi
25+
26+
# Search for the ISO volume
27+
if [ -z "${ARCHISO_UUID}" ]; then
28+
if [ -z "${ARCHISO_HINT}" ]; then
29+
regexp --set=1:ARCHISO_HINT '^\(([^)]+)\)' "${cmdpath}"
30+
fi
31+
search --no-floppy --set=root --file '%ARCHISO_SEARCH_FILENAME%' --hint "${ARCHISO_HINT}"
32+
probe --set ARCHISO_UUID --fs-uuid "${root}"
33+
fi
34+
35+
# Set default menu entry
36+
default=archlinux
37+
timeout=15
38+
timeout_style=menu
39+
40+
# GRUB init tune for accessibility
41+
# play 600 988 1 1319 4
42+
43+
# Menu entries
44+
45+
menuentry "TCET Linux install medium (x86_64, UEFI)" --class arch --class gnu-linux --class gnu --class os --id 'tcetlinux' {
46+
set gfxpayload=keep
47+
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} copytoram=n cow_spacesize=5G nouveau.modeset=1 radeon.modeset=1 i915.modeset=1 nvme_load=yes
48+
initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
49+
}
50+
51+
if [ "${grub_platform}" == "efi" ]; then
52+
if [ "${grub_cpu}" == "x86_64" ]; then
53+
menuentry "Run Memtest86+ (RAM test)" --class memtest86 --class gnu --class tool {
54+
set gfxpayload=800x600,1024x768
55+
linux /boot/memtest86+/memtest.efi
56+
}
57+
menuentry "UEFI Shell" {
58+
insmod chain
59+
chainloader /shellx64.efi
60+
}
61+
elif [ "${grub_cpu}" == "i386" ]; then
62+
menuentry "UEFI Shell" {
63+
insmod chain
64+
chainloader /shellia32.efi
65+
}
66+
fi
67+
68+
menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
69+
fwsetup
70+
}
71+
fi
72+
73+
menuentry "System shutdown" --class shutdown --class poweroff {
74+
echo "System shutting down..."
75+
halt
76+
}
77+
78+
menuentry "System restart" --class reboot --class restart {
79+
echo "System rebooting..."
80+
reboot
81+
}

0 commit comments

Comments
 (0)