Sunday, January 22, 2012

Installing Grub Boot loader in Linux

Grub (GRand Unified Boot Loader) is basically a boot loader which detects the operating systems installed in your computer and then lets you to opt for any of those from a given list.Its commonly distributed with the UNIX(Linux/ Mac) based system.

Reasons why people manually install grub is usually when someone installs windows in a machine where already a Unix based operating system is present, what actually happens is while you install windows, windows thinks/assumes that there is no other  OS in your system and it overwrites your boot loader with its own boot loader which never detects UNIX based OS which causes the system to boot directly into windows without letting the user to choose any other OS.


The situation should be like this that you had a Linux based OS in your system and you installed windows in the same which resulted in disappearance of Linux(In this context I'm talking about Ubuntu) based OS.

Using GUI tool called Boot-repair

This is perhaps the easiest and best way to get out the grub mess, without this tool it will be difficult for a normal user to install grub until and unless he understand the basic of terminal commands.


  • Boot into Ubuntu using a live disk or boot-able usb of Ubuntu (Make sure that its the same version of Ubuntu which you already have in system because grub differs for different versions of Ubuntu)
  • Configure your Internet connection
  • Install Boot-repair using these commands

  • sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
    sudo apt-get install -y boot-repair && boot-repair
  • Now either use the recommended settings or you may try advanced mode but I suggest you to go for the recommended option.It takes a while to complete the re-installation so be patient.

  • In case if you finds that there is any change or mistake in the option that grub is providing you now update grub after booting into your normal Ubuntu by using the following command

    sudo update-grub