Skip to content

fix(test): boot the UKI from an ESP under OVMF, not qemu -kernel - #84

Merged
Bugs5382 merged 1 commit into
mainfrom
fix/74-esp-boot
Jul 2, 2026
Merged

Bugs5382 merged 1 commit into
mainfrom
fix/74-esp-boot

Conversation

@Bugs5382

@Bugs5382 Bugs5382 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What and why

build/ci/qemu-run.sh and the Phase 1 integration harness booted the UKI with qemu -kernel <uki>. -kernel uses the Linux bzImage boot protocol, but a UKI is a PE/EFI executable, so OVMF rejects it with Bad kernel image: Load error and the node never boots. This presents the UKI the way firmware expects: on a FAT EFI System Partition at the removable-media fallback path EFI/BOOT/BOOTX64.EFI (served via QEMU VVFAT, fat:rw:<dir>), which OVMF auto-launches. Drops the -kernel flag in both places.

Verification

  • gofmt clean; go vet -tags=integration ./test/integration/... compiles
  • bash -n clean on qemu-run.sh
  • Booted the current UKI from an ESP under OVMF (TCG): BdsDxe: starting Boot0001 with no Bad kernel image: Load error — where the -kernel method previously failed at exactly that point

Note

This fixes the boot method. Full first-boot ceremony e2e (guest reaches PID 1, brings up eth0, serves gRPC on :443) additionally needs QEMU guest drivers (serial console, virtio-net) in the kernel config — deferred hardware/driver work tracked in #33.

Closes #74

qemu-run.sh and the Phase 1 integration harness booted the UKI with
qemu -kernel <uki>. -kernel uses the Linux bzImage boot protocol, but a UKI is
a PE/EFI executable, so OVMF rejects it ("Bad kernel image: Load error") and
the node never boots. Present the UKI the way firmware expects instead: on a
FAT EFI System Partition at the removable-media fallback path
EFI/BOOT/BOOTX64.EFI (served via QEMU VVFAT, fat:rw:<dir>), which OVMF
auto-launches. Drop the -kernel flag.

Verified under OVMF: the UKI now loads and executes (BdsDxe starting Boot0001,
no load error) where -kernel previously failed. Full ceremony e2e additionally
needs QEMU guest drivers (serial/virtio-net), tracked in #33.

Closes #74
@github-actions github-actions Bot added the fix Bug fix (fix). Patch. label Jul 2, 2026
@Bugs5382

Bugs5382 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Closing summary: qemu-run.sh and the integration harness now boot the UKI from a FAT ESP (EFI/BOOT/BOOTX64.EFI via QEMU VVFAT) instead of qemu -kernel, which OVMF rejected as a non-bzImage. Verified: OVMF now loads and starts the UKI under TCG with no 'Bad kernel image' error. Full ceremony e2e still needs QEMU guest drivers (serial/virtio-net), tracked in #33.

@Bugs5382
Bugs5382 merged commit ef6e9ff into main Jul 2, 2026
@Bugs5382
Bugs5382 deleted the fix/74-esp-boot branch July 2, 2026 18:00
@Bugs5382 Bugs5382 self-assigned this Jul 3, 2026
@Bugs5382 Bugs5382 added this to the v1.0.0 milestone Jul 15, 2026
Bugs5382 added a commit that referenced this pull request Sep 25, 2026
qemu-run.sh and the Phase 1 integration harness booted the UKI with
qemu -kernel <uki>. -kernel uses the Linux bzImage boot protocol, but a UKI is
a PE/EFI executable, so OVMF rejects it ("Bad kernel image: Load error") and
the node never boots. Present the UKI the way firmware expects instead: on a
FAT EFI System Partition at the removable-media fallback path
EFI/BOOT/BOOTX64.EFI (served via QEMU VVFAT, fat:rw:<dir>), which OVMF
auto-launches. Drop the -kernel flag.

Verified under OVMF: the UKI now loads and executes (BdsDxe starting Boot0001,
no load error) where -kernel previously failed. Full ceremony e2e additionally
needs QEMU guest drivers (serial/virtio-net), tracked in #33.

Closes #74

Co-authored-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix (fix). Patch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: boot the UKI from an ESP under OVMF, not via qemu -kernel

1 participant