Skip to content

aboot: Discover correct ukiboot EFI vendor directory - #2623

Merged
Johan-Liebert1 merged 1 commit into
bootc-dev:mainfrom
alexlarsson:fix-ukiboot-install
Nov 10, 2026
Merged

Johan-Liebert1 merged 1 commit into
bootc-dev:mainfrom
alexlarsson:fix-ukiboot-install

Conversation

@alexlarsson

Copy link
Copy Markdown
Contributor

The composefs backend currently uses the ID field in os-release as the UEFI vendor dir. This works for fedora, but this is not generally true, for example with e.g. rhel/redhat. And, its important to deploy in the correct vendor dir, because that is compiled into the binary (to find the slot addons). If things go to the wrong place, secureboot will not work.

So, I changed upstream to expose the built-in uefi vendor as a
subdirectory of /usr/libexec/ukiboot/efi:
https://gitlab.com/CentOS/automotive/src/ukiboot/-/merge_requests/42

This commit changes bootc to use this directory as the expected vendor name. If it is not found (i.e. for older ukiboot) we default to "BOOT", which is what the default ukiboot vendor name is.

Also, the upstream uefi directory addition is done with a backwards compatible symlink, so things will keep working (sans secureboot, as before) for older versions of ukiboot.

Generated-by: AI

@bootc-bot
bootc-bot Bot requested a review from henrywang November 3, 2026 12:28

@Johan-Liebert1 Johan-Liebert1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm. CI is failing though

Comment thread crates/lib/src/bootc_composefs/boot.rs Outdated
vendor = entry
.file_name()
.into_string()
.map_err(|_| anyhow!("EFI vendor name is not valid UTF-8"))?;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can iterate over entries_utf8

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

@alexlarsson

Copy link
Copy Markdown
Contributor Author

The CI failure is because fedora doesn't have the new ukiboot yet and the new default vendor doesn't match what fedora uses. I've added a termporary workaround

@alexlarsson

Copy link
Copy Markdown
Contributor Author
                        content:   × External command was terminated by a signal
                        content:     ╭─[/var/tmp/tmt/bootc-tmt-x9eyi7aq-tmt-plans-integration-plan-51-switch-from-delta/tmt/plans/integration/plan-51-switch-from-delta/discover/default-0/tests/tmt/tests/booted/test-switch-from-delta.nu:59:5]
                        content:  58 │ 
                        content:  59 │     oci-delta create $"oci-archive:($source_archive)" $"containers-storage:($image)" $delta
                        content:     ·     ────┬────
                        content:     ·         ╰── terminated by SIGKILL (9)
                        content:  60 │     # Keep the target available only through the delta.
                        content:     ╰────

Sigkill? Is this some kind of timeout?

@jmarrero

jmarrero commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

@jmarrero-bot help here, check why CI is failing and make it more robust. Open a PR when you have proved that it fixes the issue. Also answer @alexlarsson questions in this PR.

@jmarrero-bot

Copy link
Copy Markdown
Contributor

@jmarrero Usage: @​jmarrero-bot <agent> <request>; agents: claude, opencode

@jmarrero-bot

Copy link
Copy Markdown
Contributor

@alexlarsson Not a timeout, and not caused by this PR: the guest kernel's OOM killer killed oci-delta create in the 4G test VM, which has no swap (Out of memory: Killed process 3864 (oci-delta) ... anon-rss:3641696kB in plan-51's console.txt).

On UKI the test rebuilds the ~122 MiB UKI. That's under oci-delta's default 192 MiB bsdiff limit, and tar-diff's bsdiff needs ~16 bytes per byte of the old file. So oci-delta normally peaks around 2.4 GiB and survives, but sometimes the Go GC lets the heap overshoot. It's rare: main passed 10/10 on a devspace, and this is the only such kill in that CI job since mid-October. With GOGC=200 in the test environment, main fails exactly like this every time.

Fix: jmarrero-forge#13 caps bsdiff at 64 MiB in the test. The UKI then goes through rollsums, oci-delta peaks around 130 MiB, and the delta stays about the same size. It goes upstream after @jmarrero reviews it; until then, rerunning the failed job should get this PR green. Details: https://gist.github.com/jmarrero-bot/cef85960bc80160278b2440ebb86d112

Generated-by: https://github.com/jmarrero-bot#llms

The composefs backend currently uses the ID field in os-release as the
UEFI vendor dir. This works for fedora, but this is not generally
true, for example with e.g. rhel/redhat. And, its important to deploy
in the correct vendor dir, because that is compiled into the binary
(to find the slot addons). If things go to the wrong place, secureboot
will not work.

So, I changed upstream to expose the built-in uefi vendor as a
 subdirectory of `/usr/libexec/ukiboot/efi`:
 https://gitlab.com/CentOS/automotive/src/ukiboot/-/merge_requests/42

This commit changes bootc to use this directory as the expected vendor
name. If it is not found (i.e. for older ukiboot) we default to
"BOOT", which is what the default ukiboot vendor name is.

Also, the upstream uefi directory addition is done with a backwards
compatible symlink, so things will keep working (sans secureboot, as
before) for older versions of ukiboot.

Generated-by: AI
Signed-off-by: Alexander Larsson <alexl@redhat.com>
@alexlarsson

Copy link
Copy Markdown
Contributor Author

I rebased this (with no changes) to get the CI to re-run. Hopefully it works this time.

@jmarrero jmarrero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@Johan-Liebert1
Johan-Liebert1 enabled auto-merge (rebase) November 10, 2026 04:34
@Johan-Liebert1
Johan-Liebert1 merged commit 1291ab7 into bootc-dev:main Nov 10, 2026
133 of 140 checks passed
@jmarrero-bot jmarrero-bot moved this from In Review to Done in Workstream Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants