Skip to content

Instantly share code, notes, and snippets.

@alambike
Created June 3, 2015 03:11
Show Gist options
  • Save alambike/4fdade40fcfad08d89f5 to your computer and use it in GitHub Desktop.
Save alambike/4fdade40fcfad08d89f5 to your computer and use it in GitHub Desktop.
Commands to repair grub2 from a live cd
sudo mount /dev/sdXY /mnt
sudo mount --bind /dev /mnt/dev &&
sudo mount --bind /dev/pts /mnt/dev/pts &&
sudo mount --bind /proc /mnt/proc &&
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
grub-install /dev/sdXY
grub-install --recheck /dev/sdXY
update-grub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment