Making Linux Simple!
Restoring Grub in Ubuntu: How-to
I had to re-install Windows on my partition and in the process it was obvious that I was going to lose my Grub. However, I knew I could very easily get it back. You can lose grub for various reasons and the most common being installing windows, which unfortunately doesn’t respect your settings and erases your grub. However, there’s nothing to panic in that case because restoring grub is no rocket science.
Let’s see how to restore grub on a machine which has Ubuntu:
1. Boot using a Live CD or pen drive of Ubuntu. You’ll be having a live session running.
2. Start a terminal Window by hitting ALT+F2 and typing gnome-terminal.

3. On the terminal window type the following command:
sudo grubYou’ll see the prompt changing in the terminal window.
4. At the grub prompt, type the following:
find /boot/grub/stage1
This should show you info about location

5. As I got (hd0,5) in my case, following is what I am going to enter at the grub prompt:
root (hd0,5)
and hit enter

6. Next we’ll install the grub at the mbr using the following command:
setup (hd0)
You’ll see the confirmation of installation of Grub.

7. Type quit to exit grub prompt. Close the terminal window and restart your computer.
You’ll have your grub restored.
Related posts:
- Install XAMPP-Linux Apache MySQL and PhP {LAMP} on Ubuntu: How-to
- How to get transparent matrix style terminal in Ubuntu (Jaunty jackalope): How-to
- How to open rar files in Ubuntu (Jaunty Jackalope): Install rar!
- Install Wine and run Windows applications on Ubuntu (Jaunty): How-to
- Installing latest Nvidia graphic drivers on Ubuntu (jaunty): How-to
| Print article | This entry was posted by Vivek on July 13, 2009 at 11:55 am, and is filed under How-to, Linux, Ubuntu. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
Comments are closed.




















about 7 months ago
Thanks! These are very clear instructions and they work!