Restoring Grub.

Just a few minutes ago, I got a HFS+ Partition Error while trying to boot into my OS X. So, I decided to mess with it a little bit. Actually, I reinstalled OS X and messed around some more (the whole process took 3 hours). Somehow, my Grub was gone after the reinstallation. There went my beloved boot manager, who had saved me so many times. I went right to the first stage of grief, denial. I put my Ubuntu live CD in, loaded Firefox on and search for the solution. Folks at Ubuntuforum.org had found the solution years ago. So I just summed everything up, it’s all their credits. (If you are not a member of Ubuntuforum.org join now! it’s awesome.)

Restoring Grub with a Ubuntu Live CD.

You are going to need the Ubuntu Live CD.

  1. Insert the Live CD and boot into Graphic Mode.
  2. Open Terminal: Applications -> Accessories -> Terminal
  3. Enter the Grub Shell.

    sudo grub

  4. Look for your grub files location.

    find /boot/grub/stage1

  5. The returned value from the command above is used for the command below. Scan the partition.

    root (hd?,?)

  6. Substitute the returned value into (hd?,?) above. For instance, if my returned value is (hd0,2), I will enter:

    root (hd0,2)

  7. Now, we reinstall Grub.

    setup (hd0)

  8. Quit Grub.

    quit

  9. Close Terminal and Restart. Grub will starts back again.

I took a snap shot of this whole process. Take a look.

Advertisements

One Response

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

%d bloggers like this: