Skip to content

KVM legs: stick update never touches a second internal disk; stick-as-only-disk case #4545

Backlog

Description

@pithead-architect

What's the problem

The current rigmedia phase proves a stick-run rig leaves a blank internal disk byte-identical, but nothing proves it across an update on a layout where the machine's internal disk holds an existing bootable OS and ESP — the realistic machine a customer plugs a stick into. The claim that stock systemd-repart at first boot touches only the root disk is inferred, not proven; nor is the stick-as-the-only-disk case. This is chunk 3 of the split of #4018. Blocked by chunk 1 (the update it runs) and, for the update step, pithead#4013/rigforge#684.

What it impacts

Any customer running the appliance from a stick beside an existing OS: a repart or RAUC mis-target would destroy their installed system, and dropping install-to-disk ships that risk.

How I found it

Split of #4018 (owner decisions of 2026-11-10, item 11): "one repart behaviour ... is inferred, not proven".

How important is it

High for 2.1.0; data-loss blast radius and it gates dropping install-to-disk.

Acceptance criteria

  • Case A: starting from the first boot of a fresh stick image (systemd-repart runs then), with a second internal virtio disk attached that holds an existing bootable OS and ESP, that second disk's sha256 is byte-identical after the full run (wizard, mining, reboot) plus the stick update and reboot cycle.
  • Case B: the same cycle with the stick as the only disk completes and boots the new slot.
  • A tier-1 selftest pins the disk-inventory assertions (which disks exist, which disk repart's state file names); fixtures clean up on failure; rig-battery.md M14 row updated with the new coverage and its manual boundary (real multi-disk hardware).

Possible solutions

  • Extend rigmedia.sh: pre-seed the second disk with a minimal GPT+ESP+bootable stub fixture (a FAT ESP with a file is enough to be "bootable OS and ESP" for hashing purposes — say in the PR what the fixture does and does not model), hash it before first boot and after the cycle.

Parent: #4018

Worker brief: Test tier: tier4-kvm (rigmedia phase), plus a tier-1 selftest for the disk assertions. Build on the chunk-1 stick update leg (merged first). Case A: fresh v1 stick image, second internal disk (virtio, boot.order after the stick) pre-created with a minimal GPT, an ESP (FAT) and a bootable-OS stub tree so it is non-blank and mountable, sha256 the whole disk before first boot; boot once so systemd-repart runs on the stick disk, then run the existing rigmedia wizard/mining/reboot flow plus the chunk-1 update+reboot; assert the second disk's sha256 unchanged and that repart's activity names only the stick disk (repart prints its target device; capture from journal). Case B: same cycle, stick as the only disk, boots the new slot and mines. Fail-path cleanup like _rigmedia_fail_cleanup (retain under --keep). Register the selftest where CI runs it; no comments in edited hunks; run make lint-file-budget/make lint-pithead-build. Submit tier4-kvm phase rigmedia via bin/bench-submit --base develop-v2.1.0, evidence blocks unedited. State in the PR what the bootable-disk fixture models and what stays manual (real multi-disk firmware).

Activity

  1. added this to the v2.1.0 milestone on Nov 27, 2026
  2. added
    testing
    appliance
    needs-triage
    size:M
    on Nov 27, 2026
  3. pithead-architect commented on Nov 27, 2026

    @pithead-architect
    Author

    Release regroom (owner request, 2026-11-27): moved from v2.1.0 to v2.0.7. Stick disk-safety and standalone legs are tests, not UI; follow #4543 and #4544.

  4. added
    bug
    on Nov 27, 2026
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

    appliancebugneeds-triagesize:Mtesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions