Skip to content

Install E2E only ever tests a blank BIOS disk — leftover-ESP failures are structurally untestable #72

Open

Description

@hanthor

Summary

A real install was recently confused by a leftover Windows EFI partition. That failure is not merely uncovered by our tests — with the current harness it cannot be covered, because every install E2E creates a fresh empty disk and boots without UEFI firmware at all.

Filing this so the gap is tracked rather than rediscovered on the next install.

What the harness actually does

tests/iso/e2e.sh:

  • Blank disk, every run. qemu-img create -f qcow2 "$install_disk" — the guest never sees a partition table it didn't create.
  • BIOS only. -machine q35 with no -bios OVMF and no -drive if=pflash, so the guest boots SeaBIOS. The kickstart matches: bootloader --location=mbr.
  • No NVRAM coverage, which follows directly — there is no EFI variable store in the guest to have entries in.

So zerombr and clearpart --all --initlabel are only ever asserted against a disk with nothing on it to clear. The one scenario that bit a user in production — an existing ESP from another OS — is the scenario the harness cannot construct.

Three distinct things are untested as a result:

  1. An existing ESP being detected, reused, or reformatted.
  2. Stale efibootmgr entries pointing at a bootloader that no longer exists.
  3. Any interaction between our partitioning and a pre-existing GPT.

Why it's worth fixing now rather than later

The pieces already exist in open PRs; they're just in different ones:

Suggested fix: a second matrix leg that pre-seeds a GPT + FAT32 ESP into the qcow2 before boot, using #71's OVMF firmware and #70's qemu-nbd plumbing. Cheap, and it converts "structurally untestable" into "one more leg".

One nit that compounds the problem today: in bootc-iso/justfile,

[[ -f "{{ luks-qemu-disk }}" ]] || qemu-img create …

reuses an existing image. So locally, a dirty disk only ever arises by accident and nondeterministically — the worst of both worlds, since it neither guarantees a clean run nor tests a dirty one.

Related: the tests disappear instead of failing

pull-request.yml gates both E2E jobs behind needs: build-iso-stable. On #69 they report conclusion: skipped — when the build breaks, the install tests don't go red, they vanish. A PR can look green while the only tests that touch a disk never executed.

Same pattern as dakota-iso#137. Worth decoupling so a skipped install test is visibly not a passing one.

Acceptance

  • An E2E leg boots under UEFI (OVMF) with a persistent per-run OVMF_VARS.
  • That leg starts from a disk pre-seeded with a GPT + FAT32 ESP, not a blank image.
  • The run asserts the resulting boot entries are correct and no stale entry survives.
  • A skipped install-test job cannot be mistaken for a passing one.

Activity

  1. juanresendiz813 commented on Nov 18, 2026

    @juanresendiz813

    Another real-world case for this, from ublue-os/bluefin#5073: a reinstall of regular Bluefin on a MacBook Pro (UEFI) failed with a non-descriptive error while creating the GRUB config, because /EFI/fedora from the previous Bluefin install was still on the ESP. It only worked after deleting /EFI/fedora by hand. So it isn't only another OS's ESP: reinstalling over our own leftover entry fails too. A UEFI test that installs twice onto the same disk would catch it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions