From 577e1e91e38ad0cad8239e3bcbe2529603560962 Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Sat, 22 Jul 2023 12:37:17 +0200 Subject: [PATCH] Add support for EFI default image --- build-uki.sh | 5 +++++ variables.conf.template | 1 + 2 files changed, 6 insertions(+) diff --git a/build-uki.sh b/build-uki.sh index e50c44d..bfdec7a 100755 --- a/build-uki.sh +++ b/build-uki.sh @@ -21,4 +21,9 @@ $sudo objcopy \ # Sign UKI $sudo sbsign --key /etc/secureboot/full/db.key --cert /etc/secureboot/full/db.crt --output $path_to_uki $path_to_uki +# if needed, copy UKI to EFI default boot path +if [[ -v $set_efi_default_image ]] && [[ $set_efi_default_image = "yes" ]]; then + $sudo cp $path_to_uki /efi/EFI/BOOT/BOOTX64.EFI +fi + exit 0 diff --git a/variables.conf.template b/variables.conf.template index 186fa3e..c73c46a 100644 --- a/variables.conf.template +++ b/variables.conf.template @@ -4,3 +4,4 @@ path_to_vmlinuz_link=/boot # /boot in Ubuntu 22.04, / in Debian 11 path_to_uki=/efi/EFI/debian/debian-linux.efi +set_efi_default_image="no" # change to "yes" if you need to boot from EFI\BOOT\BOOTX64.EFI