Created
March 5, 2021 08:24
-
-
Save ppartarr/0b4de0649e3d625d324a063248812f68 to your computer and use it in GitHub Desktop.
Reinstall grub after Windows updates (Arch & Windows dual boot)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# mount the boot partition | |
mount /dev/nvme0n1p9 /mnt | |
mount /dev/nvme0n1p7 /mnt/boot | |
# change root to /mnt partition | |
arch-chroot /mnt | |
# reinstall grub | |
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub | |
grub-mkconfig -o /boot/grub/grub.cfg | |
os-prober | |
# exit partition, unmount and reboot | |
exit | |
umount -R /mnt | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment