kthxbai2u.com
Reviews, Tutorials, Links, Downloads

Tutorial: Re-Installing Grub Boot Loader

January 7th, 2010 by kthxbai2u

I have ran into the problem many times of Windows (or me) wiping out the Grub boot loader. After some searching, I found how to re-install Grub and get it working again, so you don’t have to go through another linux install just to fix it. Of course, this is providing your partitions still exist!

Follow each step with caution, super user priveleges required:

  1. Boot off of a live CD
  2. Open partition editor (press ALT + F2, type in “sudo gparted”), and find the partition (Ex. hda1) that is usually mounted as “/” (root).
  3. Press CTRL + F1 to get to a shell, log in
  4. Assuming you are smart and logged in as a regular user, type in “sudo grub” and enter your super user password.
  5. If your root partition is hda1, Inside of the Grub prompt, type the following lines: root(hd0,0)
    setup(hd0)
    quit

If your partition is on a different hard drive (Ex. hdb1) then you would change root(hd0,0) to root(hd1,0) and setup(hd0) becomes setup(hd1). If your root resides on the same physical drive, but it is not hda1, (Ex. hda5) then you would change root(hd0,0) to root(hd0,4). Note the use of 0 base counting.

After typing Quit, reboot your computer by typing sudo reboot, and your Grub boot loader should work! If not, post back here for help, or just run through another install :P

affiliate_link

VN:F [1.8.4_1055]
Rating: 3.8/5 (5 votes cast)
VN:F [1.8.4_1055]
Rating: +1 (from 3 votes)
Tutorial: Re-Installing Grub Boot Loader3.855

Posted in Tutorials

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.