Installing /Recover Grub2 from live CD/USB stick

"Installing /Recover Grub2 from live CD/USB stick"

I will try to keep it simple so step wise step instructions to follow are -


  • Boot Live Media , to system in live mode.
  • Open terminal (console)
  • sudo -i  (command for root permission).
  • sudo fdisk -l (Check volume no. in partition manager as /dev/sdaX , if you don't know how to get it find  your Linux partition ext3,ext4 etc on list and get the name of partition)
  • sudo mount/dev/sdaX /mnt (command to mount your Linux partition in mnt directory   , X is the volume no. that you found from sudo fdisk -l) 
  • sudo mount/dev/sdaX  /mnt/boot
  • sudo mount --bind/dev  /mnt/dev/ (The bind mount call attaches only (part of) a single file-system, not  possible  sub-mounts.  The  entire  file  hierarchy including submounts is attached a second place using)
  • sudo chroot/mnt   (to change mnt directory to root permission)
  • grub-install /dev/sdaX (command to install grub . X is Linux partition where grub is to be installed) 
  • sudo unmount /mnt/dev
  • sudo unmount /mnt  you grub is recovered .reboot your machine. 
"say i got it baby"

Recover Grub2 after installing Windows

Recover Grub2 after installing Windows 

This is another way to recover Grub2 i already wrote a post on recovering grub(Link) so,use the way you like more easier.
So you were enjoying life using Ubuntu and then one day you had to install Windows for that one application your boss makes you use and now no more Ubuntu. When we need a dual boot system it’s always best to install Windows first then Ubuntu due to Windows stripping out the boot loader but what if you have no choice? or a crash that corrupted the boot loader. Boot-repair  to the rescue. 

So what is Boot-Repair?
Its a small graphical tool used to restore access to Ubuntu and other OS’s such as Windows when disaster strikes, it has two basic options.(See Figure)  and follow steps below-
Boot-repair

  •  run Ubuntu  media in live mode.
  •  connect Ubuntu to Internet source
  • open up a terminal and type the following- sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
  • sudo apt-get install -y boot-repair && boot-repair
  • click "Recommended repair" and apply.  make sure you leave the "Reinstall GRUB" check-box ticked. Now reboot your system. now you can see GRUB back.