LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (http://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Can't initalize Windows XP (no boot.ini?) (http://www.linuxquestions.org/questions/ubuntu-63/cant-initalize-windows-xp-no-boot-ini-531613/)

bruno321 02-23-2007 04:34 AM

Can't initalize Windows XP (no boot.ini?)
 
Hi. I have installed first Windows XP, then installed Kubuntu. But Kubuntu didn't recognize Windows. I think I know why...

Anyway, here's what I've put on my menu.lst:

title Windows XP
rootnoverify (hd2,1)
makeactive
chainloader +1


I believe the disk information is correct, but correct me if I'm wrong:

IDE Primary Master: 80 GB, Kubuntu
IDE Primary Slave: DVD-RW
IDE Secondary Master: None
IDE Secondary Slave: 120 GB, data

First SATA: nothing
Second SATA: 250 GB, with a Win partition (sda2)

The problem is, when I select Windows XP, nothing happens. Just a "_" tilting, and nothing else.

Anyway, I believe I know the cause of the problem. When I installed Windows XP on that partition, it told me it had to give format to the then unformatted Primary Master, cause it had to write info there. I said OK.

I'm guessing there's where it installed NTLDR and all that stuff. But all that got wiped out when I installed Kubuntu there, with GRUB.

So now I go check the Win partition and I see there is no boot.ini, which I've just read is essential to booting Windows. Ahh, I'm tired of dealing with these things...

Is there any way I can fix WITHOUT having to reinstall any operating systems? I'm fed up with that by now :(

Thanks.

sn68 02-23-2007 05:13 AM

Quote:

Originally Posted by bruno321
title Windows XP
rootnoverify (hd2,1)
makeactive
chainloader +1

For windows it can't be (hd2,1) it has to be (hd0,1)

Try this
Code:

title Windows XP
map (hd0) (hd2)
map (hd2) (hd0)
rootnoverify (hd2,1)
makeactive
chainloader +1


bruno321 02-23-2007 05:20 AM

Well, that seemed to work! Partially, at least.

Now what I get is: "Remove disks or drives. Press one key to continue" (not sic, but translated). I press a key and then NVIDIA Boot Agent loads up. I haven't got a clue why it does, I'm guessing it loads up when no other boot loader is present. As I said, I don't have the ntldr nor the boot.ini file on that partition.

sn68 02-23-2007 05:31 AM

can you post the output of /sbin/fdisk -l

this has has to do with windows mbr which is always installed in the active partion of master disk, the actual programs & installation could be anywhere

bruno321 02-23-2007 05:35 AM

Disco /dev/sda: 250.0 GB, 250059350016 bytes
255 cabezas, 63 sectores/pista, 30401 cilindros
Unidades = cilindros de 16065 * 512 = 8225280 bytes

Disposit. Inicio Comienzo Fin Bloques Id Sistema
/dev/sda1 1 29126 233954563+ f W95 Ext'd (LBA)
/dev/sda2 * 29127 30401 10241437+ c W95 FAT32 (LBA)
/dev/sda5 1 15201 122101969+ b W95 FAT32
/dev/sda6 15202 29126 111852531 b W95 FAT32

Disco /dev/hda: 81.9 GB, 81964302336 bytes
255 cabezas, 63 sectores/pista, 9964 cilindros
Unidades = cilindros de 16065 * 512 = 8225280 bytes

Disposit. Inicio Comienzo Fin Bloques Id Sistema
/dev/hda1 * 1 9777 78533721 83 Linux
/dev/hda2 9778 9964 1502077+ 5 Extendida
/dev/hda5 9778 9964 1502046 82 Linux swap / Solaris

Disco /dev/hdd: 122.9 GB, 122942324736 bytes
240 cabezas, 63 sectores/pista, 15881 cilindros
Unidades = cilindros de 15120 * 512 = 7741440 bytes

Disposit. Inicio Comienzo Fin Bloques Id Sistema
/dev/hdd1 * 2 15881 120052296 c W95 FAT32 (LBA)

sn68 02-23-2007 05:42 AM

Try
title Windows XP
map (hd0) (sd0)
map (sd0) (hd0)
rootnoverify (sd0,1)
makeactive
chainloader +1

the partitions with * mark are active, so sda2, hda1(linux), & hdd1,
since your windows installation is on 250 gb SATA, this should work though I am not sure about SATA drives

bruno321 02-23-2007 05:47 AM

Tried it, all I get is:

"Error 23: error while parsing number..."

sn68 02-23-2007 05:51 AM

I am sorry, cant help beyond this, maybe some else can help, you can always google for map command with ref to SATA drives, essentially you have to fool windows into thinking that it is installed in the first active partition of primary disk, so maybe playing with hd0,hd1 or sd0, sd1 may work

bruno321 02-23-2007 05:52 AM

I see. Thanks a lot anyway! Will google some more :)

