-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for boot_mode option for Amazon EBS builder #465
Comments
Note that the EBS builder uses the CreateImage API, which does not offer any option to set the The chroot and ebssurrogate builders use RegisterImage, which does support the |
Hello, |
Ahh, the BootMode is inherited from the selected source image. You cannot set it in the RunInstances API. You can force BIOS mode by using a UEFI Preferred image, and selecting an older instance type, say an m4, that does not support Nitro (required for UEFI). |
Ah indeed that's unfortunate but we cannot force the boot mode on instance launch. It's always derived from the AMI. The drawback is that we cannot test Legacy-bios on Nitro unless we copy an original AMI first and set the boot_mode, only then we can select it with Packer. Anyway, I'll live with that. Thanks a lot for your quick reply here ! |
Yeah, the API support for BootMode is very limited. None of CreateImage, CopyImage, or RunInstances support setting the Boot Mode. It can only be set by RegisterImage. If you have access to paid AWS Support, it would probably be worth opening a feature request to enhance the API support for BootMode. |
Hi @hegyre and @lorengordon, Thanks for the discussion already here, and sorry we haven't pinged here sooner. This looks like we can't do much on the plugin side for now, I'll leave the issue open to keep an eye on this topic, hopefully we'll have some flexibility some day to change the boot mode (though I presume this is tied to the AMI for a reason, partitioning/boot loading is very different between the two modes unfortunately). In the meantime regarding your use case @hegyre, I believe you may be able to workaround that limitation by creating a BIOS-compatible image for Centos using the Also looking at the CIS Hardening page you've linked, it looks like this is removed from a newer version of the guidelines? Is this still something you need to do for compliance? |
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Description
Those PRs #131 and #340 add support for boot_mode, but only for the "Chroot" and "EBS Surrogate" builders.
I would need to be able to select the boot_mode also for "EBS" builder.
Use Case(s)
CIS hardening needs to disable vfat filesystem. However, as mentionned:
I'd like to test it out by creating an AMI while booting with Legacy-bios instead of UEFI.
Potential configuration
Same as documented on the EBS Surrogate builder documentation for
boot_mode
and optionnaly foruefi_data
.Valid options should be
legacy-bios
anduefi
+ the non-mentionneduefi-preferred
from #362.Potential References
The text was updated successfully, but these errors were encountered: