fix grub config

This commit is contained in:
Tobias Powalowski 2022-03-07 15:14:15 +01:00
parent 989b7f607e
commit eb61050c6a
2 changed files with 33 additions and 17 deletions

View file

@ -9,7 +9,7 @@ _SHIM_RPM="x86_64/shim-x64-${_SHIM_VERSION}-${_SHIM_RELEASE}.x86_64.rpm"
_SHIM32_RPM="x86_64/shim-ia32-${_SHIM_VERSION}-${_SHIM_RELEASE}.x86_64.rpm" _SHIM32_RPM="x86_64/shim-ia32-${_SHIM_VERSION}-${_SHIM_RELEASE}.x86_64.rpm"
_SHIM_AA64_RPM="aarch64/shim-aa64-${_SHIM_VERSION}-${_SHIM_RELEASE}.aarch64.rpm" _SHIM_AA64_RPM="aarch64/shim-aa64-${_SHIM_VERSION}-${_SHIM_RELEASE}.aarch64.rpm"
_ARCH_SERVERDIR="/home/tpowa/public_html/archboot-helper/bootloader" _ARCH_SERVERDIR="/home/tpowa/public_html/archboot-helper/bootloader"
_GRUB_ISO="/usr/share/archboot/grub/grub-iso.cfg" _GRUB_ISO="/usr/share/archboot/grub/archboot-iso-grub.cfg"
_prepare_shim_files () { _prepare_shim_files () {
# download packages from fedora server # download packages from fedora server

View file

@ -26,11 +26,29 @@ fi
set timeout="10" set timeout="10"
function _menu_running {
echo "Running menu entry:"
echo "${chosen} ..."
echo "Please wait ..."
}
function _secure_boot_tools {
menuentry "Secure Boot KeyTool" {
_menu_running
chainloader /EFI/tools/KeyTool.efi
}
menuentry "Secure Boot HashTool" {
_menu_running
chainloader /EFI/tools/HashTool.efi
}
}
if [ ${grub_platform} == "pc" ]; then if [ ${grub_platform} == "pc" ]; then
set default="Arch Linux X86_64 Archboot - BIOS Mode" set default="Arch Linux X86_64 Archboot - BIOS Mode"
menuentry "Arch Linux x86_64 Archboot - BIOS Mode" { menuentry "Arch Linux x86_64 Archboot - BIOS Mode" {
set gfxpayload=keep set gfxpayload=keep
_menu_running
linux /boot/vmlinuz_x86_64 cgroup_disable=memory rootfstype=ramfs linux /boot/vmlinuz_x86_64 cgroup_disable=memory rootfstype=ramfs
initrd /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs_x86_64.img initrd /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs_x86_64.img
} }
@ -42,24 +60,22 @@ if [ ${grub_platform} == "efi" ]; then
menuentry "Arch Linux x86_64 Archboot" { menuentry "Arch Linux x86_64 Archboot" {
set gfxpayload=keep set gfxpayload=keep
_menu_running
linux /boot/vmlinuz_x86_64 cgroup_disable=memory rootfstype=ramfs add_efi_memmap linux /boot/vmlinuz_x86_64 cgroup_disable=memory rootfstype=ramfs add_efi_memmap
initrd /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs_x86_64.img initrd /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs_x86_64.img
} }
submenu "UEFI Tools" { submenu "UEFI Tools" {
menuentry "Secure Boot KeyTool" {
chainloader /EFI/tools/KeyTool.efi
}
menuentry "Secure Boot HashTool" { _secure_boot_tools
chainloader /EFI/tools/HashTool.efi
}
menuentry "UEFI Shell X64 v2" { menuentry "UEFI Shell X64 v2" {
_menu_running
chainloader /EFI/tools/shellx64_v2.efi chainloader /EFI/tools/shellx64_v2.efi
} }
menuentry "UEFI Shell X64 v1" { menuentry "UEFI Shell X64 v1" {
_menu_running
chainloader /EFI/tools/shellx64_v1.efi chainloader /EFI/tools/shellx64_v1.efi
} }
} }
@ -68,53 +84,53 @@ if [ ${grub_platform} == "efi" ]; then
menuentry "Arch Linux AA64 Archboot" { menuentry "Arch Linux AA64 Archboot" {
set gfxpayload=keep set gfxpayload=keep
_menu_running
linux /boot/vmlinuz_aarch64 cgroup_disable=memory rootfstype=ramfs audit=0 nr_cpus=1 add_efi_memmap linux /boot/vmlinuz_aarch64 cgroup_disable=memory rootfstype=ramfs audit=0 nr_cpus=1 add_efi_memmap
initrd /boot/amd-ucode.img /boot/initramfs_aarch64.img initrd /boot/amd-ucode.img /boot/initramfs_aarch64.img
} }
submenu "UEFI Tools" { submenu "UEFI Tools" {
menuentry "Secure Boot KeyTool" { _secure_boot_tools
chainloader /EFI/tools/KeyTool.efi
}
menuentry "Secure Boot HashTool" {
chainloader /EFI/tools/HashTool.efi
}
} }
elif [ ${grub_cpu} == "i386" ]; then elif [ ${grub_cpu} == "i386" ]; then
set default="Arch Linux x86_64 Archboot - EFI MIXED MODE" set default="Arch Linux x86_64 Archboot - EFI MIXED MODE"
menuentry "Arch Linux x86_64 Archboot - EFI MIXED MODE" { menuentry "Arch Linux x86_64 Archboot - EFI MIXED MODE" {
set gfxpayload=keep set gfxpayload=keep
_menu_running
linux /boot/vmlinuz_x86_64 cgroup_disable=memory _IA32_UEFI=1 rootfstype=ramfs add_efi_memmap linux /boot/vmlinuz_x86_64 cgroup_disable=memory _IA32_UEFI=1 rootfstype=ramfs add_efi_memmap
initrd /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs_x86_64.img initrd /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs_x86_64.img
} }
submenu "UEFI Tools" { submenu "UEFI Tools" {
menuentry "UEFI Shell IA32 v2" { menuentry "UEFI Shell IA32 v2" {
_menu_running
chainloader /EFI/tools/shellia32_v2.efi chainloader /EFI/tools/shellia32_v2.efi
} }
menuentry "UEFI Shell IA32 v1" { menuentry "UEFI Shell IA32 v1" {
_menu_running
chainloader /EFI/tools/shellia32_v1.efi chainloader /EFI/tools/shellia32_v1.efi
} }
} }
fi fi
menuentry "Enter Firmware Setup" { menuentry "Enter Firmware Setup" {
_menu_running
fwsetup fwsetup
} }
fi fi
menuentry "System reboot" { menuentry "System reboot" {
_menu_running
reboot reboot
} }
menuentry "System shutdown" { menuentry "System shutdown" {
_menu_running
halt halt
} }
menuentry "Exit GRUB" { menuentry "Exit GRUB" {
_menu_running
exit exit
} }
echo "Running menu entry ${chosen} ..."