Last active
October 5, 2023 09:34
-
-
Save whinee/c04364541c7fe89b1c36830e42eefb48 to your computer and use it in GitHub Desktop.
lyra-rescue-grub.sh
This file contains hidden or 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
# Mount partitions | |
sudo mount /dev/nvme0n1p5 /mnt | |
sudo mount /dev/nvme0n1p1 /mnt/boot/efi | |
# Mount virtual filesystems | |
sudo mount -o bind /dev /mnt/dev | |
sudo mount -o bind /proc /mnt/proc | |
sudo mount -o bind /sys /mnt/sys | |
sudo mount -o bind /run /mnt/run | |
sudo mount -o bind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars | |
# chroot into system | |
sudo chroot /mnt/ /bin/bash -c "sudo dnf reinstall shim-* grub2-efi-* grub2-common -y;sudo grub2-mkconfig -o /boot/grub2/grub.cfg;sudo sync" | |
sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment