1
0
Fork
You've already forked uki-snapper
0
A simple utility that automatically adds boot entries for snapper snapshots
  • Shell 87.9%
  • Makefile 12.1%
2026年01月30日 14:52:11 +05:30
services Initial commit 2026年01月30日 14:52:11 +05:30
.gitignore Initial commit 2026年01月30日 14:52:11 +05:30
generate-snapper-uki Initial commit 2026年01月30日 14:52:11 +05:30
LICENSE Initial commit 2026年01月30日 14:52:11 +05:30
Makefile Initial commit 2026年01月30日 14:52:11 +05:30
README.md Initial commit 2026年01月30日 14:52:11 +05:30
uki-snapper.conf Initial commit 2026年01月30日 14:52:11 +05:30

uki-snapper

A simple utility that automatically adds boot entries for snapper snapshots.

It contains a generator script and a systemd path service that monitors changes to snapshots. Default config is at /etc/uki-snapper.conf

Features

Goals

  • Support for distros other than Arch Linux for UKI generation

    Currently it only works on other distros if you use uki-efi-boot with a default loader. Otherwise it requires mkinitcpio to generate the images. This is not an option if your UEFI implementation doesn't support appending cmdline parameters to your boot entry (or if you set rootflags=subvol=... in the default loader).

  • Support for non-systemd distros

    Needs a separate daemon, service scripts and an alternative to systemd-ukify. This script doesn't currently need ukify since it relies on mkinitcpio.

Packaging

  • Required
    • bash
    • btrfs (btrfs-progs)
    • lsblk (util-linux)
    • snapper
  • Optional (At least one is required)
    • mkinitcpio: To generate UKIs
    • uki-efi-boot: To add entries to the UEFI boot menu
mkdir ./pkg
make \
 INSTALL_ROOT="$(pwd)/pkg" \
 BINARY_PATH=/usr/bin \
 SERVICE_PATH=/usr/lib/systemd/system \
 install

Usage

Enable it with systemd:

systemctl enable --now uki-snapper.path

—or run it directly:

$ generate-snapper-uki --help
Utility to automatically generate UKIs for snapper snapshots.
Usage:
 generate-snapper-uki [options]
Options:
 -n, --snapshot <number> Snapshot to generate (Generates all if not specified).
 Specify multiple times to generate multiple snapshots
 -c, --config <file> Path to config file (Current: /etc/uki-snapper.conf)
 -d, --dry-run Show the changes that will be made without actually making those changes
 -v, --verbose Print additional messages
 -h, --help Show this message and exit
 -V, --version Show the utility's version and exit