Re-install Grub to hard drive on Ubuntu

Open source & Linux
This will restore grub if you had it before and was hosed by a windows install. Windows overwrites the MBR so grub doesnt appear anymore, hence, you cannot boot ubuntu any longer.

1. boot an ubuntu or any other live cd

2. open a terminal and type sudo grub

3. enter your root password

4. next type find /boot/grub/stage1

5. it should return something like (hdx,x) with the x being numbers representing your drive,partition.

6. type this in terminal with the x's being output from #4

root (hdx,x)

7. now type setup(hd0)

8. type quit

9. if you got any errors like failed, but not fatal, reboot and try again from #1, worked for me.

**now to find your windows partition, and give it an entry in grub do the following

1. in a terminal type df -h

2. look for windows partition in the output

3. hard drive partitions start from zero so if it said 2 its partition 1, just subtract 1 from whatever it says in output.

4. in terminal type gedit /boot/grub/menu.lst

5. go to the end of the file and look for the last entry showing ubuntu kernels, and add the following after last unbuntu kernel.

6. title windows xp
root (hd0,x)
makeactive
chainloader +1

now remember, the x is the partition windows is on. if it said 2 in output from df -h then put 1 here. if it said 3 then put 2, and so on.

7. save menu.lst, and reboot. when grub starts it should give you a list of os to start, you might have to hit , if it shows too fast, then go back to menu.lst and look for timeout, and change this to a higher number. good luck.

e-Mail Entry

Comments

Display comments as (Linear | Threaded)

    No comments


Add Comment


Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

 
 

Debian GNU/Linux

mythtv

courtesy of x1337insan1ty

Enter your URL and get there using JonDos / JAP. (You may have to accept the Server-Certificate. See why!)



(powered by smil3y)


Search Engine Optimization and SEO Tools


';