Files
dasandClaude Opus 5.5 ecced4e3f4 Stage 4: Calamares installer and Btrfs snapshots (0.2.0)
- Package Calamares 3.4.3 (Qt6, widgets UI) with xbps-src.
- das-installer: Calamares setup for Void/runit with Das OS branding and
  slides. It copies the clean live image (live-base), builds locales and the
  host-only initramfs, rewrites kernels without sparse tails (GRUB 2.12 cannot
  read Btrfs holes at the end of a file), then removes itself.
- das-snapshots: flat Btrfs layout (@, @home, @snapshots, @var_log,
  @var_cache_xbps), snapper with hourly snapshots via cronie, grub-btrfs menu,
  snapper-rollback, and a dracut module that boots read-only snapshots with
  a RAM overlay.
- das-settings 0.2.0: start LightDM with the system locale.
- Live image: GRUB, efibootmgr and the new packages; Das OS /etc/issue.
- Build: wipe stale destdirs before building packages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 08:59:09 +03:00

15 lines
657 B
Bash
Executable File

#!/bin/sh
# Snapper snapshots are read-only, and the system can't start from a read-only
# root. When GRUB boots a snapshot, mount it under an overlay whose writable
# layer lives in RAM. Changes made in that session are lost at shutdown.
[ "$(btrfs property get -ts "$NEWROOT" ro 2>/dev/null)" = "ro=true" ] || return 0
info "das-snapshot-overlay: read-only snapshot, adding a writable overlay"
lower=$(mktemp -d -p /)
ram=$(mktemp -d -p /)
mount --move "$NEWROOT" "$lower"
mount -t tmpfs -o mode=0755 das-overlay "$ram"
mkdir -p "$ram/upper" "$ram/work"
mount -t overlay -o "lowerdir=$lower,upperdir=$ram/upper,workdir=$ram/work" das-overlay "$NEWROOT"