grubby/boot/grub/grub.cfg

185 lines
3.3 KiB
INI
Raw Normal View History

2020-03-03 12:56:06 +01:00
# Inspired by GLIM and Multiboot USB
set timeout=-1
2020-03-03 12:56:06 +01:00
insmod all_video
set gfxpayload=keep
2020-11-13 00:50:49 +01:00
# ISOs configuration
set isoconfig="/boot/isos.cfg"
export isoconfig
# Persistent folder
set persistent="${prefix}/persistent"
export persistent
2020-03-03 12:56:06 +01:00
# Enable GUI
terminal_output gfxterm
2020-11-13 00:50:49 +01:00
# Get the ROOTUUID of this USB stick
2020-03-03 12:56:06 +01:00
probe -u $root --set=rootuuid
set imgdevpath="/dev/disk/by-uuid/$rootuuid"
export imgdevpath rootuuid
2020-11-13 00:50:49 +01:00
# Enable the Pager
set pager=1
2020-11-13 00:50:49 +01:00
# Get theming
if [ -f "${prefix}/mytheme.cfg" ]; then
if [ -f "${prefix}/theming.cfg" ]; then
# load theme_name
source "${prefix}/mytheme.cfg"
# set theme
source "${prefix}/theming.cfg"
fi
fi
2020-03-03 12:56:06 +01:00
2020-11-13 00:50:49 +01:00
# Start the menuentries
##############
menuentry "[c] CPU info " --hotkey=c {
echo "This CPU:"
echo " * ${grub_cpu}"
echo " * ${grub_platform}"
2020-11-13 00:50:49 +01:00
if cpuid -l ; then
echo " * supports 64-bit."
2020-11-13 00:50:49 +01:00
else
echo " * does not support 64-bit."
2020-11-13 00:50:49 +01:00
fi
if cpuid -p ; then
echo " * supports PAE."
2020-11-13 00:50:49 +01:00
else
echo " * does not support PAE."
2020-11-13 00:50:49 +01:00
fi
sleep --interruptible 10
}
2023-04-07 19:04:26 +02:00
if [ -f "/boot/tinycore/tinycore.cfg" ]; then
menuentry "[t] Tiny Core" --hotkey=t {
configfile /boot/tinycore/tinycore.cfg
}
fi
2020-11-13 00:50:49 +01:00
menuentry "[l] Local Boot" --hotkey=l {
2020-03-03 12:56:06 +01:00
insmod chain
2020-11-13 00:50:49 +01:00
2020-03-03 12:56:06 +01:00
chainloader +1
}
2020-11-13 00:50:49 +01:00
if [ -f "${isoconfig}" ]; then
menuentry ' ' { true }
menuentry "[o] Inspect Isos >" --hotkey=o --id=isos {
2020-11-13 00:50:49 +01:00
echo "Loading various ISO configurations"
configfile "${isoconfig}"
}
menuentry ' ' { true }
fi
2020-03-03 12:56:06 +01:00
submenu "[g] GRUB2 options -> " --hotkey=g {
2020-11-13 00:50:49 +01:00
menuentry "Show Drives" {
ls -l
sleep --interruptible 9999
}
2020-03-03 12:56:06 +01:00
2020-11-13 00:50:49 +01:00
menuentry "Enable LVM support" {
insmod lvm
}
2020-11-13 00:50:49 +01:00
menuentry "Enable RAID support" {
insmod dm_nv
insmod mdraid09_be
insmod mdraid09
insmod mdradi1x
insmod raid5rec
insmod raid6rec
}
menuentry "Enable PATA support" {
insmod ata
update_paths
}
2020-11-13 00:50:49 +01:00
menuentry "Mount encrypted volumnes (LUKS and geli)" {
insmod luks
insmod geli
cryptomount -a
}
menuentry "Enable Serial Terminal" {
serial
terminal_input --append serial
terminal_output --apend serial
}
menuentry "Enable USB support *experimental*" {
insmod ohci
insmod uhci
insmod usbms
update_paths
}
}
if [ ${grub_platform} == "efi" ]; then
# place UEFI-only menu entries here
2020-11-13 00:50:49 +01:00
menuentry "Firmware Setup " --class efi {
fwsetup
}
menuentry "UEFI Shell" --class efi {
insmod fat
insmod chain
search --no-floppy --set=root --file /shellx64.efi
chainloader /shellx64.efi
}
2020-03-03 12:56:06 +01:00
fi
2020-11-13 00:50:49 +01:00
menuentry ' ' { // Empty Line
true
}
menuentry "[i] Invaders" --hotkey=i --class=game --class=invaders {
echo "Starting Invaders"
multiboot "${persistent}/invaders/invaders"
2020-11-13 00:50:49 +01:00
boot
}
menuentry "[b] netboot.xyz" --hotkey=b --class=netboot {
echo "Using netboot.xyz"
if [ ${grub_platform} == "efi" ]; then
chainloader "${persistent}/netboot.xyz/netboot.xyz.efi"
else
linux16 "${persistent}/netboot.xyz/netboot.xyz.lkrn"
fi
}
menuentry "[d] read Grub2 Documentation" --hotkey=d --class=docs {
docs="${persistent}/docs"
export docs
configfile "${docs}/show-docs.cfg"
}
menuentry "[m] MemTest86+" --hotkey=m {
linux16 "${persistent}/memtest86/memtest86+-5.31b.bin"
2020-11-13 00:50:49 +01:00
}
menuentry ' ' { // Empty Line
2020-03-03 12:56:06 +01:00
true
}
menuentry "[s] Shutdown" --class shutdown --hotkey=s {
echo "System shutting down..."
2020-03-03 12:56:06 +01:00
halt
}
menuentry "[r] Reboot" --class shutdown --hotkey=r {
echo "System rebooting..."
2020-03-03 12:56:06 +01:00
reboot
}