Skip to content

Latest commit

 

History

History
46 lines (46 loc) · 2.07 KB

README.md

File metadata and controls

46 lines (46 loc) · 2.07 KB

smol-snapper

About

smol-snapper is a single bash script designed to create bootable Btrfs snapshots securely and conveniently. It utilizes Btrfs Origin Generation (ogen) to create incremental snapshots, which are tagged with using the actual ogen number increasing sequentially over time.

Features

  • Create, delete, restore snapshots for multiple subvolumes
  • Build Unified Kernel Image with the latest available kernel and initramfs from the root snapshot
  • Synchronizes with Limine bootloader for automatic snapshot entries management
  • Automatically sign UKI and bootloader using sbctl or sbsign
  • Support snapshot entry management on limine for multiple OSes

Requirements

  • A Btrfs Flat Layout and at least subvolume mounted under / and /.snapshots
  • An ESP with sufficient space for storing UKI, mounted under /efi
  • The /boot directory must be part of the root snapshot
  • limine bootloader for managing UKI entries
  • Notification sender like fyi or libnotify with dbus
  • A stub provider: systemd or efibootguard
  • Secure Boot signing tool: sbctl or sbsigntools
  • Additional dependencies: util-linux, bash, and btrfs-progs

Installation

Arch Linux (AUR)

yay -S smol-snapper

Manual

git clone https://github.com/sabuj66/smol-snapper.git && cd smol-snapper
sudo cp smol-snapper /usr/bin/
sudo cp smol-snapper.conf /etc/
sudo chmod +x /usr/bin/smol-snapper

Usage

Usage: smol-snapper [OPTIONS]
  -h        Show help messages
  -c FILE   Specify custom configuration file path
  -q        Quiet mode
  -r        Restore mode
  -V        Show version

For more information and configuration options, check out the configuration file.

Limitations

  • Every defined subvolumes must have unique names
  • Snapshots can only be booted via UKI and will not work on non-UEFI systems
  • Using read-only root snapshots can cause issues with loading certain services and booting the snapshot

License

smol-snapper is licensed under GNU General Public License v3.0.