fix: ensure /EFI/BOOT directory gets created on empty secureboot partition
@@ -96,9 +96,13 @@ rm "$cmdline_file" "$initrd"
datefudge -s "@$timestamp" sbsign --cert "$cert" --key "$key" --output "$unified_image_signed" "$unified_image"
rm "$unified_image"
+efi_dir="$(mktemp -d)"
+mkdir -p "$efi_dir/EFI/BOOT/"
+mv "$unified_image_signed" "$efi_dir/EFI/BOOT/BOOT$uefi_arch.EFI"
+
while read -r partition_file; do
# copy unified image to uefi partition
- datefudge -s "@$timestamp" mcopy -i "$partition_file" -o -p "$unified_image_signed" "::/EFI/BOOT/BOOT$uefi_arch.EFI"
+ datefudge -s "@$timestamp" mcopy -i "$partition_file" -s -p "$efi_dir/EFI" "::/EFI"
done
-rm "$unified_image_signed"
+rm -rf "$efi_dir"
