grub-install.hook
/etc/pacman.d/hooks/grub-install.hook
[Trigger]
Type = Path
Operation = Install
Operation = Upgrade
Target = usr/share/grub/*
[Action]
Description = New GRUB features provided ...
When = PostTransaction
# Exec = /etc/pacman.d/scripts/update-efi
# Exec = /etc/pacman.d/scripts/update-mbr
/etc/pacman.d/scripts/update-mbr
#!/bin/bash
grub-install --target=i386-pc /dev/sda &&
grub-mkconfig -o /boot/grub/grub.cfg
/etc/pacman.d/scripts/update-efi
#!/bin/bash
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub &&
grub-mkconfig -o /boot/grub/grub.cfg