-   Linux - General (
-   -   Grub doesn't boot Win XP (

peterjmag 01-10-2002 01:45 AM

Grub doesn't boot Win XP
Hey all,

First off, I'm new here, and slightly new at Linux. So hi. :D

Okay, here's my problem: Originally, I had two partitions, one with Windows ME and one with XP Pro. Today, I decided to erase the partition with ME on it and install RedHat 7.2. I selected to use Grub as the boot loader, because I wasn't sure if the loader common to Windows would boot Linux properly. So here I am, happily playing Tux Racer when I realize that I need to get a Linux driver for my wireless network card. I shut down Linux and reboot the computer. The Grub OS selection menu appears, and I select "DOS". It says the normal stuff (Loading "DOS", and those other commands) and then says something like "Remove disks or other media. Press enter to restart."

Out of frustration, I deleted the Linux partition (I promise I'll reinstall it, really!), so I have just one big partition with XP on it. But I can't boot into XP! When I start the computer, I see the same message, "Remove disks or other media" yada yada. Does anyone know how I can get the original NTLoader boot loader back onto my MBR, or even how to boot XP?

Thanks in advance,

Peter Magenheimer

glock19 01-10-2002 01:41 PM

To dual boot Linux and NT (any version of NT, 2k, XP), the NT system must own the MBR.

So you have to install NT as the primary partition in the system. Then, with the remaining free space (however much you choose), install Linux. Make sure you don't install GRUB on the MBR.

After done installing Linux, boot it with your Linux boot disk. Extract the boot file onto a floppy disk. Now boot XP and copy that file to the root of the C: drive. Edit your boot.ini and add another line that points to the file you just copied.

Now when you boot, the NT bootloader will give you a selection between XP and Linux.

Risc91 01-10-2002 03:29 PM

You don't really have to use the NT Loader. I have my system dual booting linux and XP. It works fine. All i did was edit the LILO or GRUB config file (which ever you like). Just add the dev (ex. hda1) that XP is on and give it a label. IF i can find the link i'll post it.

Risc91 01-10-2002 03:36 PM

If you haven't already installed it, install Linux. Place the boot loader in the MBR, unless you have reason not to.

Next, install XP in a primary partition. LILO can boot a foreign system only from a primary (not a logical) partition. If the XP installation procedure complains about the current MBR, do not let it overwrite the MBR. Note the drive number and partition number of the XP system partition.

Reboot the system and start Linux. Add the following section at the end of the LILO configuration file (/etc/lilo. conf)


where the other= field is the device name. The first IDE drive is hda, the second hdb, and so forth; the partitions are numbered from 1. So, the fourth partition on the first IDE drive is /dev/hda4. The label= field contains the letters you choose to type at boot-time to boot XP. The table= parameter is redundant; set it to the same value as the device, but delete the partition number.

If you want to adjust the time that LILO waits for user input before the default system boots, find and edit the value of the timeout= parameter. The value's units are tenths of seconds, so enter 100 to delay 10 seconds before booting the default. /etc/lilo.conf mentions the default system first; to set a new default, move the entire system's section so that it appears before the current default. Run /sbin/lilo to effect the changes you've made to /etc/lilo.conf.

HOpe this helps!!


peterjmag 01-10-2002 08:04 PM

Thanks for the responses. But now I have another problem. I have one primary partition, and I can't boot (it says "Invalid partition table") when I turn on the computer after the BIOS screen. BootIt NG tells me that the file system (FAT32) is corrupted and thus won't let me resize the partition to make a partition for Linux. fdisk in the Linux setup disk tells me that I'd have to delete all data on the partition to edit it.

However, when I boot to a DOS prompt using a boot disk, I can view and edit the contents of my C partition normally. Backing up my most important files to a floppy is my last resort, but before I do so, does anyone know of any bootable utilities that can fix my so-called corrupted file system? I have a lot of data on here that I'd like to do my best to keep.

Do you think I should just go ahead and backup my most important files through DOS (ugh...) or is there another way to back up more through a bootable utility (such as through a network or on a CD-R...)?

Thanks in advance,

Peter Magenheimer

naslq 03-03-2002 07:21 AM

Try getting a win 98 or win2k boot disk from a friend and use that to boot up the machine. Then, when you get the DOS A:> prompt, type fdisk /mbr. What this does is it fixes your Master Boot record, which gets destroyed if you tried to install LILO or GRUB as a dualboot without taking certain precautions. My problem was similar to yours and I couldn't even boot XP, but if I used my Linux boot disk, I could go into my Windows file system and see everything. When I ran "fdisk /mbr" everything was fixed and it booted into XP fine again. Then I basically cleared out the Linux partition and reinstalled it, though you could probably try the stuff in the above posts if you want to fix the Linux partition in-place.

Good luck.


chamkila 03-03-2002 08:43 AM


I had the same problem with Red Hat 7.2 and XP.

The Problem was I did not have the NTFS modules loaded, What you have to do is recomplie the Linux Kernel to support NTFS.

Other problem is that Red Hat 7.2 does not Support NTFS by default (I was reading about this on so you might have to load the modules your self, The file should be some thing like ntfs.o.

first see if you are running the Ntfs Modules by lsmod if not

check to see if your kernel as NTFS support by recomlie it.

I ended up conerting my ntfs partition to fat32 .


Swene 04-26-2002 02:56 PM

All in favour say "Ai"
Yes I have to agree the dos program "fdisk" is the only man for the job.

if you can get your hands on a copy of DOS or Win98 bootdisk, just run:

A:\fdisk mbr

and it will reset/rescue your master Boot record and u shud be able to work around it.
Gud luck,

Dolby 05-03-2002 06:33 PM

Just to add to that, make sure you type in fdisk /mbr with a space after "fdisk" as naslq mentoned...........


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