From 8874befa3af7eb95f5adaa2f54e57dcf00bc3249 Mon Sep 17 00:00:00 2001 From: Gwen Dawes Date: Tue, 10 Dec 2024 15:55:57 +0000 Subject: [PATCH] Force grub2-install to bypass secureboot complaints. GRUB_OPTS is already set to --force by default and is being overriden to the x86_64 target for those architectures. It would be more effective to append this target to the options instead of overriding it. In EL9 images, grub2-install will not proceed as it complains about not supporting secure boot. This isn't appropriate for the way that diskimage-builder works, and thus --force is needed to bypass this. Closes-Bug: 1930878 Change-Id: I989bd009548adc7bbf58154577c24980bd62cb2d --- .../elements/bootloader/finalise.d/50-bootloader | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diskimage_builder/elements/bootloader/finalise.d/50-bootloader b/diskimage_builder/elements/bootloader/finalise.d/50-bootloader index e20f07db1..f3e0c2f36 100755 --- a/diskimage_builder/elements/bootloader/finalise.d/50-bootloader +++ b/diskimage_builder/elements/bootloader/finalise.d/50-bootloader @@ -329,9 +329,9 @@ else # This call installs grub for BIOS compatability # which makes portable EFI/BIOS images. $GRUBNAME --modules="$modules" --target=i386-pc $BOOT_DEV - # Set the x86_64 specific efi target for the generic + # Append the x86_64 specific efi target for the generic # installation below. - GRUB_OPTS="--target=x86_64-efi" + GRUB_OPTS="${GRUB_OPTS} --target=x86_64-efi" ;; # At this point, we don't need to override the target # for any other architectures.