Make GRUB snapshot boots writable and add snapshot restore #83

Merged
Breadway merged 2 commits from fix/bos-26-writable-snapshot-restore into main 2026-10-02 14:36:48 +08:00
Owner

Summary

  • Add a systemd initramfs overlay for read-only Btrfs snapshots and select it for systemd-based installed images.
  • Add bos-restore-snapshot to restore a Snapper snapshot to the default @ subvolume while preserving the prior root.
  • Update BOS recovery commands, docs, and changelog.

Verification

  • bash -n passed for changed shell scripts; git diff --check passed.
  • Built and booted the BOS ISO in a headless UEFI QEMU guest with a disposable Btrfs disk.
  • Booted a read-only GRUB snapshot to the greeter, confirmed / used a writable overlay, and confirmed writes under /etc did not modify the source snapshot.
  • Ran bos-restore-snapshot 1, confirmed the prompt, and verified the default GRUB entry rebooted into writable @ with the restored marker; the previous @ remained at @.broken-*.

The guest exercised the shipped bos-copy-kernel and Calamares post-install script, but the interactive Calamares UI flow was not tested. Test logs and screenshots are in the isolated worktree's ignored out/bos26-vm/ directory.

Closes BOS-26

## Summary - Add a systemd initramfs overlay for read-only Btrfs snapshots and select it for systemd-based installed images. - Add `bos-restore-snapshot` to restore a Snapper snapshot to the default `@` subvolume while preserving the prior root. - Update BOS recovery commands, docs, and changelog. ## Verification - `bash -n` passed for changed shell scripts; `git diff --check` passed. - Built and booted the BOS ISO in a headless UEFI QEMU guest with a disposable Btrfs disk. - Booted a read-only GRUB snapshot to the greeter, confirmed `/` used a writable overlay, and confirmed writes under `/etc` did not modify the source snapshot. - Ran `bos-restore-snapshot 1`, confirmed the prompt, and verified the default GRUB entry rebooted into writable `@` with the restored marker; the previous `@` remained at `@.broken-*`. The guest exercised the shipped `bos-copy-kernel` and Calamares post-install script, but the interactive Calamares UI flow was not tested. Test logs and screenshots are in the isolated worktree's ignored `out/bos26-vm/` directory. Closes BOS-26
# Conflicts:
#	README.md
#	iso/profiledef.sh
Sign in to join this conversation.
No description provided.