LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-07-2003, 09:24 AM   #1
Darkstar274
LQ Newbie
 
Registered: Sep 2003
Distribution: RH9, Mandrake, Knoppix, Fedora Core 1 & 2, Gentoo
Posts: 22

Rep: Reputation: 15
Angry Dual-Boot Windows XP through GRUB


Hey Guys,

I have a 20GB HD installed with RedHat 9, which is my master and a 40GB HD installed with Windows XP Professional, which is my slave. I am wondering how to get Windows XP Pro to boot through GRUB. I have searched all over for a possible solution. Here is a copy of my /etc/grub.conf file. Linux is awesome but I sorely miss my games.

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img
title Windows XP Professional
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
chainloader + 1
makeactive

If someone can help me it would be grealy appreciated. Thanks
 
Old 12-07-2003, 09:33 AM   #2
dkaplowitz
Member
 
Registered: Oct 2002
Location: Havertown PA
Distribution: Ubuntu/RHEL/Fedora
Posts: 253

Rep: Reputation: 31
Here's what I have in my grub.conf...under the stuff about Linux.

Note that I installed XP first on the hdd. If I had a 2nd hdd, then I guess it would be pointing to hd1,0 instead of hd0,0

The "Windows XP Professional" bit can be changed to whatever you want.

Code:
title Windows XP Professional
        rootnoverify (hd0,0)
        chainloader +1
 
Old 12-07-2003, 09:43 AM   #3
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
if you get strange messages about missing files, try check if winxp is set as bootable
fdisk /dev/hdb
use 'p' command to list, 'a' to set bootable flag
 
Old 12-07-2003, 09:45 AM   #4
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
Code:
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img
title Windows XP Professional
#map (hd0) (hd1)
#map (hd1) (hd0)
rootnoverify (hd1,0)
chainloader + 1
#makeactive
I'm not sure what the map and makeactive lines do. I do not use them myself. You could try commenting them out, just to see what it does.
 
Old 12-07-2003, 01:56 PM   #5
Darkstar274
LQ Newbie
 
Registered: Sep 2003
Distribution: RH9, Mandrake, Knoppix, Fedora Core 1 & 2, Gentoo
Posts: 22

Original Poster
Rep: Reputation: 15
Tried A Couple Things

I tried using this code:

title Windows XP Professional
rootnoverify (hd0,0)
chainloader +1

That didn't work...Error Code 13...I think it was. If you look at the /etc/grub.conf that I posted; that code will allow you to boot to Windows XP ONLY if the Windows HD is master(When I hit F11 to select what device I want to boot off of during POST). It doesn't work when I promote the Linux HD to master. I don't want to look at NTLDR.....GRUB is nice and customizable....once you get it going. If I install GRUB onto the MBR of the Windows HD; I've heared that Windows will overwrite it and you won't be able to boot Linux. Not to mention you will have to go through this nasty process of restoring the Windows MBR if you remove Linux.
 
Old 12-07-2003, 02:03 PM   #6
dkaplowitz
Member
 
Registered: Oct 2002
Location: Havertown PA
Distribution: Ubuntu/RHEL/Fedora
Posts: 253

Rep: Reputation: 31
Re: Tried A Couple Things

Quote:
Originally posted by Darkstar274
I tried using this code:

title Windows XP Professional
rootnoverify (hd0,0)
chainloader +1

That didn't work...Error Code 13...I think it was. If you look at the /etc/grub.conf that I posted; that code will allow you to boot to Windows XP ONLY if the Windows HD is master(When I hit F11 to select what device I want to boot off of during POST). It doesn't work when I promote the Linux HD to master. I don't want to look at NTLDR.....GRUB is nice and customizable....once you get it going. If I install GRUB onto the MBR of the Windows HD; I've heared that Windows will overwrite it and you won't be able to boot Linux. Not to mention you will have to go through this nasty process of restoring the Windows MBR if you remove Linux.
Didn't you say you installed XP on a slave drive? That would mean that:

Code:
rootnoverify (hd0,0)
should really be:

Code:
rootnoverify (hd1,0)
Either way, you have to point it to the drive that has the bootable XP partition.
 
Old 12-07-2003, 02:07 PM   #7
dkaplowitz
Member
 
Registered: Oct 2002
Location: Havertown PA
Distribution: Ubuntu/RHEL/Fedora
Posts: 253

Rep: Reputation: 31
Here's the code for my workstation. Note that I have XP installed on the master and Linux on a slave. Thus my Linux and XP are exactly the reverse of your setup. So with a little tweaking, you can probably just use this in your grub.conf. (back up your existing grub.conf first though)

Code:
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-24.9)
        root (hd1,0)
        kernel /boot/vmlinuz-2.4.20-24.9 ro root=LABEL=/ hdc=ide-scsi
        initrd /boot/initrd-2.4.20-24.9.img
title Windows XP Professional
        rootnoverify (hd0,0)
        chainloader +1
 
Old 12-07-2003, 02:09 PM   #8
dkaplowitz
Member
 
Registered: Oct 2002
Location: Havertown PA
Distribution: Ubuntu/RHEL/Fedora
Posts: 253

Rep: Reputation: 31
Try this:

Code:
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-24.9)
        root (hd1,0)
        kernel /boot/vmlinuz-2.4.20-24.9 ro root=LABEL=/ hdc=ide-scsi
        initrd /boot/initrd-2.4.20-24.9.img
title Windows XP Professional
        rootnoverify (hd1,0)
        chainloader +1
 
Old 12-07-2003, 02:16 PM   #9
Darkstar274
LQ Newbie
 
Registered: Sep 2003
Distribution: RH9, Mandrake, Knoppix, Fedora Core 1 & 2, Gentoo
Posts: 22

Original Poster
Rep: Reputation: 15
*Slaps Self In Head*

I GOT IT!

GRUB CODE TO BOOT WINDOWS XP THROUGH GRUB AS A SLAVE HD:

title Windows XP Professional
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
chainloader +1
boot

Last edited by Darkstar274; 05-27-2004 at 12:56 PM.
 
Old 12-07-2003, 02:59 PM   #10
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
you just had to remove the line
makeactive
 
Old 12-07-2003, 06:10 PM   #11
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
I think makeactive either does not work, or it does something different from what one may expect: it doesn't change the partition table at all. Maybe it fakes it to the chainloader?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual boot Linux with Windows: Grub Error 17 Veniogenesis Linux - Newbie 3 10-23-2005 09:41 AM
Grub will not load Windows XP with Ubuntu dual boot Alex4R Linux - Software 1 03-26-2005 11:29 AM
Problem with GRUB when trying to dual boot Mandrake 10.1 and Windows XP. JakeMH Linux - Newbie 4 02-25-2005 06:40 AM
How to remove Linux and restore Windows on Dual boot using Grub TheBaffledKing Linux - Newbie 13 04-14-2004 05:47 AM
Trouble getting Windows XP to dual boot with Fedora using GRUB davstin2002 Linux - Newbie 12 01-22-2004 03:24 PM


All times are GMT -5. The time now is 11:27 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration