Choosing "file" swap in the installer makes all snapshots fail #29

Closed
opened 2026-09-26 07:27:43 +08:00 by Breadway · 3 comments
Owner

Problem

partition.conf offers userSwapChoices: none, small, suspend, file. With btrfs root, Calamares puts /swapfile inside @, and btrfs refuses to snapshot a subvolume that holds an active swapfile. So snap-pac and every snapper snapshot fail, and the user isn't told. BOS already ships zram (etc/systemd/zram-generator.conf), so disk swap is only really needed for hibernation.

Where

iso/airootfs/etc/calamares/modules/partition.conf lines 17-21.

Fix

  • Remove file (and probably small); keep none and suspend (a swap partition, for hibernation).
  • If suspend is kept: make sure the resume hook and resume= cmdline get wired in (check what initcpiocfg does), and document that zram plus a swap partition coexist. Give the partition a lower priority than zram.

Acceptance

The installer offers no swapfile option, and hibernate works with the suspend choice (or that choice is removed too and documented).


Source: BOS v0.6.2 source review (tag dated 2026-09-19); paths and line numbers refer to that tree. Read AGENTS.md first. One issue per branch/PR, match existing style. Verify with FAST_BUILD=1 sudo ./build-local.sh plus a VM install. Add a CHANGELOG [Unreleased] entry.

## Problem `partition.conf` offers `userSwapChoices: none, small, suspend, file`. With btrfs root, Calamares puts `/swapfile` inside `@`, and btrfs refuses to snapshot a subvolume that holds an active swapfile. So snap-pac and every snapper snapshot fail, and the user isn't told. BOS already ships zram (`etc/systemd/zram-generator.conf`), so disk swap is only really needed for hibernation. ## Where `iso/airootfs/etc/calamares/modules/partition.conf` lines 17-21. ## Fix - Remove `file` (and probably `small`); keep `none` and `suspend` (a swap partition, for hibernation). - If `suspend` is kept: make sure the `resume` hook and `resume=` cmdline get wired in (check what initcpiocfg does), and document that zram plus a swap partition coexist. Give the partition a lower priority than zram. ## Acceptance The installer offers no swapfile option, and hibernate works with the `suspend` choice (or that choice is removed too and documented). --- Source: BOS v0.6.2 source review (tag dated 2026-09-19); paths and line numbers refer to that tree. Read AGENTS.md first. One issue per branch/PR, match existing style. Verify with `FAST_BUILD=1 sudo ./build-local.sh` plus a VM install. Add a CHANGELOG `[Unreleased]` entry.
Author
Owner

Removed Calamares small, suspend, and file swap choices, leaving none, and updated the hardware guide and Unreleased changelog for zram-only installs without hibernation. Static YAML assertions and git diff --check pass. Local commit 2937c74 is on fix/bos-29-zram-only-swap in /home/breadway/.cache/bos29-work.

I could not push or open a PR: the standard origin push fails before authentication with Bad owner or permissions on /etc/ssh/ssh_config.d/20-systemd-ssh-proxy.conf. I left the host SSH config untouched. The ISO build and install/VM acceptance also remain unverified. Returning this to TODO until origin access and headless install validation are available.

Removed Calamares `small`, `suspend`, and `file` swap choices, leaving `none`, and updated the hardware guide and Unreleased changelog for zram-only installs without hibernation. Static YAML assertions and `git diff --check` pass. Local commit `2937c74` is on `fix/bos-29-zram-only-swap` in `/home/breadway/.cache/bos29-work`. I could not push or open a PR: the standard `origin` push fails before authentication with `Bad owner or permissions on /etc/ssh/ssh_config.d/20-systemd-ssh-proxy.conf`. I left the host SSH config untouched. The ISO build and install/VM acceptance also remain unverified. Returning this to TODO until origin access and headless install validation are available.
Author
Owner

Implementation is ready for review: #70 . The installer offers only no disk swap; zram remains enabled and docs explicitly state disk swap and hibernation are unsupported. YAML assertions and diff checks pass. Full ISO/install acceptance is being coordinated with the separate headless acceptance worker; that result is still outstanding.

Implementation is ready for review: https://git.breadway.dev/Breadway/bos/pulls/70 . The installer offers only no disk swap; zram remains enabled and docs explicitly state disk swap and hibernation are unsupported. YAML assertions and diff checks pass. Full ISO/install acceptance is being coordinated with the separate headless acceptance worker; that result is still outstanding.
Author
Owner

Independent source review PASS at 2a41c7881e. Parsed Calamares YAML: the only offered swap choice is none, btrfs remains the default, and hardware docs plus changelog explicitly explain zram and unsupported installer hibernation. Diff check passes. No CI statuses are configured. The required full ISO install remains acceptance work; this source review does not claim it occurred. PR: #70

Independent source review PASS at 2a41c7881e976d4bb5bda331c7cd82e2531b9b8b. Parsed Calamares YAML: the only offered swap choice is none, btrfs remains the default, and hardware docs plus changelog explicitly explain zram and unsupported installer hibernation. Diff check passes. No CI statuses are configured. The required full ISO install remains acceptance work; this source review does not claim it occurred. PR: https://git.breadway.dev/Breadway/bos/pulls/70
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/bos#29
No description provided.