Skip to content

UKI Cleanup#2200

Open
Johan-Liebert1 wants to merge 3 commits into
bootc-dev:mainfrom
Johan-Liebert1:uki-cleanup
Open

UKI Cleanup#2200
Johan-Liebert1 wants to merge 3 commits into
bootc-dev:mainfrom
Johan-Liebert1:uki-cleanup

Conversation

@Johan-Liebert1
Copy link
Copy Markdown
Collaborator

ukify: Allow passing custom kernel, initramfs

While building a sealed UKI image we'd want to remove the original
kernel + initramfs from the final image and have only the final UKI
present. This was not possible before as bootc container ukify
expected kernel + initramfs to be present in usr/lib/modules of
container root

Fixes: #2185


dockerfile/uki: Rework to remove kernel + initrd

Now that we can pass kernel and initrd paths to bootc ukify, rework
our UKI Dockerfile to remove kernel + initrd from the final layer
and only keep the UKI

This still will not remove the kernel + initrd from the tarball but
have whiteout instead

See #2027 (comment)


test/integration: Test vmlinuz non-existence with UKI

vmlinuz and intrd should not be present in UKI images; add test for the
same

@Johan-Liebert1 Johan-Liebert1 requested a review from cgwalters May 15, 2026 07:22
@Johan-Liebert1 Johan-Liebert1 added the ci/merge Run full CI suite (all OSes) — equivalent to merge queue label May 15, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the UKI (Unified Kernel Image) build process to support passing explicit kernel and initramfs paths via CLI arguments, reducing reliance on auto-discovery within the rootfs. Key changes include updating the seal-uki and finalize-uki scripts to use named arguments, modifying Dockerfile stages to extract and clean up kernel components, and extending the Rust library and CLI to handle the new parameters. Review feedback identified a potential path resolution bug in the Rust file existence checks, a filename mismatch in the upgrade test Dockerfile, and suggested improvements for error handling and validation in the seal-uki script.

Comment thread crates/lib/src/ukify.rs Outdated
Comment thread tmt/tests/Dockerfile.upgrade Outdated
Comment thread contrib/packaging/seal-uki Outdated
While building a sealed UKI image we'd want to remove the original
kernel + initramfs from the final image and have only the final UKI
present. This was not possible before as `bootc container ukify`
expected kernel + initramfs to be present in `usr/lib/modules` of
container root

Fixes: bootc-dev#2185

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>

wip
@github-actions github-actions Bot added the area/documentation Updates to the documentation label May 15, 2026
@Johan-Liebert1 Johan-Liebert1 force-pushed the uki-cleanup branch 5 times, most recently from 7c014c4 to 434d5de Compare May 15, 2026 13:00
Now that we can pass kernel and initrd paths to `bootc ukify`, rework
our UKI Dockerfile to remove kernel + initrd from the final layer
and only keep the UKI

This still will not *remove* the kernel + initrd from the tarball but
have whiteout instead

See bootc-dev#2027 (comment)

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
vmlinuz and intrd should not be present in UKI images; add test for the
same

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Updates to the documentation ci/merge Run full CI suite (all OSes) — equivalent to merge queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework UKI generation to enable removing kernel & initrd from image

1 participant