1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-05 06:45:13 +01:00

275 Commits

Author SHA1 Message Date
John Eckersberg
5d6dd67276 feat: Add bootc container ukify command
Add a new subcommand that builds a Unified Kernel Image (UKI) by
computing the necessary arguments from a container image and invoking
ukify. This simplifies the sealed image build workflow by having bootc
internally compute:

- The composefs digest (via existing compute-composefs-digest logic)
- Kernel arguments from /usr/lib/bootc/kargs.d/*.toml files
- Paths to kernel, initrd, and os-release

Any additional arguments are passed through to ukify unchanged, allowing
full control over signing, output paths, and other ukify options.

The seal-uki script is updated to use this new command instead of
manually computing these values and invoking ukify directly.

Also adds kargs.d configuration files for the sealed UKI workflow:
- 10-rootfs-rw.toml: Mount root filesystem read-write
- 21-console-hvc0.toml: Console configuration for QEMU/virtio

Closes: #1955

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2026-01-30 08:49:07 -05:00
Colin Walters
2ab1dcdd11 docs/composefs: Keep vmlinuz kernel+initramfs setup for now
We need some work in e.g. bcvk among others to have this work.

Closes: https://github.com/bootc-dev/bootc/issues/1940
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-29 09:42:51 -05:00
Colin Walters
efd2743d04 docs: Move composefs tracking from issue #1190 to docs
The composefs backend implementation has largely landed. Consolidate
tracking of known issues into the docs, categorized by severity:

- Deployment blockers: GC, SELinux enforcing=0, OCI registry install
- Important: Sealed image build UX, kargs.d support
- Long-term: Unified storage, UKI/systemd-boot improvements

This allows closing the original tracking issue #1190.

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-29 09:42:51 -05:00
Colin Walters
b17ca33ba9 docs: Enhance installation documentation with DPS and provisioning flow
Add comprehensive documentation for the installation process, with particular
focus on the Discoverable Partitions Specification (DPS) and first-boot
provisioning.

Main documentation (bootc-install.md):
- Add DPS section explaining partition type GUIDs and auto-discovery
- Add table showing when DPS vs explicit root= kargs are used
- Add provisioning and first boot section covering cloud-init,
  Ignition, SSH key injection, and custom provisioning
- Document the .bootc-aleph.json provenance file
- Fix typos ('boot install' -> 'bootc install', 'pased' -> 'passed')

Man page (bootc-install-to-disk.8.md):
- Document partition layout conceptually (avoiding specific sizes/GUIDs
  that may change between versions)
- Explain root filesystem discovery with systemd-gpt-auto-generator

Rustdoc for install.rs:
- Add comprehensive module documentation
- Document all installation modes (to-disk, to-filesystem, to-existing-root, reset)
- Explain OSTree vs Composefs storage backends
- Document key types (State, RootSetup, SourceInfo, SELinuxFinalState)
- List configuration paths and submodules

Rustdoc for discoverable_partition_specification.rs:
- Explain how bootc uses DPS for partition creation
- Document automatic root discovery mechanism
- Describe composefs and sealed boot integration

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-28 12:47:03 -05:00
Colin Walters
d790891e7f docs: Add architecture documentation to internals page
Extend our internals docs to have more information.

Assisted-by: OpenCode (Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-28 12:47:03 -05:00
Colin Walters
14613a0900 docs: Add experimental unified storage documentation
All of our experimental features should still have docs, so add
one for this.

Relates: #20
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-26 18:52:33 -05:00
jbtrystram
4c22d1664e install: Allow root and boot mount-specs in config
Allow configuring the root and boot filesystem mount
specs via the install configuration file under [install].

As for other options, CLI arguments take precedence.

For the to-existing-root flow, mount specs from config are ignored.
Example configuration:
```
[install]
root-mount-spec = "LABEL=rootfs"
boot-mount-spec = "UUID=abcd-1234"
```

Fixes https://github.com/bootc-dev/bootc/issues/1939

Assisted-by: Opencode (Claude Opus 4.5)
Signed-off-by: jbtrystram <jbtrystram@redhat.com>
2026-01-23 11:45:13 -05:00
jbtrystram
a17413c979 install: Allow setting ostree stateroot in install config
Support for configuring the stateroot name through the install
configuration file under `[install.ostree]`.
The CLI flag will override config file values, as for other options.

Partial fix for https://github.com/bootc-dev/bootc/issues/1939

Assisted-by: Opencode (Claude Opus 4.5)
Signed-off-by: jbtrystram <jbtrystram@redhat.com>
2026-01-23 11:45:13 -05:00
Joel Capitao
b901498d44 install: support configuring sysroot.bls-append-except-default
Add a new [install.ostree] configuration section to allow setting the
ostree sysroot.bls-append-except-default option during installation.

Closes: https://github.com/bootc-dev/bootc/issues/1710

Signed-off-by: Joel Capitao <jcapitao@redhat.com>
Co-authored-by: Jean-Baptiste Trystram <jbtrystram@redhat.com>
Assisted-by: Claude (Sonnet 4)
2026-01-22 07:37:59 -05:00
Colin Walters
766b534d6c docs: Expand composefs backend documentation
Add comprehensive documentation for building sealed bootc images,
focusing on the core concepts and the key command:
`bootc container compute-composefs-digest`.

Key additions:
- Document how sealed images work (UKI + composefs digest + Secure Boot)
- Explain the build workflow abstractly without distribution-specific details
- Document the compute-composefs-digest command and its options
- Add section on generating/signing UKIs with ukify
- Document developer testing commands (just variant=composefs-sealeduki-sdboot)
- Add validation tooling documentation

This provides the foundation for distribution-specific documentation
to build upon with concrete Containerfile examples.

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-21 19:15:05 -05:00
Colin Walters
4301c89784 build-sys: Rework sealing to be one build step
Now that we're doing a "from scratch" build we don't
have the mtime issue, and so we can change our build system
to do everything in a single step.

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-21 19:15:05 -05:00
Colin Walters
f5bfc7fb9a docs: Add man page for bootc-destructive-cleanup.service
Document the bootc-destructive-cleanup.service systemd unit that runs
on first boot after an alongside installation with --cleanup. The man
page explains how the service is enabled via the systemd generator,
what the Fedora cleanup script does, and how distributions can
customize the cleanup behavior.

Resolves: https://issues.redhat.com/browse/RHEL-131317

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-21 09:54:32 -05:00
Colin Walters
0ee11dbfe2 docs: Pass GH_TOKEN to cargo-binstall to avoid rate limits
When cargo-binstall fetches pre-built binaries from GitHub, it can hit
API rate limits (403 Forbidden) when unauthenticated. This causes it to
fall back to building from source, which fails for mdbook-linkcheck
because the devenv container lacks openssl-devel and the perl modules
needed to build OpenSSL from source.

Pass the GitHub Actions token through to the container build as a secret,
allowing cargo-binstall to make authenticated requests with higher rate
limits.

Assisted-by: OpenCode (claude-sonnet-4-20250514)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 22:44:10 +01:00
Colin Walters
8cbd6e93ff docs: Add composefs-rs crates to internals rustdoc
These external git dependencies don't have docs on docs.rs, so include
them in the internal documentation alongside our workspace crates.

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-08 22:44:10 +01:00
Colin Walters
b68100b20e docs: Publish rustdoc for internal crates alongside mdbook
The docs workflow now also generates rustdoc for all workspace crates
and publishes them as a subdirectory of the main documentation site.
This makes internal API documentation available at
bootc-dev.github.io/bootc/internals.html with links to each crate.

Note this required switching the docs container to CentOS Stream 10 for newer Rust (1.91).

Assisted-by: OpenCode (Opus 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2026-01-07 21:25:27 +01:00
Colin Walters
d5dd1af815 container inspect: Add human-readable and yaml output formats
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>
2025-12-29 12:40:36 +01:00
Colin Walters
fd83c659a8 cli: Extend bootc container inspect with kernel info
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>
2025-12-29 12:40:36 +01:00
Gareth Widlansky
439deff2f7 sdboot: add support for key enrollment in bootc install
systemd-boot has support for automatically enrolling keys
for Secure Boot, this adds support for copying these keys
as embedded in the input container image into the location
where systemd-boot can perform automatic enrollment on them.

Commit-message-written-by: Colin Walters <walters@verbum.org>
Signed-off-by: Gareth Widlansky <gareth.widlansky@proton.me>
2025-12-15 20:27:28 -05:00
Wei Shi
a5784832d0 lib: Add --from-downloaded flag for bootc upgrade
Add a new --from-downloaded flag to bootc upgrade that allows users to
unlock a staged deployment created with --download-only without fetching
updates from the container image source.

This provides a way to apply already-downloaded updates without triggering
a fetch operation, which is useful for scheduled maintenance workflows where
the update was downloaded earlier and should now be applied at a scheduled
time.

Usage:
  # Download update without applying
  bootc upgrade --download-only

  # Later: Apply the staged update (without fetching from image source)
  bootc upgrade --from-downloaded

  # Or: Apply staged update and reboot immediately
  bootc upgrade --from-downloaded --apply

The flag conflicts with --check and --download-only as those operations
have different purposes. It can be combined with --apply to immediately
reboot after unlocking the staged deployment.

This commit also updates the documentation (upgrades.md) to describe all
three ways to apply a download-only update, and updates the download-only
test case (test-25) to use --from-downloaded instead of plain
'bootc upgrade' when clearing the download-only flag.

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Wei Shi <wshi@redhat.com>
2025-12-12 13:52:56 -05:00
Wei Shi
c325582f50 lib: Add --download-only flag for upgrade
Add support for downloading and staging updates without automatic
application on reboot. This allows users to prepare updates and apply
them at a controlled time.

User-facing changes:
- Add --download-only flag to bootc upgrade command
- bootc upgrade --download-only: stages deployment in download-only mode
- bootc upgrade (no flags): clears download-only mode if present
- bootc upgrade --apply: clears download-only mode and immediately reboots
- bootc upgrade --check: read-only, doesn't change download-only state
- bootc status shows "Download-only: yes/no" for staged deployments in verbose mode
- Garbage collection automatically cleans up unreferenced images after staging

Implementation details:
- Internally uses OSTree finalization locking APIs
- Sets opts.locked in SysrootDeployTreeOpts when staging deployments
- Added change_finalization() method to SysrootLock wrapper
- Tracks lock state changes separately from image digest changes
- Field name in BootEntry is download_only (Rust), downloadOnly (JSON)
- Verbose status display uses "Download-only" label (matches Soft-reboot pattern)
- Uses deployment.is_finalization_locked() API (OSTree v2023.8+)
- Always emits downloadOnly field in JSON output for consistency

Testing and documentation:
- New dedicated test: test-25-download-only-upgrade.nu (4-boot workflow)
- Test verifies: switch → upgrade --download-only → reboot (stays old) →
  re-stage → upgrade (clear) → reboot (applies)
- Updated docs/src/upgrades.md with comprehensive workflow examples
- Includes notes about reboot behavior and image switching
- Generated man pages and JSON schemas updated
- All test fixtures updated with downloadOnly field

The download-only flag is only available for upgrade, not switch.
The implementation is designed to support future composefs backend.

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Wei Shi <wshi@redhat.com>
2025-12-10 12:58:38 -05:00
John Eckersberg
d92423cc80 docs: Replace autogenerated TODO in bootc-container-inspect
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2025-12-08 18:15:16 -05:00
John Eckersberg
25f8531702 Run cargo xtask update-generated
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2025-12-08 18:15:16 -05:00
Colin Walters
de0a9f78c2 tmt: Generate integration.fmf from test code
We need to run most of our tests in a separate provisioned machine,
which means it needs an individual plan. And then we need a test
for that plan. And then we need the *actual test code*.

This "triplication" is a huge annoying pain.

TMT is soooo complicated, yet as far as I can tell it doesn't offer
us any tools to solve this. So we'll do it here, cut over to
generating the TMT stuff from metadata defined in the test file.

Hence adding a test is just:

- Write a new tests/booted/foo.nu
- `cargo xtask update-generated`

Signed-off-by: Colin Walters <walters@verbum.org>
2025-11-25 22:48:37 -05:00
Colin Walters
99123ba27c docs: Document finding deployments in install-to-existing-root
Users doing `bootc install to-existing-root` previously had no easy
way to find the ostree deployment before rebooting in order to inject
configuration files. This addresses that gap.

Key changes:

- Document using `ostree admin --print-current-dir` to find the newly
  created deployment path before rebooting
- Clarify the two distinct scenarios: injecting new configuration
  before reboot vs. migrating old data after reboot
- Add examples for both file-based configuration and kernel arguments
  (via `systemd.mount-extra`)
- Cross-link documentation between general install docs and the
  to-existing-root man page
- Fix typo in path structure documentation

Related: https://github.com/bootc-dev/bootc/issues/531

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2025-11-21 16:38:26 -05:00
Colin Walters
9142b88a54 docs: Add a man page for bootc-root-setup
On general principle.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-11-19 11:24:07 -05:00
Colin Walters
4c2377bc42 docs: Add a packaging-and-integration guide
Signed-off-by: Colin Walters <walters@verbum.org>
2025-11-19 11:06:31 -05:00
Colin Walters
a998bfc3f1 install: Fix DPS support
This fixes bootc's use of the Discoverable Partition Specification (DPS)
to properly support systemd-gpt-auto-generator. Previously, bootc was
incorrectly setting filesystem UUIDs to the DPS partition type UUID value,
which caused UUID collisions and prevented proper DPS functionality.

It's still a TODO on our side to support systemd-repart in this flow.

Note we go back to using random filesystem UUIDs with this, but
per above we should likely reinitialize them on boot via repart.

Note we remove root= parameter from kernel cmdline for composefs sealed images,
allowing systemd-gpt-auto-generator to auto-discover the root partition
and we test this.

Fixes: #1771

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2025-11-18 11:02:22 -05:00
Colin Walters
63d09b6a7e install: Expand on root_mount_spec option
Came up in chat.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-11-17 09:38:28 -05:00
Micah Abbott
71dcf84334 docs: fix symlink command
Closes: #1731

Signed-off-by: Micah Abbott <miabbott@redhat.com>
2025-11-12 10:36:33 -05:00
ckyrouac
338aaab0e4 docs: Add docs for install reset to experimental section
Assisted-by: Claude Code
Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-10-30 17:16:39 -04:00
Colin Walters
706ff868b6 lib: Remove composefs-backend feature gate
While composefs is still experimental, after looking at this
I think the feature gating we're doing has a pretty high "pain:gain"
ratio - in other words, the risk we're mitigating by having it
off is very low.

Since composefs is a focus of development, let's just remove
the feature gate. We have good CI coverage for the non-composefs
case.

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
2025-10-29 11:01:18 -04:00
Colin Walters
37fa085be9 docs: Add experimental-composefs
It's way overdue for us to have a doc section, add one!

Signed-off-by: Colin Walters <walters@verbum.org>
2025-10-27 14:56:18 -04:00
bootc-bot[bot]
8eae370b03 Release 1.10.0 (#1704)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: bootc-bot[bot] <225049296+bootc-bot[bot]@users.noreply.github.com>
2025-10-27 10:32:28 -07:00
John Eckersberg
84c7a19d25 Fix a few instances of oddball baud rate
Claude pointed this out while I was working on something else
completely unrelated.  But it looks like somewhere along the way
114800 snuck its way in and probably got copy/pasted into a few
places.  The maximum baud rate is 115200[1], and that is the more
typical usage.

[1] https://www.kernel.org/doc/html/latest/admin-guide/serial-console.html

Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2025-10-21 18:37:48 -04:00
Colin Walters
817d7d11f9 switch: Document digests
Came up in chat.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-10-21 11:20:49 -04:00
Colin Walters
f4c678eb88 Various composefs enhancements
- Change the install logic to detect UKIs and automatically
  enable composefs
- Change the install logic to detect absence of bootupd
  and default to installing systemd-boot
- Move sealing bits to the toplevel
- Add Justfile entrypoints
- Add basic end-to-end CI coverage (install + run) using
  our integration tests
- Change lints to ignore `/boot/EFI`

Signed-off-by: Colin Walters <walters@verbum.org>
2025-10-16 14:48:21 -04:00
Colin Walters
87d1d391ff Enable composefs by default
Signed-off-by: Colin Walters <walters@verbum.org>
2025-10-16 14:48:21 -04:00
Colin Walters
a13ba6d93a status: Mention rpm-ostree vs bootc
Signed-off-by: Colin Walters <walters@verbum.org>
2025-10-07 18:20:05 -04:00
Colin Walters
24f2dd0b87 Expand/consolidate "detecting bootc"
Continually comes up.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-10-06 16:32:55 -04:00
Colin Walters
c88d87cd35 docs: Add a man page for system-reinstall-bootc
This is an important gap.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-09-29 09:15:09 -04:00
Guillaume Assier 🌤️
793e03064e Update docs/src/registries-and-offline.md
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Guillaume Assier 🌤️ <18405490+GuillaumeASSIER@users.noreply.github.com>
2025-09-28 14:45:36 -04:00
GuillaumeAssier
d34087419a docs: Adding a private OCI registry section
Signed-off-by: GuillaumeAssier <sykursen@protonmail.com>
2025-09-28 14:45:36 -04:00
Colin Walters
788162f6cf Move docs workflow into Justfile + container
This drains nontrivial logic out GHA and into something
isolated via containers and driven via `Justfile` and
easily replicable locally too.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-09-26 15:23:34 -04:00
Colin Walters
856a7fba7c build-sys: A lot more manpage followups
- Remove duplicated logic between xtask and makefile
  for converting markdown; it needs to be in xtask
  as we handle the version substitution there and
  some other tweaks
- Really just make the developer entrypoint `just update-generated`
  in general
- Fix the rendering of booleans
- Remove unnecessary emoji from prints

Signed-off-by: Colin Walters <walters@verbum.org>
2025-09-18 09:05:36 -04:00
Colin Walters
2ca2886cee docs: Fix links to man pages
Followup to https://github.com/bootc-dev/bootc/pull/1587
Closes: https://github.com/bootc-dev/bootc/issues/1616

Signed-off-by: Colin Walters <walters@verbum.org>
2025-09-17 17:56:58 -04:00
Colin Walters
d438aaf9ec Switch to hand-written man pages with auto option sync
See the updates to `Justfile` for how to use this.

Closes: #1428

Assisted-By: Claude Code (opus + sonnet)
Signed-off-by: Colin Walters <walters@verbum.org>
2025-09-12 16:13:49 -04:00
bootc-bot[bot]
e04d5c41af Release 1.8.0
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-04 21:31:00 +00:00
bootc-actions-token[bot]
5e687f7472 Release 1.7.1
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-25 21:55:55 +00:00
bootc-actions-token[bot]
ae8930b1ad Release 1.7.0
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-21 16:33:13 -04:00
bootc-actions-token[bot]
acba07b6fb Release 1.6.0
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-07 10:01:43 -04:00