-   Linux - Newbie (
-   -   Help w/ GRUB, menu.lst, dual boot Windows XP (

ryanryan 04-02-2007 06:48 PM

Help w/ GRUB, menu.lst, dual boot Windows XP
Hi. I'm brand new to all this -- I just completed my first successful linux installation on Friday.

I'm certain that my problem is a common one, but I can't seem to find the answer when I search these forums or Google Linux. If you can point me to the appropriate post or site, I'd greatly appreciate it.

The problem:
- I can no longer boot to Windows XP after having successfully installed Ubuntu.
- GRUB gives me two windows options, but when I select either one the screen simply goes black. No output. No disk activity. Nothing. The computer just hangs, doing nothing.

My set-up:
- I have a Sony VAIO desktop w/ two internal 250 GB drives, with Windows XP (Meida Center Edition)
- Before I installed Ubuntu, I physically swapped the two drives so that I could keep the "C:" drive intact.
- My primary drive (i.e. what used to be my "D:" drive before the swap) contains the linux partition(s) on the first 110 GB, and the remaining 128 GB is still an NTFS formatted partition.
- My secondary/slave drive (i.e. what used to be my "C:" drive before the swap) contains Windows.
- Click here to see what my partitions looked like prior to me swapping the hard drives and installing Ubuntu.

What I've done so far:
- searched online for solutions to this problem
- read through the GRUB manual
- ensured that my menu.lst file was using "map" to virtually swap the drives.
- checked my menu.lst file against several other examples online and played around with several of the variables.
- You can see a copy of my current menu.lst file by clicking here.

I'm not sure what to try next. From what I've been reading, everything should be working just fine. Unfortunately, it isn't. :confused:

If you could help (or point me in the direction of help) I'd greatly appreciate it!

Thanks for your time!



Quakeboy02 04-02-2007 07:03 PM

What about your file? What does it say? Have you run "fdisk -l" (ell not one) to verify that you can actually still access the partitions on the old "C" drive? Can we see that? One common mistake is forgetting to move the drive jumpers or doing it incorrectly.

Larry Webb 04-02-2007 07:22 PM

I'm guessing but I don't think Grub is in the windows mbr.

ryanryan 04-02-2007 08:39 PM

Okay, here's what my fdisk -l produces:

Disk /dev/hda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 7161 13773 53118922+ 83 Linux
/dev/hda2 14058 30401 131283180 7 HPFS/NTFS
/dev/hda3 1 7160 57512668+ 83 Linux
/dev/hda4 13774 14057 2281230 5 Extended
/dev/hda5 13774 14057 2281198+ 82 Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/hdb: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 784 6297448+ 12 Compaq diagnostics
/dev/hdb2 785 30515 238814257+ 7 HPFS/NTFS
And I figured out how to use GParted, so here are what my partitions look like now: click for hda, click for hdb

And, no, I don't believe that GRUB is on the Windows drive (currently in the "slave" position). From what I've read, it shouldn't be. Right?

Quakeboy02 04-02-2007 09:12 PM


title                Windows NT/2000/XP
root                (hd1,0)
map                (hd0) (hd1)
map                (hd1) (hd0)
chainloader        +1

I believe the problem is in your root command. Change it to rootnoverify as follows:

title                Windows NT/2000/XP
rootnoverify                (hd1,1)
map                (hd0) (hd1)
map                (hd1) (hd0)
chainloader        +1

I'm not sure about the savedefault command, but that may be what you want.

Also, your Compaq diagnostics is on the first partition, so I changed this to rootnoverify (hd1,1) to get the windows on the second partition.

Added 2:
If it still doesn't work add a line with just "boot" after the chainloader command.

jay73 04-03-2007 07:31 AM

I would be careful with the makeactive line; it can lead to windows booting all the time, no matter which OS was selected from GRUB. I got this information from the Solaris manual; Linux may be different but since Solaris uses GRUB as well, I'm not so sure about that.

syg00 04-03-2007 08:05 AM

@ryanryan - congrats; seems you've done all the reasonable things.
Gotta also say I'm (reasonably) impressed with the Ubuntu installer getting the map directives right. Things are looking up ...

I'd also second the use of rootnoverify (both 'doze entries), although I wouldn't go changing anything else in contrast to Quakeboy02.
Try (just) that and see how you go.

ryanryan 04-05-2007 08:08 AM

Well, over the past several days I've entertained a host of other variations in my menu.lst file. I've changed 0s to 1s and 1s to 0s and back again. I've dropped the "map" lines, put them back in. Tried removing "makeactive", "savedefault". Changed root to rootnoverify, then back again. Nothing, thus far has worked. I'm beginning to wonder if the problem is something other than the menu.lst file. I checked the file, but correct entries for both drives are there.

Regardless, I (phsyically) swapped the hard disks back again and, yes, Windows boots just as it always did before.

Here's what I'm thinking about doing next. I'm going to try installing linux on the same disk as Windows. That way, both Windows and Linux will be on hda. As for hdb, I'll just reformat it and cut it into two partitions -- one NTFS and one EXT3.

But this leads to anther question:
Do I need to make any extra partitions on my primary drive so that the /boot partition will be on the first n MBs of the disk?

Thanks again for your help,


syg00 04-05-2007 08:23 AM

No, you shouldn't need to.
Yes, you should (IMNSHO).

I *always* create a small boot partition - at the front of the disk. Habit from days when it was necessary.
These days it's useful when deleting distro(s) to try something else - avoids embarassing "oop'es". Also handy if you want to add a system on a removable drive and still boot if it's not plugged in.
Forward planning is never a waste.

Larry Webb 04-05-2007 08:33 AM

I have windows on one hard drive and Suse on a second. The second hard drive was a used hard drive so I'm not sure now which file system was on it. I left windows as "hd0" and during installation Suse wanted to install on hd0 but gave the option to choose hard drives, I chose the second and it reformated it and did the installation.

jay73 04-05-2007 09:07 AM

For what it's worth, I 've booted Gentoo from the last 30GB of a 250GB disc. Also I've given up on boot partitions because of that ridiculous 15 partition limit on Sata discs. But if you can spare the partition, why not .

revenge80200 04-05-2007 09:26 PM

If you have not finished this one yet, i think that this may be helpful.

It is called super grub boot disk or something, I used it in the same position as you and it worked out nicely.

Hope this helps

All times are GMT -5. The time now is 07:40 AM.