- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
To create an AL2023 image with UEFI Secure Boot using a third-party key, there are a few important considerations that might explain why your instance isn't booting.
First, AL2023 supports UEFI Secure Boot starting with release 2023.1, but there are specific steps needed for custom keys. When using custom keys with AL2023, you need to ensure you're following the complete process:
-
For the key enrollment, you need to create all three required key databases: Platform Key (PK), Key Exchange Key (KEK), and Signature database (db). These form the chain of trust for UEFI Secure Boot.
-
When signing boot files, ensure you're signing all necessary components. While you've signed the kernel and the BOOTX64.EFI file, AL2023 uses grub2 as its bootloader, which also needs to be properly signed.
-
When creating the AMI, make sure you're using the binary blob from the same release of AL2023 that you're using to create the AMI. Using mismatched versions can cause boot failures.
-
When registering your AMI, ensure you've set the
BootModeparameter touefiandTpmSupporttov2.0if applicable. -
Remember that by default, UEFI Secure Boot is disabled and the system is in "SetupMode." The system exits SetupMode only when the PK is properly set, which enables UEFI Secure Boot.
For AL2023 specifically, you might want to use the amazon-linux-sb enroll command to help with the key enrollment process, though this would be for Amazon's keys rather than your third-party keys.
The process you're following from the EC2 documentation is generally correct, but AL2023 might have specific requirements for its bootloader configuration. Since your similar process worked for Red Hat Linux, the issue might be related to differences in how AL2023 implements UEFI Secure Boot compared to Red Hat.
Sources
Create a Linux AMI with custom UEFI Secure Boot keys - Amazon Elastic Compute Cloud
UEFI Secure Boot on AL2023 - Amazon Linux 2023
Requirements for UEFI Secure Boot on Amazon EC2 - Amazon Elastic Compute Cloud
How UEFI Secure Boot works with Amazon EC2 instances - Amazon Elastic Compute Cloud
Regarding signing grub, I could not find the file grubx64.efi at the /boot directory.
