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