Thursday, March 6, 2014

grub2 installation

http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd#.UxgyAoWukRs

steps:
sudo mount /dev/sdXY /mnt
Now bind the directories that grub needs access to to detect other operating systems, like so:
Now we jump into that using chroot.

Now install, check, and update grub.
This time you only need to add the drive letter (usually a) to replace X, for example: grub-install /dev/sda, grub-install –recheck /dev/sda.
grub-install /dev/sdXgrub-install --recheck /dev/sdX
update-grub 

Now grub is back, all that is left is to exit the chrooted system and unmount everything.
exit && sudo umount /mnt/dev && sudo umount /mnt/dev/pts && sudo umount /mnt/proc && sudo umount /mnt/sys && sudo umount /mnt

No comments:

Post a Comment