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.
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.
By: johnny on May 20, 2011
at 8:26 pm
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!
By: Barefoot Tyler on May 25, 2011
at 10:55 pm
[…] It took me days of head scratching until I finally found Odzangba work-around: […]
By: Reinstall Grub on Ubuntu 11.04 | My Blog on June 10, 2011
at 2:00 pm
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
By: kelly on June 29, 2011
at 1:08 am
it dint restart
By: saahil on July 24, 2011
at 12:04 pm
thanks a lot men …you figure it out ..thanks ……
By: rex on July 24, 2011
at 2:43 pm
my way is using the super grub2 disk instead of reinstall ubuntu-my liveCD and liveUSB doesn’t work!
By: Mar Le on August 14, 2011
at 4:20 am
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?
By: Mike on August 27, 2011
at 9:25 am
my working system now displays this when I start up:
grub>
Thanks??
By: angryman on September 6, 2011
at 11:04 am
Yeah me too, it’s frustrating. I thought grub was supposed to do the boot loading.
grub>
Maybe grub wants me to do the boot loading?
By: Bryan Smith on April 26, 2012
at 5:31 pm
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 http://www.paullabis.com/2011/10/recover-ubuntu-grub2-after-windows.html
Hope this helps and thanks author. This article did thought me something.
By: Paul on October 6, 2011
at 5:31 pm
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.
Thanks!!
By: godlessgeek on November 26, 2011
at 2:14 pm
Thanks alot worked like a charm…
By: Moses. E on December 10, 2011
at 10:07 am
[…] 1. How To Restore GRUB On Ubuntu 11.04 […]
By: Mengembalikan GRUB boot loader di Ubuntu 11.04 | firawandp on December 15, 2011
at 4:24 am
Worked like a charm,thanks!
By: Jorge on March 11, 2012
at 10:01 pm
Thank you thank you thank you! None of the other documentation on Ubuntu work. But the instructions here, do! Thank you so much!
By: growingneeds on May 1, 2012
at 12:30 pm
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.
By: szicsaboj on September 25, 2012
at 11:17 pm
thanks . worked nicely.
By: baba on January 22, 2013
at 7:33 am
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!
By: webpage on August 10, 2013
at 2:38 am
These are truly impressive ideas in regarding blogging.
You have touched some good factors here. Any way
keep up wrinting.
By: www.amazon.com on August 11, 2013
at 12:22 am
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!
By: montréal seo on September 24, 2013
at 6:29 pm
[…] https://odzangba.wordpress.com/2011/05/14/455/ […]
By: [SHARE] masalah busybox error | Walid Umar on October 6, 2015
at 4:20 pm