Unattended update with rollback: the prior art behind the forks
An appendix of lab machines update themselves. Read from primary sources on 2026-10-07 (UTC) unless marked. "Snippet" means the claim came from a search result quoting the official page, not a full read.
The pattern every one of them shares
A bootloader holds an attempt counter and spends it. The booted system clears it only after a health gate passes. None of them handles a netbooted machine: all keep the state on local media.
Android A/B
https://source.android.com/docs/core/ota/ab, https://source.android.com/docs/core/ota/ab/ab_implement
- Two slots. Per slot the bootloader keeps a successful flag, an unbootable flag and a retry count
(fastboot:
slot-successful,slot-unbootable,slot-retry-count).set_activeclears unbootable and resets the count. - The
boot_controlHAL:markBootSuccessful(),setSlotAsUnbootable(),setActiveBootSlot(). update_enginewrites the inactive slot. After reboot,update_verifierchecks the new slot through dm-verity, then marks it successful. A slot that fails falls back to the old one.- Virtual A/B writes a copy-on-write snapshot merged after a successful boot (https://source.android.com/docs/core/ota/virtual_ab). Default retry count: unverified.
ChromeOS
https://www.chromium.org/chromium-os/developer-library/reference/device/disk-format/
GPT attribute bits: 56 successful, 52 to 55 tries remaining, 48 to 51 priority (0 means not
bootable). Firmware decrements tries before booting. The OS sets successful and zeroes tries once
it is up. nife's crates/boot_slot uses these positions (notes/boot-slots.md). Which daemon marks
success: unverified.
Fuchsia
https://fuchsia.dev/fuchsia-src/concepts/packages/ota, https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/firmware/lib/abr/README.md
system-updaterfetches the update package; the paver writes the alternate slot, which is then priority 15, 7 tries. The bootloader checks the image against vbmeta.- After boot,
system-update-committerruns health checks (for example a BlobFs read). Pass: the slot is marked healthy and the other slot unbootable. Fail: it may reboot, by configuration. - libabr has A, B and a recovery slot R, and never fails to choose: the fallback is R. It says marking success "should not be done by the bootloader except in response to an operator command."
OSTree, rpm-ostree, greenboot
https://ostreedev.github.io/ostree/deployment/, https://ostreedev.github.io/ostree/atomic-rollbacks/, https://github.com/fedora-iot/greenboot
- A deployment is a checkout under
/ostree/deploy/, with one Boot Loader Spec entry each; switching versions is switching entries. OSTree has no boot counting and points to greenboot. - greenboot runs
required.dandwanted.dchecks beforeboot-complete.target, counts boots in GRUB'sboot_counter, and rolls back withrpm-ostree rollback. The exact trigger value: unverified.
NixOS and systemd boot assessment
https://nixos.org/manual/nixos/stable/, https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT/, the
systemd-boot.nix module in nixpkgs
- Each generation is a boot entry;
nixos-rebuild --rollbackreturns to the previous one. boot.loader.systemd-boot.bootCounting.enable(off by default, 3 tries): a+<left>-<done>suffix on the entry's file name, decremented by systemd-boot, removed bysystemd-bless-bootonceboot-complete.targetis reached. An entry at zero sorts after the others.
Mender, RAUC, SWUpdate
- Mender requires U-Boot's
CONFIG_BOOTCOUNT_LIMITandCONFIG_BOOTCOUNT_ENVfor rollback, and anArtifactCommitstep that disables the bootloader's rollback (https://docs.mender.io/operating-system-updates-yocto-project/board-integration/bootloader-support/u-boot/manual-u-boot-integration; the commit step is a snippet). - RAUC keeps
BOOT_ORDERandBOOT_<slot>_LEFTin U-Boot's environment, decremented by a board script, andrauc status mark-goodconfirms, usually from a service ordered after the critical ones (https://rauc.readthedocs.io/en/latest/integration.html). - SWUpdate sets
ustate=1after install; the bootloader sets 3 on fallback (snippet).
U-Boot bootcount and UEFI BootNext
- U-Boot (https://docs.u-boot.org/en/latest/api/bootcount.html):
bootcountincrements each boot and is saved only whileupgrade_availableis set; pastbootlimit,altbootcmdruns. Stored in the environment, or a FAT or ext file withCONFIG_BOOTCOUNT_FS. Something in the OS must reset it. - UEFI 2.10, section 3.1.2 (https://uefi.org/specs/UEFI/2.10/03_Boot_Manager.html):
BootNextis used once and deleted before control passes. nife refused firmware variables for slot state (notes/boot-slots.md).
Netboot and test labs
- Pixiecore's API (https://github.com/danderson/netboot/blob/main/pixiecore/README.api.md): the server answers each MAC with a kernel, initrd and command line. No success report, no fallback; rollback is the server's to build.
- LAVA (snippets from docs.lavasoftware.org): power through
power_on_commandandhard_reset_commandvia PDUDaemon; a failed health check marks the device Bad. Recovery is a power cycle and a fresh deploy per job, not on-device slots. - KernelCI's labs: not checked.
Updating the base without a reboot
Added 2026-10-07 (UTC) after calef's redirect on #1805. Each system still leaves something only a reboot updates; they differ in how much.
- MINIX 3 (https://wiki.minix3.org/doku.php?id=developersguide:liveupdate,
https://wiki.minix3.org/doku.php?id=www:documentation:reliability). The Reincarnation Server
replaces a driver that dies or stops answering.
minix-service update <binary> -label <label>updates a system service in place, PM, VFS, RS and VM included (VM "with severe restrictions only"). The service quiesces, the new instance reads the old one's address space, and a failed state transfer kills the new instance and resumes the old. Several services update as one transaction with-qandupd_run. The microkernel cannot be updated. - Proteos, the MINIX 3 rewrite in Giuffrida, Kuijsten and Tanenbaum, ASPLOS 2013 (https://www.cs.vu.nl/~ast/Publications/Papers/asplos-2013.pdf). Every process, the update manager included, updates in an atomic transaction. Rollback on a timeout or a failed state check rebinds endpoints to the old instances. Only the kernel needs a reboot. This is the closest precedent for calef's model.
- QNX Neutrino (https://www.qnx.com/developers/docs/8.0/com.qnx.doc.neutrino.utilities/topic/h/ham.html,
sys_arch/topic/proc.html). The High Availability Manager restarts processes in stages, and drivers and filesystem managers load and unload at run time.procntois the microkernel and process manager in one; whether it can be replaced live: unverified. - Fuchsia (https://fuchsia.dev/fuchsia-src/concepts/packages/package_update), the contrasting
model: the
basepackage set "can only be updated by performing a whole system update", an OTA and a reboot. Only cache and universe packages update on demand. - Linux
needrestart(https://github.com/liske/needrestart) finds daemons still running old binaries or libraries after an upgrade, restarts them through systemd, and says when the kernel needs a reboot. NixOS'sswitch-to-configurationstops, reloads and restarts each changed unit by rule (X-StopIfChanged,X-ReloadIfChanged,X-RestartIfChanged), from the nixpkgs manual chapter "What happens during a system switch".