LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RedHat 9/WinXP dual boot problems (https://www.linuxquestions.org/questions/linux-newbie-8/redhat-9-winxp-dual-boot-problems-114907/)

Jowy_Atredies 11-11-2003 02:50 PM

RedHat 9/WinXP dual boot problems
 
Ok first let me start off by apologizing because I'm sure this is probably the 5641th thread there's been about this. I did try a search before posting this but could not seem to find a solution to my specific problem. So without further delay here we go:

I am in a class where we have single hardrive machines that can be used to dual boot into both Linux and Windows. The computer that I am currently having trouble with had WindowsXP as the only OS on it. I then installed RedHat and with the help of a classmate was able to manually partition the drive using Disk Druid. GRUB is installed fine on it and it comes up at bootup. The next step I did was to research how to get GRUB to have a Windows entry at the bootup screen. Through looking at this board I began to work on getting XP back.

First I checked with /sbin/fdisk -l to determine where the Windows partition was. Here is what it printed out:

"Disk /dev/hda: 20.0 GB, 20020396032 bytes
255 head, 63 sectors/track. 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

/*
I seperated the lines for readablitiy reasons. Otherwise everything was getting crunched together. Sorry if it's still hard to read
*/

Device Boot
/dev/hda1 *
/dev/hda2
/dev/hda5


Start
1
915
915

End
914
2433
2433

Blocks
7341673+
12201367+
12201336

ID System
83 Linux
f Win95 Ext'd (LBA)
e Win95 FAT16(LBA)"

From what I remembered during the installation of RedHat as well as the above info it seemed that hda5 was the location of my WindowsXP partition. I then went into the /boot/grub/grub.conf file to add the Windows boot entry into it. For purposes of simplitcity I am only going to post the entry I made for Windows as RedHat still appears to boot and function without any problems. Here is what the entry for Windows appears as:
"title WindowsXP
(tab)map (hd0,0) (hd0,4)
(tab)map (hd0,4) (hd0,0)
(tab)rootnoverify (hd0,4)
(tab)chainloader +1"

The '(tab)' markers are where I pressed tab to indent them in the file in case that matters any.

After making those changes I rebooted the machine. GRUB came up as usual and the WindowsXP entry was there. I selected it and the following appeared on the screen:
"Booting 'WindowsXP'

map (hd0,0) (hd0,4)
map (hd0,4) (hd0,0)
rootnoverify (hd0,4)
chainloader +1

Error 13: Invalid or unsupported executable format

Press any key to continue..."

Pressing any key simply returns me to the GRUB selection screen (whew!), and I am able to boot into RedHat fine from there.

That sums up what I've basically done so far to try to make the machine dual boot into Windows again. Even though Windows isn't really needed I would like to know how to troubleshoot this problem as I may run into a similar situation again. Right now I'm hesitant to make any other changes to the grub.conf file in fear of making it so that Linux will no longer boot so that is why I am posting now asking for further advice before I try anything else. Thank you in advance for any help you might be able to offer. Once again sorry for asking what is probably a variant of the same question again.

Demonbane 11-11-2003 10:07 PM

try
rootnoverify(hd0,1)
chainloader +1

If the linux partition was already there when you installed redhat(ie the first sector of the windows partition didnt change) you shouldn't need to remap the partition order, but make 2 entries with one mapped and see how it goes. If that doesn't work boot with a grub bootdisk(check the documentation on how to create one if necessary), get to the grub prompt and keep trying
rootnoverify (hd0,X)
chainloader +1
change the number of X each time until you find the xp system partition, if everything fails then chances are your nt bootsector is dead, but try the above and see if it works first.

aaa 11-12-2003 07:34 AM

Quote:

/*
I seperated the lines for readablitiy reasons. Otherwise everything was getting crunched together. Sorry if it's still hard to read
*/
That's what the code tags are for:
[code]
Device Boot Start End Blocks ID System
/dev/hda1 * 1 918 7341673+ 83 Linux
/dev/hda2 915 2433 12201367+ f Win95 Ext'd (LBA)
/dev/hda5 915 2433 12201336 e Win95 FAT16(LBA)
This was posted like this :
Code:

Device...[/cod..]

Jowy_Atredies 11-12-2003 04:51 PM

Well I think the XP install is shot. I've tried using even Webmin to get it to boot up after deleting the entry from my .conf file to start fresh and even that did not work. It must've been written over or something when I did the manual partition with Disk Druid during the Linux install. Oh well, live and learn. Thanks for you help :) oh and thanks for those code tags. Didn't know they were there....was sorta in a rush despite the length of my first post.

aaa 11-13-2003 01:41 PM

Try backing up your Linux mbr to floppy, & using the fixmbr & fixboot commands from the XP install cd.

Jowy_Atredies 11-17-2003 09:56 AM

First, sorry for taking so long getting back to replying to you. Was quite busy, and I didn't get a chance to try your suggestion until this weekend. Oddly enough those two commands from the XP cd made the computer unable to boot up Windows cds. :confused: RedHat booted back up just fine from both the floppy and the install cd. Since this mainly seems to be an issue with the mbr, I'm just going to let it lie right now as I've reinstalled only RedHat onto the system and if my lab partner wants XP on it then he can figure it out because now we are trying to implement DNS services on our machines in there and I probably would not have any more time to try to figure this out myself. Ah well, it was fun to try. ;) Thank you both again for your help! It was much appreciated :D


All times are GMT -5. The time now is 08:44 PM.