Reinstall / Recover GRUB from Ubuntu live CD / USB

This is the common problem which is faced, when you try for dual boot. Easily Recover / Re-Install Grub in Ubuntu using Boot-Repair from live cd / usb. Boot Repair is the simple graphical tool used to repair, restore or reinstall the grub bootloader on Ubuntu. Now this tools has been updated with some new features in advanced option, using boot- repair you can also restore the MBR on Windows.

On dual boot once you update your Ubuntu OS, Windows / Fedora will not be listed on your grub. After installing Windows / Fedora your Ubuntu will not boot anymore and its grub may be wiped out. To restore it follow the steps below

To Reinstall Grub

You need to have Ubuntu Live CD or Live USB. Normal session can be used to repair the grub. Boot using your Ubuntu Live CD or Live USB, while booting choose Try Ubuntu.

Once booted then open a terminal, and run the following command one by one to install the boot repair.

To add boot-repair to the repository

sudo add-apt-repository ppa:yannubuntu/boot-repair

To Update your repository

sudo apt-get update

To install boot-repair

sudo apt-get install -y boot-repair

Once Installation complete run boot-repair on terminal by typing the following command or select it by System->Aministration->Boot Repair.


NOTE: Update the Boot Repair if its newer version is available.

It will scan the System for few seconds and will show you the options Recommended repair and Create a BootInfo summary. By clicking the Recommended Repair it will start repair the grub. Check the screen shots below.

Once done click ok and restart your system, your grub should work now. If not run the boot-repair again using live cd / usb. Then follow the steps below.

Select the Advanced options, In Main options tab check whether the following options are selected or not. If not select it, the options are Reinstall Grub and unhide boot menu for 10 seconds. Check the screen shot below

Then select the GRUB locations tab and check the following options are selected or not. The options are OS to boot by default and place grub into, In “OS to boot by default” option choose the OS which you want to be default on boot. Then select the drive where you need to reinstall the grub in “place grub into” option and click apply. Check the screen shots below

Click ok and restart your System. To restore MBR Click Here.

