Skip to content

Instantly share code, notes, and snippets.

@ottosch
Created February 25, 2025 02:02
Show Gist options
  • Save ottosch/62f13909415494228c2a9000cc54a66c to your computer and use it in GitHub Desktop.
Save ottosch/62f13909415494228c2a9000cc54a66c to your computer and use it in GitHub Desktop.
How to restore GRUB using Arch Linux ISO

How to restore GRUB using Arch Linux ISO

Partitions

  • /dev/sda1: ESP (EFI System Partition)
  • /dev/sda2: system + home
  • /dev/sda3: swap

Script

Boot from Arch liveCD, then:

mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot
arch-chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
exit
mount -R /mnt
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment