Monday, June 3, 2013

INSTALL/RECOVER GRUB FROM LINUX LIVE CD

Recover/Reinstall/Repair grub2 from Linux Live CD/USB after Windows 7/8/vista/xp or grub doesn't work, It is really easy to install grub.
You just have to follow simple steps after that you will see grub2 in your system again.
(source: nobslab.com)

First of all Boot your Linux Live CD/USB then open Terminal  and enter following commands:
This command for root permissions:
  • sudo -i
Check the drives number in Partition Manager :
  • sudo fdisk -l
Now select your Linux installed drive and change the number in following commands (Only change 'x' with your drive number) and change (sda) with your hard drive it can be (sdb, sdc, etc) you can see this in Partition Manager:
  • sudo mount /dev/sdax /mnt
  • sudo mount /dev/sdax /mnt/boot
  • sudo mount --bind /dev /mnt/dev/
This command will change mnt directory to root permissions:
  • sudo chroot /mnt
Now grub install command and Change 'a' in "sda" with your hard drive where you want to install grub, check in Partition Manager:
  • grub-install /dev/sda
Now installation finished, Enter following commands to unmount (If these two command doesn't work, then leave them):
  • sudo umount /mnt/dev
  • sudo umount /mnt
Now reboot your pc:
  • sudo reboot 
Your grub is back. That's it.

No comments:

Post a Comment