EnnoxHD / archlinux-install-guide

ArchLinux Installation Guide
MIT License
1 stars 0 forks source link

Grub install hook on package upgrade #65

Closed EnnoxHD closed 2 years ago

EnnoxHD commented 2 years ago

Create a hook like the linux upgrade one but for upgrading Grub on Disk on package upgrade.

EnnoxHD commented 2 years ago

/etc/pacman.d/hooks/grubupgrade.hook

[Trigger]
Operation=Upgrade
Type=Package
Target=grub 
[Action]
Description=Updating GRUB installation and configuration after upgrade...
When=PostTransaction
Depends=grub
Exec=/bin/sh -c "grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB && grub-mkconfig -o /boot/grub/grub.cfg"