Hope this will be helpful for you!!!

  • Pingback: [HowTo] Restore MBR using Boot Repair | How Opensource()

  • Pingback: How to Restore / Recover GRUB in Ubuntu 11.04, 10.10 and 10.04 | How Opensource()

  • Very useful information for Linux users.

  • saurav

    can this be utilised for linux mint 10.10

  • Roger

    Very Useful. Thank You!

    • Hi Roger,

      Thanks and Welcome to HowOpenSource :)

  • THANKS for this article !

    One advice: don’t change the options if you don’t know what you are doing. If the “Recommended repair” is not enough, better click the “Create BootInfo Summary” button and ask help by email.

    • Hi Yann,

      Thanks and Welcome to HowOpenSource!! :)

  • Donnie

    I am getting an error message urllib2.URLError: when I type in sudo add-apt-repository ppa:yannubuntu/boot-repair what do I do? I was trying to install LinuxMint 12 on this computer along with 2 Win 7 and Ubuntu 11.10 when I removed program thinking it was linux mint. I have some important documents in the Ubuntu which is still on my screen at load up, but gives an error message and takes me back to Windows. Any help would be great. Thanks in advance

    • Hi Donnie,

      I tested in Ubuntu 11.10 and its working. Try again and Let me know if any error occur during Installation.

  • Thank you so much for posting this. It was a big help, and the quick-fix saved me from having to do a reinstallation of Lubuntu 11.10

  • Pingback: Reinstall / Recover GRUB from Ubuntu live CD / USB | HowOpenSource()

  • Nityanandi

    Manivannan, you’re wonderful. You do beautiful work.

  • Mike

    This is the ONLY solution that actually worked for me!
    Thanks a lot!!!

    Lenovo IdeaPad Z570
    Installing “ubuntu 12.04 LTS”.

  • Pingback: Grub issues()

  • Nityanandi

    Mannivanam, you are so clear-minded and generous. Will use this when i upgrade my second Ubuntu 11.10 to Ubuntu 12.04. I use both so nothing will suddenly cripple computer, and a Fedora 16 partition too, to keep in touch with profoundly respected KDE.

    Grateful to you.

  • Hector

    Thanks, man! You are awesome! You saved my night! Worked flawlessly!

  • Pingback: Ubuntu – Programm zum wiederherstellen von Grub2 mittels Live-CD | Linux Survival Blog()

  • saravana

    Hi Manivannan
    Was struggling to restore a corrupted system and tried a lot of out dated procedures to make the situation only from bad worse!
    Your was really useful and it did the trick for me!
    Thanks a lot!
    I have one additional input which might be useful for others…
    I had a corrupted windows vista laptop and tried to recover data from it using ubuntu. afterwards, the grub was corrupted and couldn’t even launch ubuntu… after following this procedure, i was able to access ubuntu. I then tried to restore MBR using this “boot-repair” tool but it replied that the “mbr” module could not be found and needs to be installed. I then used a windows 7 boot CD to enter into repair mode, ran the FixMbr command from DOS-prompt and i was successfully able to restore Vista from the recovery partition!
    May be if you add the procedure about how to install the “mbr” module in ubuntu, it might help others who may not have a windows boot CD

    Thanks a lot!

    • Hi Saravana,

      Thanks for the info, I will write a procedure for it soon.

  • Miguel


  • tharchaw

    thank you very we can do . ctrl+alt+t/ sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

    sudo apt-get install -y boot-repair && boot-repair

  • James

    How can I run this on a 64-bit machine? It gives me a “Please use this software in a 64-bit session” error.

  • Kesavachandran

    My Ubuntu 12.04 was not booting even after 2 attempts of reinstallation of the OS,when I ran into you site.Your guidance was clear,accurate and yielded positive results.Thank You Very Much.

  • Bernardo

    did i tell you that i love you?? 😀 :D!
    man it worked!! 😀 i love you <3! thx very much! =)

  • Very Nice info Yann and This thing really works.

  • Pingback: installing software on fedora 7 - Page 2()

  • Sir Gallahad

    Thanks man – worked perfectly on my SAMSUNG HN-M500M

  • Marek

    Hi Yann, you are really great!
    I have spent houres to figure out the logic of GRUB but there is appearently non. GRUB is very vulnerable and unable to fix even small deviations from what it expect. I’ve never seen so stupid programm before.
    Your solution to forcely reinstall GRUB is the best and the only possible way to repair GRUB’s failure. Good job! Thank’s a lot.

  • aar

    remove -y option if needed in the command “sudo apt-get install -y boot-repair”

  • Thanks!!

    Your article solved all my problems. Thank you so much!


  • thank you,
    I installed 32bit first on my new pc, dual boot win7 and ubuntu 12.04 32bit and grub worked normal,
    then I realized I installed 32bit ubuntu 12.04 but actually wanted 64bit ubuntu 12.04

    so I re-installed ubuntu 12.04 64bit and upon reboot I get…..

    error: invalid arch independent ELF magic
    grub rescue>>

    after installing grub-repair from the live cd all working again

    after reboot a ran
    sudo update-grub

    thanks again!!

  • erik

    Genius! Saved me from sleepless nights and endless forum solution hunting. (lubuntu 12.04)

  • ibnu

    it works like a charms..

    thanks dude..

  • Pingback: Do List After Installing Ubuntu 12.10 Quantal Quetzal()

  • shyam singh

    thanks a lot. It helped me a lot..

  • David

    Brilliant! This was exactly what I was looking for.


  • Tiger

    Thanks man… it’s change my life….

  • Saurav

    I bookmarked this page. Once my graphics driver was corrupt and I was not to recover the grub.

  • ggs

    Dear Manivannan
    I re-installed ubuntu 12.04 LTS and it was successful. Now, I want to reinstall the dual boot option and I followed your instruction and got the following errors
    file”/usr/bin/add-apt/repository”, line 125, in
    ppa_info=get_ppa_info_from_lp(user, ppa_name)
    File”/usr/lib/python2.7/dist-packages/softwareproperties/”, line 80, in get_ppa_info_from_lp
    pycurl.error:(6, “couldnt resolve host ‘'”)
    Please help me, I am really frustrated.
    Thank you

  • ggs

    Dear Manivannan
    Please, Forget the above question. There was internet connection problem. Now the boot-repair was successful. but, still I am not getting the dual option. It just boot immediately to ubuntu, I can not boot in to Window 7. Please have a look in the link below for the boot information

    Please help. Thank you

  • Pingback: how to merge 2 unallocated spaces?()

  • Pingback: boot-repair()

  • Pingback: Reinstall / Recover GRUB from Ubuntu live CD / USB with Encrypted Hard Disk » My Life , My Views()

  • Very Usefull, my ubuntu back to normal, thnks a lot.

  • Pingback: boot-repair « Icy_blue's blog()

  • Daniel Benny Simanjuntak

    Great tutorial! It work..

  • marwan

    very nice and helpful just have an other problem how to repair ubuntu 12.04 64 bit power off not working any one can help thanks

  • is is

    Life saver! I had a Redo Backup of dual Windows/Ubuntu fail. It restored everything, but the computer was then failing to boot, apparently because of corrupt GRUB. This Boot Repair fixed it *automatically*! Thank you!

  • Sven

    Very nice program. Thank you very much

  • Gnoll110

    Thank very much. Put an end to a day and a half of head scratching.

    The board of Micro$oft also thank you. I was getting pretty close to putting a contract out on ’em! 😛

  • Laura

    I followed the steps and was not given an option of “recommended repair”, only “create a boot info summary”. This is the link it gave me

    I know that I have a corrupt MBR, I was hoping this would fix it. But, considering even using the livecd the computer won’t recognize the HDD I’m really not sure what to do at this point.

    I have dual boot Windows 7 and ubuntu and have tried fixing it through DOS to no avail so now trying through terminal. Any help would be greatly appreciated. Please let me know what more info is needed.

  • Dies Laughing

    Seriously? The recommended choices given in Advanced Options seem like they might actually help…. IF they were even available, but those options aren’t even part of the program. Is there a different version or just wishful thinking?

  • RON

    The advanced options part worked for me. Just follow instructions on the screen.

  • Guest34

    Will this work on fedora

  • Pingback: Do List After Installing Ubuntu 14.04 Trusty Tahr()

  • Cristian Miclescu

    This worked for me. Thank you so much.

  • Steve

    Hello, did it works with a full LUKS-Crypted Linux?

  • BinDelta

    I’ve meant a live cd image – not a suggestion on working system!

  • Jaymin Joshi

    Great post helped me our after installing ubuntu alongside windows 8 :)

  • Andrew D. Ford


  • disqus_8QsaRM5yu1

    Much more easy and very FAST, type the command over terminal:
    sudo grub-install /dev/XXX

    XXX is partition, sda, sdb, sdc…

    Can view with command:
    sudo fdisk -l


    I tried your way, but is very slow, because my Netbook Acer AO722 is slow too.

    I lost 35 minutes to install after download from apt-get!

  • disqus_8QsaRM5yu1

    Sorry, another way won’t work and returns error:
    failed to get canonical path of `/cow’,

    This works fine:
    $sudo mount -t ext4 /dev/sda5 /mnt

    $sudo grub-install –root-directory=/mnt /dev/sda

    And returns:

    Installing for i386-pc platform.
    Installation finished. No error reported.

    sda6 is showed with:

    $sudo fdisk -l

    Thank you!

  • hfwilke

    Boot repair worked perfectly. Thanks

  • working nice tool for Linux.Thanks

  • grayeul

    Looks like an old post… but I still found it very useful/helpful. Thanks very much for the work you put in on this!

  • Mina Rezaei

    Dear ubuntu user/expert

    I stoped ubuntu upgrading version from 14.04 to 16.04 in middle.
    now I have problem in boot repairing on USB, I created .iso file on USB with Unetbootin and I can boot my PC with USB but Unfortunatly I can’t boot it on my laptop( ASUS G751 ).
    I am very grateful for any suggestion.


    • sumit

      unetbootin causes problem often. Telling you from my personal experience. I have tried RUFUS. it was perfectly fine. Just one thing using Rufus while formatting the drive, select option FAT32. You can explore other apps as well.

  • sumit

    It solved the problem. but for the first time while rebooting, it was throwing some error, which kept throwing. So i had to force restart it, after that it went fine.

  • vaglag

    Thank you very much. I searched for hours for a solution and finally this worked correctly. You saved my pc and my life 😀 !!!!!