Skip to content

hardware: Ubuntu routes boot on UEFI as on BIOS - #84

Merged
TusanHomichi merged 5 commits into
mainfrom
claude/ubuntu-uefi
Oct 14, 2026
Merged

TusanHomichi merged 5 commits into
mainfrom
claude/ubuntu-uefi

Conversation

@TusanHomichi

@TusanHomichi TusanHomichi commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Requested by Peter

Before: wend preflight refused every UEFI machine. Every adapter said boot = ["bios"], because the VM tier could only boot guests by BIOS. Facts reported UEFI from /sys/firmware/efi alone, so a Secure Boot machine looked the same as any other UEFI machine.

After:

  • Preflight accepts a UEFI machine with Secure Boot off on the Ubuntu route.
  • It refuses Secure Boot on every route, and names it in the refusal.
  • Debian and EL still accept BIOS only.

How:

  • adapters/ubuntu.toml: [hardware].boot is ["bios", "uefi"].
  • Facts: the schema is now wend.hardware/3. boot is one of:
    • bios
    • uefi
    • uefi-secureboot, when the firmware's SecureBoot variable says on, or no variable store can be read (efivarfs or the older sysfs vars). A store without a SecureBoot variable means off, which is how the kernel's EFI stub reads it: OVMF's non-secboot build and older UEFI firmware never create the variable.
  • Checkers: both accept the three values. No adapter names uefi-secureboot, because no replay has walked shim, signed GRUB and signed kernels under enrolled keys.
  • tools/vm.py: on UEFI it records each hop's boot chain: efibootmgr -v and the hash of every .efi on the ESP.
  • SPEC: says an adapter names a mode only when every box on its routes passed in it. The adapters' boot comments are updated to match.
  • Client tests:
    • etch -> trixie refuses UEFI;
    • trusty -> resolute takes UEFI and refuses uefi-secureboot;
    • firmware() reads both interfaces and fails closed when nothing is readable.

Evidence (wend#13, real VMs on remi, OVMF without Secure Boot)

All three of the route's boxes passed trusty -> resolute on UEFI from scratch. Every hop rebooted onto UEFI (firmware uefi) and kept its network and checks.

box run code prune
trusty-web 20261013-103648 this branch before the rebase onto main, with the EFI-chain recording 64 -> 0
trusty-db 20261013-075838 #71's f0e3715 63 -> 0
trusty-web-updated 20261013-151110 this branch, rebased onto main ded9a4e 66 -> 0
  • trusty-web-updated fired trusty-esm-pins at xenial.
  • Boot chain: in trusty-web's run, shimx64.efi and grubx64.efi on the ESP change at every hop. trusty-web-updated boots \EFI\ubuntu\grubx64.efi with no shim at xenial and bionic, and its grubx64.efi changes at every hop. Those runs predate two changes: the chain record now keeps BootCurrent, BootOrder and the disk entries, which were cut off on the last hops, and it records the chain the first hop starts from.
  • Facts on real guests: wend facts from this head reports "boot": "uefi" (wend.hardware/3) inside xenial and resolute guests booted from trusty-web-updated's run. Those guests' kernels log "Secure boot disabled", and no SecureBoot variable exists.
  • Gates at this head:
    • wend check
    • client fmt, clippy, tests (38) and the release build
    • parity identical
    • client wend check

Refs #13, #46

🤖 Generated with Claude Code

@TusanHomichi TusanHomichi self-assigned this Oct 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 598db2e03a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread adapters/ubuntu.toml Resolved
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T23:57:48.414396Z 937da13 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…rt and refuses it

trusty-web, trusty-db and trusty-web-updated passed trusty -> resolute on OVMF
without Secure Boot (tools/vm.py --uefi), rebooting onto UEFI at every hop with
network and checks kept. adapters/ubuntu.toml's [hardware].boot is now
["bios", "uefi"]; Debian and EL stay BIOS (etch and CentOS 5 can't install or
boot on x86-64 UEFI; the CentOS 7 route waits on #75).

Facts (schema wend.hardware/3) report boot as bios, uefi, or uefi-secureboot
when the firmware's SecureBoot variable says on or can't be read (efivarfs or
the older sysfs vars): a Secure Boot chain is its own claim, so no adapter
names it and preflight refuses it on every route. Both checkers accept the
three values. On UEFI, vm.py records each hop's boot chain (efibootmgr -v and
the hash of every .efi on the system partition).

Refs #13, #46

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Peter Permenter <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c167c44e7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/check.py Resolved
TusanHomichi and others added 2 commits October 13, 2026 16:20
… reads it (review)

OVMF's non-secboot build, like older UEFI firmware, never creates the
SecureBoot variable, so the first firmware() refused the very machines the
replays proved. It now reads as the kernel's EFI stub does: with a variable
store to read, a missing SecureBoot is off; only no readable store fails
closed. wend facts in real xenial and resolute UEFI guests from the
trusty-web-updated run reports boot uefi. vm.py's EFI chain keeps the disk boot
entries (BootCurrent, BootOrder, HD paths) and records the chain the first hop
starts from; the adapter comment names all three boxes; doc comments are back
on their functions.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Peter Permenter <[email protected]>
…a missing one is off (review)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Peter Permenter <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c45c0865ca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread SPEC.md Resolved
Comment thread client/src/hardware.rs Resolved
TusanHomichi and others added 2 commits October 13, 2026 16:52
…view)

Signed-off-by: Peter Permenter <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Peter Permenter <[email protected]>
@TusanHomichi

Copy link
Copy Markdown
Member Author

Claude review: signed off on 937da13 (independent, read-only, fresh context). This head merges main 3a45fae into 2e6ea58, which was signed off along with c45c086.

  • Preflight: facts are wend.hardware/3. boot is bios, uefi or uefi-secureboot.
    • A variable store that lists variables but has no SecureBoot reads as off, the way the kernel's efi_get_secureboot_mode reads it.
    • Secure Boot on, an unreadable variable, or an empty or unreadable store all fail closed as uefi-secureboot. Every one of these cases is unit-tested, and mutating the read-error branches fails the tests.
    • Preflight refuses uefi-secureboot on every route.
  • Real guests: wend facts reports boot: uefi inside xenial and resolute UEFI guests.
  • The claim: adapters/ubuntu.toml boot = bios+uefi. All three of the route's boxes passed trusty -> resolute on OVMF without Secure Boot, and each run is identified in the body.
  • Merge: recomputed with git merge-tree, it gives the same tree. Nothing was lost.
  • Gates: wend check; client fmt, clippy, tests (39) and release build; parity identical; client wend check; behaviour tests. CI is green, including every route's chroot replay.
  • Codex threads: all answered and resolved. The three policy P1s are this maintainer spec change from spec: hardware preflight, so a route refuses a machine it would brick #46. The P2 (an empty store meaning off) was declined: an empty store is efivarfs not mounted, so it stays unknown and fails closed.

@TusanHomichi
TusanHomichi merged commit 0433d3d into main Oct 14, 2026
15 checks passed
@TusanHomichi
TusanHomichi deleted the claude/ubuntu-uefi branch October 14, 2026 00:15
TusanHomichi added a commit that referenced this pull request Oct 16, 2026
…from CI

Review of 9b706a0 found that centos8-lamp passed the VM tier (#92), that
the VM results are per box rather than per route (#84 for UEFI), and that
the intro and layout still said every run came from CI. The client line now
includes preflight.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Peter Permenter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-claude-review Waiting on the Claude review layer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant