Installing GRUB after reinstalling windows

After reinstalling windows, or a messed up Master Boot Record, you might be in a loss, that how can i access my ubuntu?

This will restore grub if you already had grub installed but lost it to a windows install or some other occurence that erased/changed your MBR so that grub no longer appears at start up or it returns an error.

the solution is just here. You need a Ubuntu Live CD

All commands should be entered without the quotes “”
01. Boot from the Live CD and goto terminal
and type
sudo grub

02. Then you will get the “grub>” prompt which is the grub shell.
At grub> prompt, type

find /boot/grub/stage1

03. You will see some output. It should be like (hd0,1) or (hd0,5).
The coimmand sysntax is “root (hdX,Y)”
Suppose you got (hd0,1) at the output or step 02.
then type

root (hd0,1)

04. Enter the command to install grub to the MBR.

setup (hd0)

05. Exit the grub shell with the quit command.

quit

Learn more on Ubuntu Forums at this topic.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s