Add support for Unified Kernel Images and Ephemeral Encryption Keys - #701
Conversation
5bbae92 to
b3338cf
Compare
|
(Forced push simplifies commit history and adds missing changes lost in rebase) |
jmt-lab
left a comment
There was a problem hiding this comment.
If some of these are inaccurate feel free to comment with explanation. I think if they aren't accurate it will help me get through my second pass if i know why since this is a rather large change.
| // the sections of the existing UKI so that the kernel command line | ||
| // carries the new dm-verity root hash, and recreates the partition. | ||
| // See `repack_uki` in `twoliter/embedded/img2img`. | ||
| Some(ImageFormat::Uki) => {} |
There was a problem hiding this comment.
nit: why is this on its own line? can be lumped in with the other supported formats
| -- \\ | ||
| systemd.log_target=journal-or-kmsg \\ | ||
| systemd.log_color=0 \\ | ||
| linux (\$root)/vmlinuz \ |
There was a problem hiding this comment.
this change seems strange. since IIUC this only affects grub, I'd prefer not to touch this unless it fixes some known bug
There was a problem hiding this comment.
Yup, the AI was fixing shellchecks, I'll drop it.
68aeb23 to
83475d8
Compare
|
The force push above addresses missing unit tests for ephemeral-encryption-keys and a formatting issue. |
83475d8 to
ddeccaf
Compare
ddeccaf to
9953c46
Compare
|
(Forced push includes a change to generate the correct hmac for the UKIs) |
Introduce a new opt-in image feature that skips seeding a persistent boot configuration, so encryption keys used for encrypted storage do not survive a reboot. This feature depends on encrypted storage being enabled and is rejected for EIF and standalone images, which lack the private data partition it relies on. Signed-off-by: Piyush Jena <jepiyush@amazon.com>
898e4bc to
fce19ac
Compare
|
(Forced push to fix conflict) |
| /// error the moment the user | ||
| /// opts into EIF. |
There was a problem hiding this comment.
nit: this comment should remain on one line
|
|
||
| # Copy the systemd-boot configuration onto the EFI system partition. | ||
| # | ||
| # systemd-boot reads exactly one configuration file, `\loader\loader.conf`, and |
There was a problem hiding this comment.
nit:
| # systemd-boot reads exactly one configuration file, `\loader\loader.conf`, and | |
| # systemd-boot reads exactly one configuration file, `/loader/loader.conf`, and |
fce19ac to
ac7a6bc
Compare
Introduce a new image-format option, uki, for building Unified Kernel Image based Bottlerocket variants using systemd-boot instead of GRUB. Since UKI images use a single-bank boot layout with no B partition set, in-place updates are rejected for this format at manifest validation time. Image builds gain support for the systemd-boot chain-loading path, including secure boot signing, an XBOOTLDR partition for boot entry discovery, and a runtime image-format file so consumers can distinguish UKI images from the rest of the A/B partition logic they otherwise rely on. Signed-off-by: Arnaldo Garcia Rincon <agarrcia@amazon.com>
Signed-off-by: Arnaldo Garcia Rincon <agarrcia@amazon.com>
Fail the UKI builds when none of the packages provided a systemd-boot configuration. Add integration test to validate the error. Signed-off-by: Arnaldo Garcia Rincon <agarrcia@amazon.com>
Signed-off-by: Arnaldo Garcia Rincon <agarrcia@amazon.com>
Generate hard-coded boot parameters for UKI-based variants, until parsing bootconfigs in twoliter is supported. Signed-off-by: Arnaldo Garcia Rincon <agarrcia@amazon.com>
ac7a6bc to
a7b0306
Compare
|
Forced push includes:
|
Description of changes:
This adds support to build Unified Kernel Images for Bottlerocket. It also includes changes to support ephemeral encryption keys to encrypt the private and data partitions at runtime with LUKS.
Unlike GRUB based images, UKIs must be installed in a VFAT filesystem as systemd-boot lacks ext4 support. The UKIs are installed in the XBOOTLDR partition rather than the EFI partition. This is to be as close as possible to the GRUB based support, where the kernel is shipped as a separate partition.
In-place upgrades are not supported. And there is a pending change to update the re-pack workflow and pcrsys measurements. They will come as separate PRs.
Testing done:
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.