{"id":18889496,"url":"https://github.com/eoli3n/zectl-pacman-hook","last_synced_at":"2025-07-08T04:04:39.798Z","repository":{"id":113441036,"uuid":"263004378","full_name":"eoli3n/zectl-pacman-hook","owner":"eoli3n","description":"Automate boot environment creation and rotation before kernel upgrade.","archived":false,"fork":false,"pushed_at":"2020-08-15T09:54:57.000Z","size":12,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T23:30:55.167Z","etag":null,"topics":["archlinux","boot-environment","hook","pacman","prune","snapshot","systemd-boot","zfs","zfs-autosnapshot-rotation","zfsonlinux"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eoli3n.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-11T09:58:52.000Z","updated_at":"2025-03-05T19:30:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"b0a14ce7-b976-44c4-a8db-e6750ed92ec8","html_url":"https://github.com/eoli3n/zectl-pacman-hook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eoli3n/zectl-pacman-hook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoli3n%2Fzectl-pacman-hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoli3n%2Fzectl-pacman-hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoli3n%2Fzectl-pacman-hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoli3n%2Fzectl-pacman-hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eoli3n","download_url":"https://codeload.github.com/eoli3n/zectl-pacman-hook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoli3n%2Fzectl-pacman-hook/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264192241,"owners_count":23570740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archlinux","boot-environment","hook","pacman","prune","snapshot","systemd-boot","zfs","zfs-autosnapshot-rotation","zfsonlinux"],"created_at":"2024-11-08T07:49:11.998Z","updated_at":"2025-07-08T04:04:39.781Z","avatar_url":"https://github.com/eoli3n.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"### zectl-pacman-hook\n\nIt will create a boot environment prefixed with ``pacmanhook`` with ``zectl`` before each kernel upgrade. By default, it keeps only 1 boot environment, each kernel upgrade will overwrite previous boot environment.\n\n```bash\n$ sudo pacman -Syu\n:: Synchronizing package databases...\n core is up to date\n extra is up to date\n community is up to date\n archzfs is up to date\n multilib is up to date\n:: Starting full system upgrade...\nresolving dependencies...\nlooking for conflicting packages...\n\nPackages (1) linux-lts-5.4.39-1\n\nTotal Installed Size:  73.34 MiB\nNet Upgrade Size:      -0.01 MiB\n\n:: Proceed with installation? [Y/n] Y\n(1/1) checking keys in keyring                     [------------------------] 100%\n(1/1) checking package integrity                   [------------------------] 100%\n(1/1) loading package files                        [------------------------] 100%\n(1/1) checking for file conflicts                  [------------------------] 100%\n(1/1) checking available disk space                [------------------------] 100%\n:: Running pre-transaction hooks...\n(1/3) Create a boot environment\n• Destroyed pacmanhook-20200512T154713\n• Created pacmanhook-20200512T154826\n(2/3) Removing linux initcpios...\n(3/3) Remove DKMS modules\n:: Processing package changes...\n(1/1) upgrading linux-lts                          [------------------------] 100%\n:: Running post-transaction hooks...\n...\n```\n\n### Installation\n\nInstall aur package [zectl-pacman-hook](https://aur.archlinux.org/packages/zectl-pacman-hook/).\n\n### Configuration\n\nTo keep more than 1 boot environment, use:\n```\nzectl set pacmanhook-prunecount=5\n```\n\nBe aware of your ``/boot`` size limitation.\nTo know ~ max prunecount you could set, try:\n```bash\nboot_size=$(du /boot | awk '{print $1}')\nefi_size=$(df /efi --output=avail | sed '1d')\necho \"$efi_size / $boot_size\" | bc\n```\n\nTo disable the hook, use:\n```\nzectl set pacmanhook=\"no\"\n```\n\n### Manual install\n```\ngit clone https://github.com/eoli3n/zectl-pacman-hook\ncd zectl-pacman-hook\nmakepkg -c\nmakepkg -si\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feoli3n%2Fzectl-pacman-hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feoli3n%2Fzectl-pacman-hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feoli3n%2Fzectl-pacman-hook/lists"}