diff options
| author | Craig Jennings <c@cjennings.net> | 2026-01-18 10:55:18 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-01-18 10:55:18 -0600 |
| commit | 6505511f2e6b43a37570fc840f6d2851c7cc170c (patch) | |
| tree | 31affaecded1bdd6bbe8234ebe26c03a99074225 /custom/install-archzfs | |
| parent | 5982a78ae7328fd3126c6346872de8ace242e9b9 (diff) | |
| download | archangel-6505511f2e6b43a37570fc840f6d2851c7cc170c.tar.gz archangel-6505511f2e6b43a37570fc840f6d2851c7cc170c.zip | |
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.
Diffstat (limited to 'custom/install-archzfs')
| -rwxr-xr-x | custom/install-archzfs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/custom/install-archzfs b/custom/install-archzfs index dfba090..660cf34 100755 --- a/custom/install-archzfs +++ b/custom/install-archzfs @@ -1031,6 +1031,26 @@ EOF fi } +configure_grub_zfs_snap() { + step "Configuring ZFS Snapshot Boot Entries" + + # Install grub-zfs-snap script + info "Installing grub-zfs-snap..." + cp /usr/local/bin/grub-zfs-snap /mnt/usr/local/bin/grub-zfs-snap + chmod +x /mnt/usr/local/bin/grub-zfs-snap + + # Install GRUB generator + cp /usr/local/share/grub-zfs-snap/40_zfs_snapshots /mnt/etc/grub.d/40_zfs_snapshots + chmod +x /mnt/etc/grub.d/40_zfs_snapshots + + # Install pacman hook for auto-regeneration + mkdir -p /mnt/etc/pacman.d/hooks + cp /usr/local/share/grub-zfs-snap/zz-grub-zfs-snap.hook /mnt/etc/pacman.d/hooks/ + + info "ZFS snapshots will appear in GRUB boot menu." + info "Run 'grub-zfs-snap' to manually regenerate after creating snapshots." +} + configure_zfs_services() { step "Configuring ZFS Services" @@ -1276,6 +1296,7 @@ main() { configure_ssh configure_initramfs configure_bootloader + configure_grub_zfs_snap configure_zfs_services configure_pacman_hook copy_archsetup |
