The installer partitions the machine differently depending on its boot mode.
| Mode | Partitions |
|---|---|
| UEFI (GPT table) | EFI partition in FAT32 (1 → 513 MiB) · swap (513 MiB → 2.5 GiB) · Btrfs root (2.5 GiB → 100%) |
| BIOS (MBR table) | swap (1 → 2049 MiB) · Btrfs root (2049 MiB → 100%) |
The root partition is labelled calaos-os and mounted with the options noatime,compress=zstd.
On UEFI, GRUB is installed in removable mode — into /EFI/BOOT/BOOTX64.EFI — to stay compatible with firmwares that handle custom boot entries poorly.
The installer creates the following layout:
@ main volume
@/.snapshots restore points
@/.snapshots/1/snapshot the actually booted root (default subvolume)
@/boot/grub
@/opt
@/root
@/srv
@/tmp
@/usr/local
@/var/cache
@/var/log
@/var/spool
@/var/tmp
Copy-on-write is disabled on the @/var/* subvolumes, whose contents change constantly.
The system boots not from @ but from @/.snapshots/1/snapshot, set as the default subvolume. This indirection is what lets snapper point the root at another restore point without moving anything.
A restore point photographs the root subvolume. Separately mounted subvolumes are not part of it.
| Covered | Not covered |
|---|---|
| The system and installed programs | /var/log — the logs |
| System configuration files | /var/cache, /var/spool, /var/tmp |
/mnt/calaos — your whole Calaos configuration | /opt, /srv, /root, /usr/local |
/boot/grub |
/mnt/calaos is an ordinary folder inside the root subvolume, not a separate subvolume. It is therefore captured by restore points and replayed during a rollback.
This is why a rollback also undoes the Calaos configuration made since the chosen date. See Rolling back.
Conversely, since /var/log sits on a separate subvolume, the logs survive a rollback: this is what allows an incident to be analysed after working around it.
Two mechanisms feed them:
calaos-os upgrade as well as every apt;snapper-timeline.timer — periodic points, independent of updates.Point number 1 is created during installation, with the description First Root Filesystem Created at Installation.
snapper-cleanup.timer does the housekeeping according to the configuration set at installation:
| Setting | Value | Meaning |
|---|---|---|
NUMBER_LIMIT | 10 | Maximum number of numbered points kept |
NUMBER_MIN_AGE | 5400 | Minimum age in seconds (1 h 30) before a point may be deleted |
TIMELINE_LIMIT_DAILY | 14 | Daily points kept |
TIMELINE_LIMIT_WEEKLY | 4 | Weekly points kept |
TIMELINE_LIMIT_MONTHLY | 6 | Monthly points kept |
TIMELINE_LIMIT_YEARLY | 2 | Yearly points kept |
To read or change these values:
snapper -c root get-config
snapper -c root set-config "NUMBER_LIMIT=10"
snapper list # list with dates and descriptions
snapper delete NUMBER # delete one specific point
btrfs filesystem usage / # real disk usage
The space taken by a restore point is not visible immediately: when created it costs almost nothing, then grows as the system diverges from the photographed state. btrfs filesystem usage / gives the real picture, where df can be misleading.
grub-btrfsd watches the restore points and automatically regenerates the submenu offered at boot. The GRUB timeout is deliberately kept at 5 seconds to leave time to choose.
When you boot on a restore point, the root is mounted read-only, and an overlay layer receives temporary writes. Nothing is therefore modified until you confirm.
The calaos_rollback script:
Not booted from a readonly btrfs snapshot;/proc/cmdline, in the form subvol=@/.snapshots/<number>/snapshot;snapper rollback <number>, which makes that point the new root;All that remains is to reboot onto the restored root.
The script is started either by the Calaos Home interface, which automatically displays a window in this context, or by hand from a terminal.
| Unit | Purpose |
|---|---|
snapper-timeline.timer | Creates the periodic restore points |
snapper-cleanup.timer | Applies the retention policy |
grub-btrfsd.service | Updates the boot menu |
btrfs-scrub@.timer | Checks data integrity |
fstrim.timer | SSD maintenance |
This information comes from the scripts in the calaos-container repository, in particular scripts/calaos_install and scripts/calaos_rollback.