diff --git a/mantle/platform/api/aws/images.go b/mantle/platform/api/aws/images.go index 95566584ed..eb2bf22081 100644 --- a/mantle/platform/api/aws/images.go +++ b/mantle/platform/api/aws/images.go @@ -344,11 +344,14 @@ func (a *API) CreateHVMImage(snapshotID string, diskSizeGiB uint, name string, d if !set { imdsSupport = "v2.0" } + bootmode, set = os.LookupEnv("MANTLE_AWS_BOOT_MODE_x86_64") switch architecture { case "amd64", "x86_64": awsArch = ec2.ArchitectureTypeX8664 - bootmode = "uefi-preferred" + if !set { + bootmode = "uefi-preferred" + } case "arm64", "aarch64": awsArch = ec2.ArchitectureTypeArm64 bootmode = "uefi" diff --git a/src/cosalib/aws.py b/src/cosalib/aws.py index 284e0737d6..529e310011 100644 --- a/src/cosalib/aws.py +++ b/src/cosalib/aws.py @@ -119,7 +119,7 @@ def aws_run_ore(build, args): ) os.environ["MANTLE_AWS_IMDS_SUPPORT"] = image_yaml['aws-imds-support'] os.environ["MANTLE_AWS_VOLUME_TYPE"] = image_yaml['aws-volume-type'] - os.environ["aws_boot_mode"] = image_yaml['aws-boot-mode'] + os.environ["MANTLE_AWS_BOOT_MODE_x86_64"] = image_yaml['aws-boot-mode-x86-64'] # First add the ore command to run before any options ore_args = ['ore', 'aws', 'upload'] diff --git a/src/image-default.yaml b/src/image-default.yaml index 854b558cf6..675bc0cb0d 100644 --- a/src/image-default.yaml +++ b/src/image-default.yaml @@ -31,3 +31,4 @@ vmware-secure-boot: true # Defaults for AWS aws-imds-support: "v2.0" aws-volume-type: "gp3" +aws-boot-mode-x86-64: "uefi-preferred"