Booting a snapshot from the GRUB menu leaves a read-only, half-broken system #26
Labels
No labels
P0
P1
P2
P3
audio
bakery
boot
breadbug
bug
build
ci
dependencies
design
disk
docs
encryption
final
firewall
graphics
hardware
idle
installer
keybinds
nvidia
packages
phase-1
polish
recovery
reliability
reproducibility
secure-boot
security
shell
signing
snapshots
supply-chain
swap
tech-debt
theming
ux
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Breadway/bos#26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
grub-btrfs boots snapper snapshots, which are read-only. Without grub-btrfs' overlayfs initramfs hook, anything that writes to
/,/etcor/var/libfails (NetworkManager, greetd, systemd state). That makes the advertised recovery path ("reboot, pick a snapshot") unreliable. There's also no documented way to make a snapshot permanent, becausesnapper rollbackis unsupported.Where
iso/airootfs/etc/calamares/post-install.shinitramfs HOOKS section (lines 95-149).Fix
grub-btrfs-overlayfshook to mkinitcpio HOOKS (afterfilesystems); it ships in thegrub-btrfspackage. It needs the udev base hook; undersystemdit doesn't apply, so check which base hook is in use and document or handle both.bos-restore-snapshot <n>helper (and a Settings > Snapshots button). It should mount the top-level subvolume, rename@to@.broken-<date>, runbtrfs subvolume snapshotfrom@snapshots/<n>/snapshotto@, then reboot. This keepsrootflags=subvol=@valid.bos-update,bos-rescueand the site text to describe the real flow.Acceptance
bos-restore-snapshotfollowed by a reboot boots the restored state from the default GRUB entry.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.shplus a VM install. Add a CHANGELOG[Unreleased]entry.Investigation found a design blocker before implementation. The installed
grub-btrfspackage providesgrub-btrfs-overlayfsas an mkinitcpiorun_latehookand its own docs show it with theudevbase hook. The package docs and Arch documentation state it does not work with asystemdbased initramfs. BOS post-install currently keeps thesystemd/sd-encrypthook set on current images, so simply appendinggrub-btrfs-overlayfswould leave the default snapshot boot read-only and fail the acceptance test.Which direction should the installer take?
udev/encrypthook set so the packaged overlay hook works. This changes the installed initramfs base and needs validation for encrypted installs.systemdinitramfs and add a BOS-maintained systemd initrd overlay implementation. This is more code and maintenance.udevsystems and explicitly document that snapshot boots remain read-only undersystemd. This does not meet the current writable-desktop acceptance test on BOS defaults.The requested Settings > Snapshots restore button belongs to the separate
bos-settingsrepo. The BOS queue scope is limited to this repo, so that UI change needs a separate BSET issue. Also, a restore helper must resolve the Btrfs device from the installed fstab or kernel command line when booted via overlay, sincefindmnt /then reports overlayfs rather than the underlying Btrfs device. I left the issue in TODO pending a choice on the initramfs approach and split scope.The snapshot-menu boot now reaches the greeter with a writable overlay, and a write under
/etcsucceeds. The default boot after restore still stopped in initrd; the agent was rebuilding initramfs to retest when it hit the usage limit. No active verification is running, so moving to TODO with the default-boot acceptance check outstanding.Created linked child issue BSET-22 for the Settings > Snapshots restore action in the separate
bos-settingsrepository. The current BOS-26 PR will cover initramfs overlay boot, the restore CLI, and matching BOS documentation; BSET-22 tracks the UI control and confirmation flow.Isolated handoff check: I copied the issue-scoped snapshot overlay, restore CLI, installer hook, and docs changes into a separate worktree based on origin/main. The shared dirty checkout was left untouched.
bash -npassed for the changed shell scripts andgit diff --checkpassed. The VM acceptance remains unresolved: the prior run reached the greeter with a writable overlay, but default boot afterbos-restore-snapshotstopped in initrd. I did not launch a VM or ISO, and cannot diagnose that failure from static checks alone. This is not ready for REVIEW; BOS-26 remains in DOING until the default-boot failure is understood and retested in an authorized headless VM.Follow-up investigation: the isolated implementation edits mkinitcpio HOOKS and rebuilds all presets with
mkinitcpio -P; the existing static checks pass, but they do not explain why the default boot after restore stopped in initrd. There is no existing headless VM session available for a safe reproduction, and I did not launch a VM or ISO. The snapshot-menu boot had previously reached the greeter with a writable overlay, but default-boot-after-restore acceptance remains unverified and unresolved. Keeping BOS-26 in DOING with the issue-scoped changes staged in the isolated worktree. No PR opened.Headless VM acceptance attempt: there is no existing test VM or QCOW2 image, and the host has no accessible /dev/kvm. I ran the documented
sudo FAST_BUILD=1 ./build-local.shfrom the isolated BOS-26 worktree to produce a current ISO, but it stopped before archiso because the builder is missing all 18 required bakery binaries (bakery,bread, BOS apps, etc.). The only available BOS ISO is dated 2026-09-18, before this issue's changes, so booting it would not test the snapshot overlay/restore implementation. No VM or GUI session was launched. BOS-26 remains in DOING with default-boot-after-restore acceptance unresolved; producing a valid current image requires staging the required bakery binaries.Built a fresh headless-test ISO at
/tmp/bos26-out/bos-2026.10.01-x86_64.isoafter staging the 18 required binaries and breadhelp data withscripts/ci-stage-bakery.py. The script verified the stable minisign signature and artifact SHA-256 checksums; staging used current stable package versions in a temporary lockfile because several older lockfile pins no longer publish complete artifacts. The resulting ISO is bootable-format and contains the BOS-26 restore helper and initcpio plugin. During mkinitcpio, ArchISO also reportedbinary not found: nbd-client; mkarchiso still produced the ISO. I attempted to start QEMU headlessly on a disposable qcow2 disk, but automatic approval rejected standalone VM launch under the standing rule that VMs may only run in an already-running headless nested session. No VM started. Runtime snapshot/restore acceptance remains unverified pending explicit permission to run a standalone headless QEMU guest or an existing nested VM session.Implementation and runtime acceptance are ready for review in PR #83: #83 (head
0aa5be816ca513820a814521bd82e9bbe1e7482d). A headless UEFI QEMU guest booted the generated GRUB snapshot entry for read-only snapshot 1;/was a writable overlay,/etcwrites succeeded, and the source snapshot stayed read-only.sudo bos-restore-snapshot 1with the exactRESTORE 1confirmation restored snapshot 1 to@, preserved the old root as@.broken-20261002-030155, rebooted via the default GRUB entry, and verified writable Btrfs@, restored marker, and a successful/etcwrite. The shippedbos-copy-kerneland post-install script ran in a disposable guest. The interactive Calamares UI path, BIOS boot, encryption, and udev initramfs path were not exercised. Evidence and screenshots are preserved in ignoredout/bos26-vm/in the isolated worktree. Issue moved to REVIEW.