skip to content

// change history for linux

osreflog

A reflog for a Linux system: what changed, who changed it, and which change broke it.

osreflog records every change to a Fedora system together with its cause: the package transaction, service, command or app that made it. It rebuilds the system as it was at any point, bisects a regression down to a single cause by testing each step in a throwaway container, a VM or a one-shot reboot on real hardware, and undoes that cause file by file. It ships from COPR with a GNOME app; 0.3.0 says what the kept snapshots cost in disk, attributes Flatpak and templated services correctly, and confines the daemon's workers under SELinux.

// bisect17/22
year
2026
type
change history for linux
group
systems
status
on copr, in active development

//in plain words

When a Linux computer breaks, you usually know one thing: it worked last week. osreflog keeps a running record of every change to the system and what caused it, so it can show the exact change responsible, test each suspect in a throwaway copy until it finds the one that broke things, and safely put that one back.

for Linux users and admins who know it worked last week, and want to know what changed

the problem

//01the problem

When a Linux desktop breaks, you know one thing: it worked last week. Package history covers packages only, the journal shows events but not state, and snapshot tools show the whole system at a moment but not what changed between two snapshots, who changed it, or which change broke things. There is no git bisect for an operating system.

how it works

//02how it works

  1. 01

    Two witnesses

    A live witness records who changes each file as it happens, with a filesystem-wide fanotify mark and eBPF tracing every write back to its process and package transaction. A state witness proves what changed between read-only btrfs snapshots from the send stream. When they disagree, for example a change made while the daemon was stopped, the gap is reported instead of smoothed over.

  2. 02

    Causes, not files

    Changes are grouped into causes: a dnf transaction, a systemd service, a terminal command, an app writing a setting. Writes a daemon makes on someone's behalf over D-Bus, from tools like timedatectl or nmcli, are credited to the caller. osreflog why shows who changed a file and a readable diff of what it means.

  3. 03

    Git's vocabulary on purpose

    log, show, diff, why, bisect and undo work on causes, and references read like git's reflog: c42, @{1}, @{boot-1}, @{yesterday}. Diffs are computed after each checkpoint and cached, so the diff after a real dnf transaction comes back in 6 ms.

  4. 04

    Bisect down to one cause, in three tiers

    Snapshots are coarse, so osreflog rebuilds the states between them by replaying causes into a writable clone. Each step is tested in a throwaway systemd-nspawn container in under a second, in a QEMU VM that boots the clone's own kernel over virtiofs in about 14 seconds, or, for regressions that only show on real hardware, by one reboot into a one-shot boot entry. Every replay says whether it was exact or approximate.

  5. 05

    Undo without rolling back

    osreflog undo reverts one cause path by path as a 3-way merge, leaving alone anything that changed since and refusing on conflict. Package causes are handed to dnf. Dry run is the default, a checkpoint is taken before every apply, replaced files go to an attic, and an undo can itself be undone. GNOME settings get the same treatment through dconf.

  6. 06

    Observe before touching

    Nothing wrote to the live root until a write gate passed: the full undo matrix in a contained scratch root, with symlink-swap races and magic links refused by openat2 resolution, 3,541 race runs and no escape. Metal probes waited for a boot gate tested in a nested VM first, with a boot doctor checking the default entry at every boot. Config parsers run in a sandboxed worker and were each fuzzed for an hour. Secrets are never stored and command lines are redacted.

  7. 07

    A desktop app, packaged and hardened

    A GTK and libadwaita app browses history, shows what changed since, previews an undo and walks a bisect, with search, coloured diffs and toasts. Signed COPR packages cover Fedora 44, 45 and rawhide, and were installed on a fresh Fedora 44 VM with every check passing. Version 0.2.0 added system call filters, a sandboxed user agent and an SELinux module; systemd rates the user agent's exposure at 1.0, down from 8.0.

  8. 08

    Cheap enough to leave on

    The daemon uses 0.08% of one CPU at rest and a checkpoint adds under a second to a dnf transaction. Memory sits around 41 MB just started and grows with big diffs, capped by a 768 MB unit limit. The ledger is local, root-only SQLite with a hash chain, so tampering is evident. The first soak ended after 6.1 hours at a restart; a second that survives restarts and shutdowns started on 20 October and had 28.6 of its 48 hours sampled a month later; its result is published once it is complete.

measured

//03measured

5 of 5
seeded regressions bisected
each found within log2(n) + 1 probes
0.9 s
slowest container probe
nspawn; vm probes boot the snapshot's kernel in 14 s or less
87 of 87
config changes attributed
a scripted workload of about 22 real admin tools
0
parser crashes under fuzzing
8 targets, an hour each, about 3.05 billion inputs
3 probes
to find a real wi-fi regression on metal
6 reboots, default boot entry checksummed untouched after each
0.08%
of one cpu at rest
the daemon on 17 oct 2026; a checkpoint adds under a second to dnf

decisions

