mirror of
https://github.com/nchevsky/systemrescue-zfs.git
synced 2025-12-06 07:12:01 +01:00
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.
This commit is contained in:
parent
b562441a90
commit
79a82cba76
1
build.sh
1
build.sh
|
|
@ -342,6 +342,7 @@ make_efi() {
|
||||||
s|%INSTALL_DIR%|${install_dir}|g" \
|
s|%INSTALL_DIR%|${install_dir}|g" \
|
||||||
${script_path}/efiboot/grub/grubsrcd.cfg > ${work_dir}/iso/boot/grub/grubsrcd.cfg
|
${script_path}/efiboot/grub/grubsrcd.cfg > ${work_dir}/iso/boot/grub/grubsrcd.cfg
|
||||||
cp ${script_path}/efiboot/grub/loopback.cfg ${work_dir}/iso/boot/grub/
|
cp ${script_path}/efiboot/grub/loopback.cfg ${work_dir}/iso/boot/grub/
|
||||||
|
cp ${script_path}/efiboot/grub/custom.cfg ${work_dir}/iso/boot/grub/
|
||||||
cp -a /usr/share/edk2-shell/${edk2arch}/Shell_Full.efi ${work_dir}/iso/EFI/shell.efi
|
cp -a /usr/share/edk2-shell/${edk2arch}/Shell_Full.efi ${work_dir}/iso/EFI/shell.efi
|
||||||
cp ${work_dir}/${arch}/airootfs/boot/memtest86+/memtest.efi ${work_dir}/iso/EFI/memtest.efi
|
cp ${work_dir}/${arch}/airootfs/boot/memtest86+/memtest.efi ${work_dir}/iso/EFI/memtest.efi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
5
efiboot/grub/custom.cfg
Normal file
5
efiboot/grub/custom.cfg
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# This file is intended for customizing the boot menu of SystemRescue
|
||||||
|
#
|
||||||
|
# Either edit this file on a writable media
|
||||||
|
# or use https://www.system-rescue.org/scripts/sysrescue-customize/ to replace it
|
||||||
|
|
||||||
|
|
@ -87,6 +87,8 @@ menuentry 'Stop during the boot process before mounting the root filesystem' {
|
||||||
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
|
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' {
|
menuentry 'Memtest86+ memory tester for UEFI' {
|
||||||
insmod fat
|
insmod fat
|
||||||
set gfxpayload=800x600,1024x768
|
set gfxpayload=800x600,1024x768
|
||||||
|
|
|
||||||
5
syslinux/sysresccd_custom.cfg
Normal file
5
syslinux/sysresccd_custom.cfg
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# This file is intended for customizing the boot menu of SystemRescue
|
||||||
|
#
|
||||||
|
# Either edit this file on a writable media
|
||||||
|
# or use https://www.system-rescue.org/scripts/sysrescue-customize/ to replace it
|
||||||
|
|
||||||
|
|
@ -73,4 +73,6 @@ LINUX boot/%ISO_ARCH%/vmlinuz
|
||||||
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
||||||
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% %DEFAULT_KERNEL_PARAM% break
|
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% %DEFAULT_KERNEL_PARAM% break
|
||||||
|
|
||||||
|
INCLUDE boot/syslinux/sysresccd_custom.cfg
|
||||||
|
|
||||||
INCLUDE boot/syslinux/sysresccd_tail.cfg
|
INCLUDE boot/syslinux/sysresccd_tail.cfg
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue