systemrescue-zfs/efiboot/grub/grubsrcd.cfg
Gerd v. Egidy 79a82cba76 add customization hooks to boot menus
Adds empty sysresccd_custom.cfg and /boot/grub/custom.cfg files that
are included from the regular boot menus (syslinux and grub). These
are intended for the user to customize.

Having dedicated files for this allows completely replacing the files.
This is easier than requiring careful patching with potential conflicts
with different versions of SystemRescue.
2023-03-11 22:18:44 +01:00

117 lines
4.1 KiB
INI

# SystemRescue main GRUB config file
# Note: This is set when we are loaded from loopback.cfg
if [ -z "$srcd_skip_init" ]; then
# Global options
set timeout=30
set default=0
set fallback=1
set pager=1
# Display settings
if loadfont /boot/grub/font.pf2 ; then
set gfxmode=640x480
set color_normal=black/cyan
set color_highlight=black/light-gray
set menu_color_normal=black/cyan
set menu_color_highlight=black/light-gray
insmod efi_gop
insmod efi_uga
insmod gfxterm
insmod all_video
insmod videotest
insmod videoinfo
terminal_output gfxterm
fi
# enable serial console with common settings (ttyS0, 115200 Baud, 8n1)
# this works in parallel to regular console
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
terminal_input --append serial
terminal_output --append serial
fi
if [ -z "$archiso_param" ]; then
archiso_param="archisolabel=%ARCHISO_LABEL%"
fi
# Placing menuentry commands inside an eval allows the value of variables
# like $archiso_param to be visible in the GRUB editor
eval "
menuentry 'Boot SystemRescue using default options' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% $archiso_param %DEFAULT_KERNEL_PARAM%
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
}
menuentry 'Boot SystemRescue and copy system to RAM (copytoram)' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% $archiso_param %DEFAULT_KERNEL_PARAM% copytoram
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
}
menuentry 'Boot SystemRescue and verify integrity of the medium (checksum)' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% $archiso_param %DEFAULT_KERNEL_PARAM% checksum
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
}
menuentry 'Boot SystemRescue using basic display drivers (nomodeset)' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% $archiso_param %DEFAULT_KERNEL_PARAM% nomodeset
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
}
menuentry 'Boot SystemRescue with serial console (ttyS0,115200n8)' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% $archiso_param %DEFAULT_KERNEL_PARAM% console=tty0 console=ttyS0,115200n8
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
}
menuentry 'Boot SystemRescue, do not activate md raid or lvm (nomdlvm)' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% $archiso_param %DEFAULT_KERNEL_PARAM% nomdlvm
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
}
menuentry 'Boot a Linux operating system installed on the disk (findroot)' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% $archiso_param %DEFAULT_KERNEL_PARAM% findroot
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
}
menuentry 'Stop during the boot process before mounting the root filesystem' {
set gfxpayload=keep
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% $archiso_param %DEFAULT_KERNEL_PARAM% break
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
}
source /boot/grub/custom.cfg
menuentry 'Memtest86+ memory tester for UEFI' {
insmod fat
set gfxpayload=800x600,1024x768
linux /EFI/memtest.efi keyboard=both
}
menuentry 'Start EFI Shell' {
insmod fat
insmod chain
terminal_output console
chainloader /EFI/shell.efi
}
menuentry 'EFI Firmware setup' {
fwsetup
}
menuentry 'Reboot' {
reboot
}
menuentry 'Power off' {
halt
}
" # end eval