This commit adds the requirement for a new kernel command line file at `/etc/snap-pac-uki/kernel-cmd-current`. When generating current ukis, this file will be used for the non-fallback variant instead of the generic `kernel-cmd`. The reason for this change is hibernating. When saving the system state to RAM, users might not want snapshot varints to resume from there. Previosly, this would not have been a possible configuration.
|12 months ago|
|pacman||1 year ago|
|src||12 months ago|
|systemd||2 years ago|
|LICENSE||2 years ago|
|README.md||12 months ago|
|install.fish||1 year ago|
|uninstall.fish||1 year ago|
Need help? Talk to me at #snap-pac-uki:tfld.dev.
What is this?
This is a collection of scripts, pacman hooks and and systemd units for creating
and managing unified kernel images (UKIs) based on snapper. It originally
expected to be executed as a pacman hook after
snap-pac, but this is no longer
required (though the name remains).
This tool expects that you already set up snapper. It also expects that each
snapshots linux and initramfs files (
/boot/initramfs-linux.img) as well as a kernel command line file
/etc/snap-pac-uki/kernel-cmd) are available within each snapshot.
The fallback initramfs (
/boot/initramfs-linux-fallback.img) and fallback
command line file (
/etc/snap-pac-uki/kernel-cmd-fallback) are only required
on the current system.
Also the current command line file (
needs is only required on the current system.
EFI boot options are only created for each snapshot. If you want the UKIs created for the current system, you'll need to add boot entries yourself:
# template efibootmgr -c \ -d <EFI DEVICE> \ -p <EFI PARTITION NUMBER> \ -l <EFI PATH> \ -L <LABEL> # example efibootmgr -c \ -d /dev/nvme0n1 \ -p 1 \ -l "\EFI\Linux\arch-linux.efi" \ -L "Arch Linux" # example for fallback efibootmgr -c \ -d /dev/nvme0n1 \ -p 1 \ -l "\EFI\Linux\arch-linux-fallback.efi" \ -L "Arch Linux (Fallback)"
Using the install script
You can install the dependencies of this program with the following command:
pacman -S fish efibootmgr jq ripgrep sbsigntools sed snapper
Download the latest release from here and unpack it.
Then run the install script (you need to be in the same directory):
Creating snapshot UKIs
This creates a new UKI for all snapshots where none is found:
Create current UKIs
This creates a new UKI for the current system (including a fallback variant):
Clean up UKIs
This removes all UKIs without corresponding snapshot (solely based on number):
Enable periodic cleanups using systemd timer
systemctl enable --now snap-pac-uki-cleanup.timer
Simply run the following command in this directory: