Posted by: Odzangba | May 14, 2011

How To Restore GRUB On Ubuntu 11.04

Since version 9.10, Ubuntu uses the GRUB2 boot loader and manager on clean installs. This means my earlier post on how to restore GRUB will not work properly. To restore the boot loader on these versions of Ubuntu (and possibly any debian-based linux distribution that uses GRUB2), you need an Ubuntu 11.04 live disk. The 10.10 live disks will work too… any ubuntu live disk that uses GRUB2 will work. Fire up a terminal once the live disk finishes loading and enter the following commands:

I) Let’s find where Ubuntu is installed on your hard disk:

sudo fdisk -l

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2611 20972826 83 Linux
/dev/sda2 2612 60279 463218210 83 Linux
/dev/sda3 60280 60801 4192965 82 Linux swap / Solaris

My ubuntu partition is /dev/sda1 (it has the asterisk under Boot).

II) Armed with this information, mount the Ubuntu partition:

sudo mount /dev/sda1 /mnt

III) Install the GRUB2 boot loader:

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

That’s /dev/sda — the hard disk itself, not the ubuntu partition – /dev/sda1.

IV) Unmount the Ubuntu partition and restart the computer like so:

sudo umount /dev/sda1 ; sudo reboot

V) If you have more than one OS installed, re-detect OSes like so:

sudo update-grub

That’s it.


  1. I ended up just booting into Live CD then clicking install, then clcking upgrade 11.04 to 11.04. I think that should do the trick. Would be nice if they threw in a button or application on the live cd for fixing a broken installation.

  2. Thanks! After moving around some partitions I was unable to boot(I expected it and knew there was a fix out there). I was getting stuck on sudo grub-install –root-directory=/mnt /dev/sda. I thought /dev/sda had to be followed by a number. Thanks for setting me straight!

  3. […] It took me days of head scratching until I finally found Odzangba work-around: […]

  4. lost all boot after 11.04 install over 10.10. I only had the grub rescue command. I was working on it, then out of desperation, I installed puppy 5.25 inside the ubuntu partition of my hard drive. Everything came alive except xp. Kind of nice having 11.04 clssic and puppy both available. I can edit the menu.lst with puppy on sda, but I still have not been able to boot into windows (not a big loss). what I have for windows is:

    title Microsoft Windows XP Professional (sda1:PBS)
    uuid 1E4CD3E14CD3B1AF
    chainloader +1
    Any help? Please

  5. it dint restart

  6. thanks a lot men …you figure it out ..thanks ……

  7. my way is using the super grub2 disk instead of reinstall ubuntu-my liveCD and liveUSB doesn’t work!

  8. I have 11.04 and Windows 7 as a dual-boot on a single partitioned hard drive. I followed your instructions and after the reboot, I now get this on my screen:
    “Error: file not found.”
    On the next line, I get the command prompt:
    “Grub rescue>”
    I’m not sure how to correct this. Any help?

  9. my working system now displays this when I start up:



    • Yeah me too, it’s frustrating. I thought grub was supposed to do the boot loading.


      Maybe grub wants me to do the boot loading?

  10. This process is same as I did on mine. But im using 10.04 and dual booting windows 7.

    If you want to see how I dual boot and recover grub2 after installing windows 7. Try reading

    Hope this helps and thanks author. This article did thought me something.

  11. thanks man, you refreshed my memory on installing grub, I’ve been looking for ways to recover my bootloader and none had worked but when I saw your tip it worked like charm.


  12. Thanks alot worked like a charm…

  13. […] 1. How To Restore GRUB On Ubuntu 11.04 […]

  14. Worked like a charm,thanks!

  15. Thank you thank you thank you! None of the other documentation on Ubuntu work. But the instructions here, do! Thank you so much!

  16. Hi,
    The following sentence is misleading for someone, who has windows on the first partition: (it has the asterisk under Boot).
    It’s the linux partition containing grub configuration.

  17. thanks . worked nicely.

  18. You actually make it seem really easy with your presentation however
    I in finding this topic to be really one thing
    which I believe I might by no means understand. It seems too complex and extremely huge for
    me. I’m having a look forward for your next submit, I will attempt to get the hold of it!

  19. These are truly impressive ideas in regarding blogging.
    You have touched some good factors here. Any way
    keep up wrinting.

  20. Do you mind if I quote a few of your articles as long
    as I provide credit and sources back to your blog? My blog is in the
    very same area of interest as yours and my visitors would
    definitely benefit from a lot of the information you present here.

    Please let me know if this okay with you. Thank you!

  21. […] […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: