Skip to content

Instantly share code, notes, and snippets.

@whinee
Last active October 5, 2023 09:34
Show Gist options
  • Save whinee/c04364541c7fe89b1c36830e42eefb48 to your computer and use it in GitHub Desktop.
Save whinee/c04364541c7fe89b1c36830e42eefb48 to your computer and use it in GitHub Desktop.
lyra-rescue-grub.sh
# 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