From 6505511f2e6b43a37570fc840f6d2851c7cc170c Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 18 Jan 2026 10:55:18 -0600 Subject: Add grub-zfs-snap for ZFS snapshot boot entries Add ability to boot into ZFS snapshots directly from GRUB menu: - grub-zfs-snap: generates GRUB submenu entries for recent snapshots - 40_zfs_snapshots: GRUB generator script installed to /etc/grub.d/ - zz-grub-zfs-snap.hook: pacman hook for automatic GRUB regeneration The GRUB menu automatically updates after kernel/ZFS package changes. Up to 10 most recent snapshots appear in a "ZFS Snapshots" submenu. --- custom/zz-grub-zfs-snap.hook | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 custom/zz-grub-zfs-snap.hook (limited to 'custom/zz-grub-zfs-snap.hook') diff --git a/custom/zz-grub-zfs-snap.hook b/custom/zz-grub-zfs-snap.hook new file mode 100644 index 0000000..8153b84 --- /dev/null +++ b/custom/zz-grub-zfs-snap.hook @@ -0,0 +1,22 @@ +[Trigger] +Type = Package +Operation = Upgrade +Operation = Install +Operation = Remove +Target = linux-lts +Target = linux-lts-headers +Target = zfs-dkms +Target = zfs-utils +Target = grub + +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/lib/modules/*/vmlinuz + +[Action] +Description = Updating GRUB with ZFS snapshots... +When = PostTransaction +Exec = /usr/local/bin/grub-zfs-snap -- cgit v1.2.3