- Situations
- Deleted /boot partition by mistake or intentionally.
- /boot partition got corrupted
- Failed update
- Commands are for an Arch-linux installation, so you might need to find the equivalent for other distros.
After chroot-ing into the installation through a live iso. (See my other gist)
pacman -S grub
# mkdir /boot/efi [not always required]
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
pacman -S linux linux-lts
mkinitcpio -p linux