sn68 02-23-2007 05:54 AM

Your answer is here
http://www.linuxforums.org/forum/lin...dora-core.html

Quote:

Posts: 4

Got it working!
Thanks for all the replies.

I got it working: I had to change both the device.map and grub.conf files in \boot\grub. Here are the steps I followed:

1) As suggested I did a /sbin/fdisk -l. This showed my SATA disk as /dev/sda1.

2) I tried changing grub.conf to use sd0 but that generated an error 23: bad number

3) Added the following line to device.map

(hd1) /dev/sda

I suspect this line should have been added by Anaconda, but I installed FC3 with the SATA drive powered off.

4) Added windows entry to use hd1 as per the tutorial. The entry is

title Windows XP Pro
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1,0)
makeactive
chainloader +1

bruno321 02-23-2007 08:54 AM

Well, I was going to try that, but:

3) Added the following line to device.map

(hd1) /dev/sda

That seemed like a moot point, seeing that I had already:

(hd2) /dev/sda

on my device.map.

So I replaced the values on the entry that person used with the ones I should use, but then again, it was the exact same thing you, snd68 had already told me to do and which hadn't worked.

I think the disk actually booted with that config, else it wouldn't have shown the "NVIDIA Boot Agent". But Windows doesn't appear :\

syg00 02-23-2007 09:22 AM

Quote:

Originally Posted by bruno321
I'm guessing there's where it installed NTLDR and all that stuff. But all that got wiped out when I installed Kubuntu there, with GRUB.

So now I go check the Win partition and I see there is no boot.ini, which I've just read is essential to booting Windows. Ahh, I'm tired of dealing with these things...

Is there any way I can fix WITHOUT having to reinstall any operating systems? I'm fed up with that by now :(

Unfortunately, I think your analysis is correct. The XP installer (and bootloader) require a primary partition on the boot disk.
Looks like you overlaid it with Kubuntu.

Easiest for you would be to change the BIOS boot disK to the SATA, then re-install XP there. It will update the MBR of that disk - no matter. Then change the BIOS back, and using the menu.lst suggested by sn68 first response, try again.

bruno321 02-23-2007 09:30 AM

I will try that... although it scares the hell out of me. I'm sick and tired of messing around with partitions and MBRs and all that stuff.

I hope I don't end up screwing every MBR on every disc as I did last time. Oh well.

Thanks a ton. It looks like it will work.

bruno321 02-23-2007 11:33 AM

Oh my god, I can't believe it. It worked! It worked! So this installation of Kubuntu + Windows XP costed me 3 kubuntu installs + 2 XP installs. But I eventually got there.

There's a detail I did differently though: I changed the boot order to load the SATA disc first, but the windows installation insisted on formatting the primary master drive (which has kubuntu). So I just unplugged the other two hard drives, leaving only the SATA disc where I would be installing Windows. I installed it, plugged in the other two discs, restored the boot order to the original state, and it automagically worked! (I had already configured GRUB using the first configuration sn68 recommended).

I can't stress this enough: THANKS, big thanks to both of you. I hope one day my Linux knowledge will be bigger so I will be able to help others as beautifully as the people on this wonderful community do.

(That was corny!)


All times are GMT -5. The time now is 06:53 PM.