Skip to content

Conversation

@cgwalters
Copy link
Collaborator

The container-inspect command previously only reported kernel arguments. Extend it to also report kernel information, including whether the image contains a traditional kernel or a Unified Kernel Image (UKI).

This consolidates UKI detection logic previously in bootc_composefs::boot into a new kernel module that can find kernels via either the traditional /usr/lib/modules//vmlinuz path or UKI files in /boot/EFI/Linux/.

The ContainerInspect output now includes a "kernel" field with version and unified (boolean) properties, enabling tooling to determine the boot method before installation.

Assisted-by: OpenCode (Claude Opus 4.5)

@github-actions github-actions bot added area/install Issues related to `bootc install` area/documentation Updates to the documentation labels Dec 18, 2025
@bootc-bot bootc-bot bot requested a review from ckyrouac December 18, 2025 21:16
Copy link
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 extends bootc container inspect to include kernel information, which is a useful addition for tooling. The implementation involves refactoring UKI detection logic into a new kernel module, which improves code organization and modularity. The changes are well-tested, including integration tests for the new output fields, and the documentation has been updated accordingly. Overall, this is a solid contribution. I have a couple of minor suggestions for the new kernel module to improve robustness and make the code more idiomatic.

The container-inspect command previously only reported kernel arguments.
Extend it to also report kernel information, including whether the image
contains a traditional kernel or a Unified Kernel Image (UKI).

This consolidates UKI detection logic previously in bootc_composefs::boot
into a new kernel module that can find kernels via either the traditional
/usr/lib/modules/<version>/vmlinuz path or UKI files in /boot/EFI/Linux/.

The ContainerInspect output now includes a "kernel" field with version
and unified (boolean) properties, enabling tooling to determine the
boot method before installation.

Assisted-by: OpenCode (Claude Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters force-pushed the container-inspect-uki branch 2 times, most recently from 4674ded to b62a648 Compare December 19, 2025 02:03
@jmarrero
Copy link
Contributor

Failures seem valid:

# Pass these through for cross-checking
podman run --rm --env=BOOTC_variant=composefs-sealeduki-sdboot --env=BOOTC_base=quay.io/fedora/fedora-bootc:43 localhost/bootc-integration bootc-integration-tests container

running 8 tests
test variant-base-crosscheck  ... ok
test status                   ... ok
test printconfig --all        ... ok
test install config           ... ok
test system-reinstall --help  ... ok
test bootc upgrade            ... ok

thread '<unnamed>' (4) panicked at crates/tests-integration/src/container.rs:64:17:
Expected unified=true for UKI variant
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: Recipe `test-container` failed on line 203 with exit code 139
Error: Process completed with exit code 139.

The container inspect command previously only supported JSON output.
This extends it to support human-readable output (now the default)
and YAML, matching the output format options available in other
bootc commands like status.

The --json flag provides backward compatibility for scripts that
expect JSON output, while --format allows explicit selection of
any supported format.

Assisted-by: OpenCode (Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters closed this Dec 19, 2025
@cgwalters cgwalters force-pushed the container-inspect-uki branch from b62a648 to 0428ac1 Compare December 19, 2025 22:03
@cgwalters cgwalters reopened this Dec 19, 2025
@cgwalters cgwalters enabled auto-merge (rebase) December 19, 2025 22:04
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 area/install Issues related to `bootc install`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants