Skip to content

Instantly share code, notes, and snippets.

@slykar
Last active December 9, 2018 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slykar/ec1cf9ef6afd1b77a5d909c1637264ab to your computer and use it in GitHub Desktop.
Save slykar/ec1cf9ef6afd1b77a5d909c1637264ab to your computer and use it in GitHub Desktop.
Fix GRUB

👉Boot linux from USB stick in live mode.


In case your computer has UEFI BIOS execute these commands:

sudo mount /dev/sdXXX /mnt
sudo mount /dev/sdXX /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sdX
update-grub  
exit

Note : sdX = disk | sdXX = EFI partition | sdXXX = system partition

Credits: https://askubuntu.com/questions/880662/motherboard-replaced-how-can-i-recover-grub

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