Skip to content

Instantly share code, notes, and snippets.

@inscapist
Last active August 26, 2022 07:19
Show Gist options
  • Save inscapist/060b8df7dc1e2778d883ed123c854740 to your computer and use it in GitHub Desktop.
Save inscapist/060b8df7dc1e2778d883ed123c854740 to your computer and use it in GitHub Desktop.
Reinstall broken bootloader (arch) - Grub2 UEFI
# in livedisk terminal:
# refer gparted for diskids (look for root and boot/esp)
# mount root
sudo mount /dev/nvme1n1p2 /mnt
# mount boot/esp
# refer `cat /mnt/etc/fstab` to ensure correct efi path
sudo mount /dev/nvme1n1p1 /mnt/boot/efi
# chroot
arch-chroot /mnt
pacman -S grub efibootmgr os-prober
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=<ANY_NAME_HERE>
grub-mkconfig -o /boot/grub/grub.cfg
@inscapist
Copy link
Author

Sometimes boot record got accidentally deleted in BIOS..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment