Limitations and failure modes
archix makes a rolling-release system declared, locked and reversible, on top of pacman and a normal filesystem: a switch applies in place, and on btrfs a snapshot before each change gives you a way back, with boot counting to take it by itself. Some of that has a price, and some guarantees stop short. This page lists them, so you know where the edges are. What falls back by itself has the guarantees per bootloader and filesystem in one table.
Switching
Section titled “Switching”A switch isn’t atomic. It applies in place: pacman installs and removes packages on the running system, then archix writes users, files and services, restarts what changed and runs the hooks. One that fails partway can’t be undone step by step; it says what it applied, and that the snapshot it took first holds the system as it was: generation 45 wasn't recorded, and generation 44 stays current; snapshot 12 holds the system as it was before (archix snapshot list). Keep that snapshot with archix rollback 12, or fix the cause and switch again. Everything that can refuse, a bad sudoers file, a package that can’t be fetched, a partial downgrade, refuses before the snapshot, with nothing changed. On ext4 or with rollbacks off there’s no snapshot to go back to.
Running programs keep their old files until they restart. A switch restarts units whose packages or unit files it replaced, but leaves the display manager, dbus, logind, NetworkManager, sshd, gettys, the audio stack and the desktop session’s own units running, and lists them: :: still using replaced files until you log out or reboot: .... A replaced kernel runs only after a reboot: the running kernel was replaced: reboot to run the new one (the running one's modules stay loadable until then). Those modules stay loadable whether a switch or a plain pacman transaction replaces the running kernel’s package: archix copies them aside before the transaction and puts them back after it. A plain transaction does so when it names that package; if the copy fails, modules the kernel hasn’t loaded yet won’t load until a new image boots. restart_if_changed overrides the restart choice per unit.
Hooks run once per switch. A failing hook or on_change script is listed and the switch exits non-zero, but nothing runs it again until the next switch.
Power cuts
Section titled “Power cuts”A cut-off update falls back only on systemd-boot with boot counting. A package update, whether archix switch or plain pacman runs it, gives the current system’s boot entry its tries and the slot its entry, and marks itself unfinished, before it changes anything. A cut at any point then boots afterwards, and a torn system fails its health check and falls back to the snapshot from before the update. That boot reboots into the fallback at once, whatever boot.health_check.reboot_on_failure says: 16 s from the cut to the slot’s boot in the power-cut test, at the default boot.unblessed_timeout. Without boot counting there’s nothing to fall back with; see below.
No package changes before snapshots start. Snapshots start at the boot after the first switch lays the root out, once @archix is mounted. A first switch that has to lay the root out and would also change packages does only the layout, archix’s own files and the boot menu, then stops for that reboot, so no package transaction ever runs without a snapshot to fall back to. It asks first:
set up rollbacks first: the @archix and @varlib subvolumes, their fstab lines and the boot menu, then this switch stops; the package changes above wait for the switch after the next reboot, which snapshots the system before themset rollbacks up and stop for a reboot? (3 package changes wait for the switch after it) [Y/n]and ends with 3 package changes wait: reboot, then run `archix switch` again, which takes a snapshot before them, so a boot they break falls back to it. Until that reboot, plain pacman refuses too: archix: the root is laid out for rollbacks and waits for a reboot, which mounts @archix; until then this transaction would have no snapshot to fall back to, so reboot first. The boot after it is counted, and checked by the config’s own boot.health_check, though that switch recorded no generation, so a unit the config turns off doesn’t fail it. A first switch with no package changes applies its files, users and services right away, without a snapshot, as there’s no package transaction for a cut to tear.
Laying the root out is safe against cuts, as its order keeps fstab from naming anything that isn’t ready: a cut before the fstab lines are written leaves a plain system, and running the switch again finishes the layout; a cut after them leaves a move the next boot makes.
So is the first switch’s boot step, the images and the menu it writes after recording its generation. A cut there leaves the generation current with no working boot step, and the next archix switch, though it has nothing else to do, writes it again: the boot step of generation 1 isn't whole: its boot entry isn't on the ESP; doing it again. archix status warns in the meantime.
Lost writes are replayed for install and switch so far. A real power cut can lose or reorder writes that weren’t flushed, which a VM reset can’t show. The write-replay tests boot the disk at every flush and every step archix marks, with subsets of the ESP’s unflushed writes; full replays of a plain pacman install, archix switch, keep and the move of a top-level root into @ passed, and a sampled replay of the /var/lib move. A sampled replay of a pacman -Syu with its kernel found the rescue-entry bug, a cut while the rescue entry is rewritten leaving it empty; on the fix its rerun passed, 416 checks with none inconsistent, every write subset of the rescue entry’s window included. Their passes were recorded on commits before the last fixes; the release gate on the final commit is the confirmation. They replay what a virtual disk saw, not a real drive’s cache. See How it’s tested.
A cut during a kernel upgrade boots the old kernel on the new root. Until the post-transaction step rebuilds the boot image, the menu starts the old kernel, whose modules the upgrade has removed from the root. archix keeps them aside before the transaction, and the boot’s check puts them back before anything needs the ESP, so vfat loads, the ESP mounts, the unfinished mark fails the health check and the entry is marked bad. In the power-cut test, the slot booted 16 s after the cut, at the default boot.unblessed_timeout. A counted boot whose entry isn’t on a mounted ESP fails its check too; on an uncounted boot, pick an older snapshot.
A few writes to the ESP can’t be made safe. The ESP is FAT, and archix writes each file there under a new name before it removes the old one. Four things keep one name: a snapshot entry whose image an older archix built, with boot counting off, whose old file goes before the new one is named, as that image’s initramfs can’t read a versioned name, so a cut leaves it missing until the next switch or pacman transaction; loader.conf and the rescue entry, rewritten in place, so a cut can leave them empty, and systemd-boot then starts its own first entry, uncounted, until the next boot writes them again; and a boot loader on the ESP that archix’s key hasn’t signed, which archix signs in place: under Secure Boot it signs systemd-boot’s own file in /usr instead, as systemd-bootx64.efi.signed, which bootctl and systemd-boot-update.service copy to the ESP, so this happens only when Secure Boot is first set up and for Limine’s loader, which has no such copy; a cut during that one step can leave the machine without a loader until you reinstall it from a live USB; and the removable-media loader the move from Limine replaces, kept beside it as BOOTX64.EFI.before-archix first. See Power cuts and the ESP.
GRUB, Limine and ext4 get best effort. archix flushes what it writes, but with no boot counting there’s no fallback after a cut that leaves the system unbootable: pick an older entry yourself on GRUB, use limine-snapper-sync’s entries on Limine, and use a live USB on ext4.
Rollback and fallback
Section titled “Rollback and fallback”A snapshot holds the root, not your data. @ is snapshotted; /var/lib, on @varlib, and /home, /root, /srv, caches and logs on their own subvolumes, aren’t. So keeping a snapshot, booting one and a fallback leave databases, Flatpak apps, containers and your files as they are now. A newer PostgreSQL or MariaDB may have migrated its data, and the older version can’t read it. archix revert asks before going back across such versions, from a list it ships plus your unsafe_downgrades, but a keep, a boot from the menu and an automatic fallback don’t ask; see Downgrades that may break data. Back up data you can’t lose.
Package files in /var/lib follow a keep, with edges. Files packages own in /var/lib go back to the kept snapshot’s versions, but only where they’re unchanged since the current package installed them; a changed one stays, with a warning. Files of packages installed since are moved aside to /var/lib/.archix-moved/<N>/, which follows that snapshot’s retention. See /var/lib after a keep.
Accounts follow the config, and people are carried. A keep sets declared users as the kept snapshot’s config declares them, carries users, groups and passwords created or changed since by name, and brings back every account deleted since as a locked placeholder, so its UID stays reserved; archix user unlock NAME enables a declared one. An account whose ID another name has in the kept root is left out, with a warning. See Accounts after a keep.
Changes before a keep’s reboot are lost. From archix rollback N until the reboot, package changes and /etc edits on the running system go with it, which the pending notice says; pacman and archix switch refuse until then.
Try mode is throwaway, and its layer is small. An older snapshot booted from the menu, or by a fallback, runs read-only with a writable layer over the root and /var/lib: a 4 GiB file in @archix, 1 GiB or 256 MiB on a fuller disk, else memory. Past that, writes fail with “no space left on device”. Everything written there is gone at the next boot, even if you keep the snapshot; /home isn’t layered, so what you change there stays. See Try mode.
Automatic fallback needs systemd-boot 260 or newer, and stops at what the health check sees. With an older systemd-boot on the ESP, archix writes plain entries, and an update that hangs or panics stays the default: pick a snapshot yourself. A boot that reaches its default target with no newly failed unit and the display manager up counts as good even if it’s broken past that, such as a game that crashes or a desktop that starts but misbehaves. boot.health_check moves the line for what it can check, units, listening ports, reachable hosts and logins; a host that’s down for reasons of its own fails the check just the same, and falls back from a good update.
A fallback takes minutes when nobody’s there. In the VM suites, a broken glibc fell back in about 35 seconds, with boot.unblessed_timeout at its default of 10, which a panic doesn’t wait for. A hang fell back in about 2 minutes with boot.unblessed_timeout = 1; at the default of 10, its two tries take about 20 minutes. An emergency shell reboots after 2 minutes with nobody logged in, 263 s to the fallback for both tries at the default timeout, and a boot a power cut left torn reboots at once, 16 s from the cut to the fallback. A failed unit fell back in about 10 minutes at the default of 10. A hang, an emergency shell or a failed unit reboots itself only with nobody logged in; a torn boot reboots regardless. See How long a fallback takes.
On Limine, a keep across a kernel change is refused. Limine boots the kernel and initramfs it copied to the ESP, not the root’s, so keeping a snapshot whose kernel or initramfs differs would boot it with the wrong one: Limine boots the kernel and initramfs on the ESP, and the snapshot's kernel differs from the current one's, so it would boot with the wrong one: install the snapshot's kernel first, or switch to systemd-boot. Every Limine fallback goes through limine-snapper-restore, which archix sees as a foreign root until archix resync.
A bad config may need a live USB. A snapshot only helps if something boots. With systemd-boot and rollbacks on, a config that breaks the boot falls back like a broken package update. On GRUB and Limine, pick an older entry by hand; on ext4, or with rollbacks off, there’s nothing older to boot, and a config that stops the machine from booting needs the rescue entry or a live USB, as on NixOS.
Some failures still need a live USB. When the rescue entry can’t start either: an ESP the firmware can’t read or that was wiped, a broken systemd-boot, Secure Boot refusing everything, or a root filesystem the kernel can’t mount. archix chroot mounts the layout with its binds from there.
ext4 has no rollbacks. On ext4 archix manages the config: switches, generations, archix revert and drift work, but there are no snapshots, no keep and no boot fallback. Converting to btrfs isn’t built yet. See ext4 and rollbacks off.
pacman and strict mode
Section titled “pacman and strict mode”Strict mode is a guardrail, not enforcement. With strict = true, pacman and the libalpm front ends refuse transactions archix doesn’t run, but archix recognises its own by an environment variable anyone can set, and root can remove the hook. It keeps you from changing the system by habit, not someone determined to.
A masked or shadowed hook turns protection off. A file of the same name in /etc/pacman.d/hooks, or a link to /dev/null, stops archix’s pacman hooks from running: no snapshot before plain transactions, no boot menu update after a kernel change, no strict mode. archix status and every boot warn about it, but don’t fix it.
snap-pac and Timeshift are left alone. With snap-pac on, every pacman run is snapshotted twice, once by each; restoring a snapper or Timeshift snapshot replaces the root behind archix’s back, and switches and keeps refuse until archix resync. See Other snapshot tools.
Locking
Section titled “Locking”Reproducing the declared state has limits. A switch on a fresh machine reproduces what the config declares, not: packages kept untracked under drift = "keep", /var/lib and home directories, npm -g and installers that write to /opt, CachyOS builds older than archix’s cache, AUR builds, which aren’t bit-for-bit, and AUR packages since deleted.
Third-party repo versions are exact only while a copy is cached. Most third-party repos keep only the current build of each package. archix keeps a copy of everything it installs from them, but a fresh machine, or one whose cache was cleared, can only get what the repo serves today. Then the fallback chain picks a replacement and rewrites archix.lock with it, so the lock no longer says what the first machine had. On CachyOS, whose repos hold the last three or four builds, a revert reaches back only as far as archix has been installed. A package cache that the first machine fills, with archix cache push or after every switch with package_cache_push, closes the gap for every machine that can reach it, for as long as it keeps the files.
Only git sources and downloads are pinned for AUR rebuilds. An AUR package is locked to the commit of its build recipe, and its first build records in archix.lock the commit each git source was cloned at and the sha256 of each download whose checksums are SKIP; a later build of the same lock checks out those commits and checks those downloads. Sources from Mercurial, Subversion, Bazaar or Fossil aren’t pinned: a rebuild takes whatever they serve that day, and archix status names such packages. Builds aren’t bit-for-bit reproducible either, so another machine’s build of the same pinned sources is the same code, not the same file, unless a package cache it lists holds the first machine’s build.
Foreign packages init rebuilds stay on the machine they came from. A package you built by hand, or one that left the AUR, is left in ignored_packages unless you pick it in archix init’s wizard or with --repack NAME. A picked one becomes a recipe in pkgbuilds/ that names its installed files by sha256, while the files themselves stay in /var/cache/archix/sources, out of the config, and its builds stay out of package caches, since they may hold what isn’t yours to share. So another machine sharing the config can’t build it. A config file you edited goes into the recipe as the package shipped it, from the package file in pacman’s, yay’s or paru’s cache, or not at all. Rebuilding needs every other file the package owns to be as pacman installed it, and the same of the foreign packages it depends on; init says why when one can’t: ! nvidia-dkms-custom is in no repo or the AUR, and archix leaves it alone: usr/lib/modules-load.d/nvidia.conf changed since pacman installed it.
Trust and signatures
Section titled “Trust and signatures”The config directory is yours, so whoever runs as you can change it. A config in your home, or one you own, can be edited by any program running as you, which can then wait for your next sudo archix switch. That’s why every switch shows the config’s diff and the plan’s since the last generation archix applied, before it asks; --noconfirm skips that look. Root never evaluates the live directory: it captures the tree as its owner, copies it into its own repository, and evaluates that copy as a transient user in the Lua sandbox, with CPU, memory and time limits, then applies exactly the plan it showed. A config in a root-owned directory, such as archix init’s default /etc/archix, takes your user out of the picture. See Safety.
Install scriptlets run as root on the running system. Once you approve an AUR recipe, its package is installed by pacman like any other, and its install scriptlet runs as root, on the live system, with everything root can reach, the signing keys included. Review is the safeguard: a new package’s review shows every file it ships, its .install file included, so read what that does before you trust a recipe.
Reverts trust the pinned sha256, not today’s keyring. In prepare, archix checks every package file against the sha256 in the lock, and has pacman check every incoming package’s signature, so a bad signature or an unknown key stops a switch before anything changes. A revert to an older generation installs packages that were verified when they were first installed, by the sha256 the generation pinned, so a packager key revoked since doesn’t block going back. That also means a key revoked because it was compromised doesn’t block it either. Packages archix built itself, from the AUR or your recipes, aren’t signed; the lock and the build are what you trust.
An AUR build the lock has no sha256 for is trusted as the cache says. Packages from a package cache are checked against the sha256 in the lock, like any download, AUR builds included: the lock records the first build of each recipe commit, and a cache’s build of the same commit that differs is passed over. Until some machine has built it, as right after archix update locks a new commit, the lock has no sha256 for it, and archix takes the build the cache’s record names, checked only against the record’s own hashes. Whoever can write to the cache can hand your machines that package. List only caches you control.
Secure Boot and the TPM
Section titled “Secure Boot and the TPM”Old signed boot images stay bootable unless you revoke them, and revoking is experimental. A copy of any image archix signed boots wherever it’s put. archix secure-boot revoke adds the ones archix no longer uses to dbx; it’s tested on OVMF, not on real firmware, whose variable stores vary. It needs sbctl’s KEK as a file, adds at most 128 entries, about a year or two of weekly kernel updates, past which old images stay bootable until a new db key retires them (The dbx ceiling), and leaves old signed copies of systemd-boot alone. SBAT can’t stand in: only shim enforces it (Why not SBAT).
An unsigned image leaves the menu behind, not the system. Boot images are built from the kernel a switch just installed, so a switch applies first and checks the signature after. When an image isn’t signed under Secure Boot, the boot menu keeps starting the old images, and the switch says so and exits non-zero; fix the keys and switch again. See Secure Boot.
PCR 11 bindings break when the image changes; signed policies are experimental. A switch that changes the kernel, initramfs or command line builds a new image, which measures differently into PCR 11, so a secret sealed to PCR 11’s values has to be re-sealed. With systemd’s PCR signing key in place, archix signs a policy into every image for secrets bound to the key (TPM-bound secrets). No test has used a real TPM yet, so don’t rely on it for a disk you can’t open otherwise.
Which snapshot boots isn’t signed. The images and their command lines are signed, and shared by every entry that boots the same kernel and initramfs. Which snapshot a boot mounts comes from the boot menu entry, an unsigned file on the FAT ESP, which systemd-boot reports in the LoaderEntrySelected EFI variable, mapped to a snapshot through archix’s records on the root. Someone who can write to the ESP can make an older snapshot’s entry start, which boots that snapshot read-only in try mode; the boot menu offers it anyway.
The signing keys sit on the root filesystem. sbctl’s Secure Boot keys, in /var/lib/sbctl/keys, and systemd’s PCR signing key, /etc/systemd/tpm2-pcr-private-key.pem, are plain files that root can read, and so can anyone who mounts an unencrypted root from another system. With the db key they can sign a boot image your firmware accepts, with the KEK they can change db and dbx, and with the PCR key they can sign a policy that unlocks a secret bound with systemd-cryptenroll --tpm2-public-key for any image they build. Every older image archix signed also carries a valid signed policy, so it unlocks such a secret too until it’s revoked, or the volume is bound to a new key with archix secure-boot rotate-pcr-key. Package install scriptlets and hooks run as root, so they can read the keys too. Keep the root filesystem encrypted, and treat root on the machine as owning these keys; sbctl can keep its keys in a TPM or a YubiKey instead, though archix can’t then sign dbx updates.
See Secure Boot for what archix does sign and check.
Disk space
Section titled “Disk space”A snapshot costs what changed since. A btrfs snapshot shares every unchanged block with the root, so it costs the files an update replaced or removed, which it keeps. Before a plain pacman transaction, archix estimates the transaction’s full install size, without subtracting what it removes, since the snapshot pins that, plus a margin; short of rollback.min_free, 10% by default, and a 1 GiB reserve for one keep, it asks on a terminal and follows rollback.low_space without one. See Short of space.
Pruning keeps what a fallback needs. archix drops the oldest snapshots past rollback.keep_switch and rollback.keep_pacman, 10 each, and more while the root is under the floor, but never a manual snapshot, one with a boot entry, or the newest. When none may go and the root is still short, it warns, and names the size of archix’s package cache, which counts in the floor too.
The ESP holds one image per distinct kernel and initramfs. Snapshots whose kernel and initramfs match the current system’s share its image; one that differs keeps its own, up to about 40 MB each. The menu is capped at rollback.entries, 5 by default, plus the fallback slot, and a switch refuses to fill the ESP: the ESP at /efi has 152 MiB free (40 MiB more once older snapshots' entries go), but a new boot image needs about 210 MiB; free up space on it.
The free-space check is an estimate. Before a switch or revert changes anything, archix checks every mount the incoming files land on, the way pacman does, from the file sizes in each package’s .MTREE rounded up to whole blocks, plus a cushion; see Safety. It doesn’t count directories or a filesystem’s own metadata, and btrfs’s free space is itself an estimate. Free inodes are checked too, roughly, on filesystems that report them; btrfs doesn’t.
Not yet known
Section titled “Not yet known”- Power cuts on real drives. The write replay boots every flush point of a virtual disk; a real drive’s cache, which may reorder or drop writes it already acknowledged, isn’t modelled. See How it’s tested.
- Weeks of use on real hardware. The failure paths are exercised in VMs and containers: power cuts at archix’s own steps, a broken glibc, a hanging unit, an emergency shell, a failed unit, a near-full disk under try mode. archix in place hasn’t yet run for weeks on real machines, including Secure Boot on real firmware and the move from Limine to systemd-boot, which is where the failures nobody thought to test turn up.
- Real GPUs, TPMs and firmware. The NVIDIA, DKMS, PCR, rescue, recovery and secrets suites run in QEMU, with swtpm for the TPM; an NVIDIA driver is built and installed there but never drives a GPU. See Feature status.
- Upgrading from one release to the next. Newer archix reads every older record and plan format, which the Arch suite tests with ones an older build wrote; between releases it waits for a second release.
Feature status lists what’s shipped, partial and planned, and what tests each.