Grub..


Recommended Posts

Hello there folks,

Pretty simple question here...

I had a dual boot Windows XP Pro and Ubuntu 8.04 system. Have a laptop, 1 hard drive with 3 partitions set up as following:

- 45 GB Windows (NTFS)

- 15 GB Ubuntu (EXT3)

- 384MB Linux Swap

I did a clean install of Vista on the NTFS partition. Problem is Vista takes over Grub, so don't get the boot menu when I turn on my laptop. So, how do I get it back so I can boot into Linux and Vista? I assume I'd insert the Ubuntu Live CD, and open up GParted and set the Ubuntu partition as boot?

Thanks!

Link to comment
Share on other sites

Boot the LiveCD.

Open the terminal.

Type "grub".

Type "root (hd0,x)". x is where ubuntu is installed. (sda1 = 0, sda2 = 1 etc.)

Type "setup (hd0)".

Type "quit".

Reboot

Then of course add a Vista entry to /boot/grub/menu.lst

sudo gedit /boot/grub/menu.lst

title		Windows Vista
root		(hd0,x)
savedefault	1
makeactive
chainloader	+1

replace the x in 0,x with the partition number of vista. (sda1 = 0, sda2 = 1 etc.)

:)

Link to comment
Share on other sites

I am posting from the live CD now..

After I type in Grub into terminal, I type "root (hd0,1)" but it says, "Error 21: Selected disk does not exist"

I guess my hd0 isn't mounted??? :confused:

Or if I type in root (hd0, sda1) it says "Error 11: Unrecognized device string"

Alright, I'm attaching the Partition Editor's screenshot...

post-182178-1210957371_thumb.png

Link to comment
Share on other sites

Boot the LiveCD.

Open the terminal.

Type "grub".

Type "root (hd0,4)".

Type "setup (hd0)".

Type "quit".

Reboot

Then of course add a Vista entry to /boot/grub/menu.lst

sudo gedit /boot/grub/menu.lst

title		Windows Vista
root		(hd0,0)
savedefault	1
makeactive
chainloader	+1

:)

edited for you :) (can't find an edit button for my post so had to do it this way :p)

Link to comment
Share on other sites

woot, thanks. :)

wonder why it was hd0,4. Don't quite understand it :wacko:

Link to comment
Share on other sites

It was explained earlier in the thread that GRUB counts starting at 0.

hd0,0 is hda1

Glad you got it going again. :yes:

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.