//04decisions

  1. 01

    chose two witnesses that can disagree

    over a live recorder alone, or snapshots alone

    A live recorder has silent gaps whenever it is stopped. Snapshots know what changed but not who. The send-stream diff is the truth for what and the fanotify and eBPF trace is the truth for who, and a disagreement is reported as a gap rather than hidden.

  2. 02

    chose parsing the btrfs send stream in its own crate

    over btrfs subvolume find-new

    find-new misses every deletion. The stream parser sees creates, deletes, renames and content, and diffs are computed eagerly after each checkpoint so a later query costs milliseconds.

  3. 03

    chose undo per cause as a 3-way merge

    over rolling the whole subvolume back

    A rollback also reverts logs, VM images and every unrelated change since. Reverting one cause path by path leaves later work alone and refuses on conflict. Package causes go to dnf, which needs the old packages to still be downloadable.

  4. 04

    chose three bisect tiers, cheapest first

    over always rebooting

    A container probe takes under a second and a VM probe about fourteen; a reboot takes minutes and touches the boot loader. The tool uses the cheapest tier that reproduces the problem, and every replay says whether it was exact.

  5. 05

    chose a tamper-evident ledger

    over a tamper-proof one

    A root attacker can rewrite anything on the machine, including a hash chain. The chain makes rewriting visible, which is the honest claim; the threat model says so in those words.

try it

//05try it

  1. //install from copr

    sudo dnf copr enable khaledsaeed18/osreflog && sudo dnf install osreflog osreflog-app

    fedora 44, 45 or rawhide, root on btrfs

  2. //start the daemon and the boot doctor

    sudo systemctl enable --now osreflogd.service osreflog-boot-doctor.service && systemctl --user enable --now osreflog-user.service
  3. //check the setup, then ask what changed

    osreflog doctor && osreflog log

    reading needs no password; checkpoint, undo and bisect ask through polkit

highlights

//06highlights

  • Every change to /etc and system state recorded with its cause
  • A live fanotify and eBPF witness reconciled with btrfs send-stream diffs
  • Cause-level bisect in containers, in VMs that boot the snapshot's kernel, or on real hardware
  • 3-way undo that refuses on conflict, dry run by default, undoable itself
  • 5 of 5 seeded regressions found within the probe bound; a real regression found on metal in 3 probes
  • Installable from COPR on Fedora 44, 45 and rawhide, with a GNOME app
  • 0.3.0 measures what the kept snapshots cost and cut 41,000 noise rows from one appstream refresh to a single cause

built with

  • Rust
  • btrfs
  • fanotify
  • eBPF
  • systemd
  • D-Bus
  • polkit
  • SQLite
  • QEMU
  • KVM
  • dnf5
  • GTK
  • libadwaita

on githubosreflog

license
GPL-3.0
language
Rust
latest release
v0.3.0 oct 20, 2026
last push
dec 2, 2026

printings

//07printings

  1. Planning closed

    Scope, the two-witness design and the gates written down before code.

  2. Witnesses, causes, undo and bisect

    The state witness, the live witness with cause attribution, semantic diffs, the write gate, undo, and bisect in containers and VMs, one phase after another.

  3. v0.1.0 and the boot gate

    Metal bisect behind a boot gate passed in a nested VM, then a real Wi-Fi power-save regression found on the laptop in three probes. First release on COPR for Fedora 44.

  4. v0.2.0

    The GNOME app grows search, headers, toasts and coloured diffs; system call filters, a sandboxed user agent and an SELinux module; CI and a release workflow. A 48-hour soak begins.

  5. v0.3.0

    status reports the disk the kept snapshots hold as a range and doctor warns before they outgrow free space; retention is a config file. The live witness starts before the boot checkpoint. Flatpak's system installation is one cause instead of 41,000 unknown rows, templated units are attributed by name, and DHCP leases are noise. SELinux domains confine the summarizer and undo workers. A second soak that survives restarts begins.

questions

//08questions

Does it need root?
The daemon runs as root with a capability bounding set, system call filters, a memory cap and no network at all. Reading history needs no password for the person at the machine. Checkpoint, undo and bisect ask for the admin password through polkit every time.
Which systems does it support?
Fedora 44, 45 and rawhide on x86_64 with the root filesystem on a btrfs subvolume, which is the Workstation default. Immutable systems like Silverblue, and anything not on btrfs, are out of scope. It warns if Snapper or Timeshift manage the same root.
Can undo make things worse?
It is a dry run by default. An apply takes and verifies a checkpoint first, never overwrites a file that changed since, refuses on conflict, moves replaced files to an attic, and can itself be undone. The write gate ran the full undo matrix in a scratch root with 3,541 race attempts and no escape.
What happens to my secrets?
They are never stored. Shadow, Wi-Fi and VPN credentials and private keys are recorded as changed with a hash only, password-style keys and command-line secrets are redacted, and nothing leaves the machine.
What is not validated yet?
A week of everyday use in the app, the full 48-hour soak result, replay soundness in edge cases, and hardware other than one Intel laptop. The validation document lists each of these.

related sheets

//09related sheets

//10contact

Say hello.I read everything.

Email is the fastest way to reach me. For anything that needs a conversation, book a call.

to

name
Khaled Saeed
country
Lebanon