PDA

View Full Version : Some GRUB help please!


Dr. Z
21-12-2006, 21:29
Anyone out there dual-booting XP and Ubuntu that uses GRUB - help!

I have Ubuntu on hda and XP on hdb. On install, the XP install wasnt detected, so I am trying to add it to GRUB.

So far, I have got this in my menu.lst file:

title Microsoft Windows XP
rootnoverify (hd1,0)
savedefault
makeactive
chainloader +1

Im fairly sure that should work but it tells me the device cannot be found... (I have tried hd1,1 too)

This normally wouldnt be a problem but its ABSOLUTELY critical I get into that windows partition.

What can I do?

I cant seem to be able to mount the drive either, so im not sure what is going on really.

Is there a way of restoring the proper windows boot loader for the time being, without damaging anything (and reinstall GRUB afterwards?).

The blind panic is preventing me from thinking straight here...

Daz
21-12-2006, 21:37
You sure the 'doze bootloader isn't actually installed on hdb? And setting the boot device to that other hard drive, for now, doesn't get you into Windows? Just to end the panic of course ;)

Worst case scenario just run fixmbr from the Windows recovery console, so dont worry for now. The hard drive references (hdx,x) are usually not what you think they are, at least in my experience. I can never make my mind up if hd0 is the first device on the bus, or where the bootloader is - I think it changes it's mind every time I do a *nix install :/

Just have to mess around and see what fits (you can edit grubs config from the boot screen (press e I think) and try to find what works). You wont break anything.

In the mean time I'll go and fetch the grub config of a machine which has it's Windows install on a totally separate partition, see what it's set to.

Mark
21-12-2006, 21:38
hd0 is the first device Grub finds in whatever device hardware order it uses.

You might have to juggle the disk devices around to get 'doze to boot from GRUB. Look up the 'map' command.

Mark
21-12-2006, 21:42
Found the syntax:

map (hd0) (hd1)
map (hd1) (hd0)

I'm not sure whether you need to boot from hd0 or hd1 after that.

Daz
21-12-2006, 21:48
Scenario: hda has my windows install, hdb my gentoo. I have the windows bootloader on hda and grub on hdb, and control which I boot into from the bios boot time menu, not the loader(s). There is an entry in grub (on hdb) for my Windows install:

root hd(1,0)
savedefault
chainloader +1
hd(1,x), which is actually hda (which you would expect to be hd(0,x)).

Dr. Z
21-12-2006, 21:56
Alright, a progress update:

I cannot swap the boot order around in BIOS because the bios is CRAP (its a Dell Precision box). At this stage, I am extremely reluctant to start getting inside this box because of where it is etc etc - its a monumental hassle.

So I used the map stuff and it seemed to do the trick because I now get the message "NTLDR is missing" - which is a massive jump in the right direction, but it still leaves me buggered.

Given that I have an XP CD, is it possible to sort this mess out without having to resort to the unbelievable hassle of digging this PC out of its hole?

Daz
21-12-2006, 22:07
Recovery console - fixmbr, if that's the problem :)

Mark
21-12-2006, 22:09
What he said.