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
 
LinkBack Search this Thread
Old 01-14-2007, 06:11 PM   #1
joao.m.esteves
LQ Newbie
 
Registered: Dec 2005
Posts: 14

Rep: Reputation: 0
Dual boot Machine: Can't boot XP with grub


Hello:

I have a dual boot PC, with XP and Fedora 6. Recently I had to format the Windows partiton and do a XP fresh install. I have 3 disks, 1 sata (sda) where XP is installed, and 2 pata (hdg, which has Fedora, and hdh) and it is possible to boot to Fedora with the hdg drive in the bios, but I can't, at the same time, boot to windows. To go to XP, booting must be made with the sata drive, which doesn't have grub. The error I get when trying to boot to XP with the pata disk is

"NTLDR is missing. Press ctrl+alt+delete to reboot".

I used Fedora to install grub on hdg with

"grub-install /dev/hdg"

It gave an ok message and the listing of device.map generated by anaconda:

sda is hdo
hdg is hd1

Now comes the odd part. In grub boot menu, Fedora appears in (hd0,1) and it boots OK (there is a boot partition) and XP appears in (hd1,0). Changing this by hand to (hd0,0) gives the same error.
I'm quite sure that ntldr and ntdetect.com are on sda C:

I also tried to install grub in the sata driver, but then it gave error 22, and had to fix the master boot record with "fixmbr" of XP cd.

Perhaps I'm missing something obvious here. Some help is highly
appreciated.

Regards.
Joao
 
Old 01-15-2007, 05:55 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,301

Rep: Reputation: 197Reputation: 197
The important thing to note here is that you are causing your owm problems by switching the BIOS back and forth between the two drives. It is impossible to get grub into a consistent, sane state if you keep changing the BIOS.

Edit the BIOS one last time, and never more. Set it up as it was when you installed Fedora (since you have Fedora installed and grub in the MBR of that drive). Fedora will then be consistent with the grub.conf (/boot is in (hd0,0), / [root] is in (hd0,1)), and xp in in (hd1,0).

Do that now, and verify that Fedora will boot.

And, from this point on, LEAVE THE BIOS ALONE. It is not necessary to keep changing drive order, and just confuses matters.

On successful re-boot, edit /boot/grub/grub.conf to make the xp entry look like this:

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

Windows will refuse to boot if it isn't in the first partition of the first drive. So, we tell windows a little white lie to make it think it's there (the map lines above will remap the drive numbers for windows).

Note: in future, when you re-install xp, it will probably break grub. Just boot Fedora from the cd, and run grub-install again to fix grub.
 
Old 01-15-2007, 06:25 AM   #3
joao.m.esteves
LQ Newbie
 
Registered: Dec 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Ok I understand, I will do that.

Thanks.

Joao
 
Old 01-15-2007, 07:58 AM   #4
joao.m.esteves
LQ Newbie
 
Registered: Dec 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Ok it worked! I can now boot Fedora and XP from hdg with grub.

One last question: the file device.map still says that hd0 is sda and hd1 is hdg. Isn't this going to make some troubles? Should I change it?

Regards.

Joao
 
Old 01-15-2007, 11:27 AM   #5
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,301

Rep: Reputation: 197Reputation: 197
Perhaps this will answer your question:

http://www.gnu.org/software/grub/man...evice-map.html
 
  


Reply

Tags
dual boot, grub, xp


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
windows boot slow on dual boot machine fobster Linux - Newbie 4 04-21-2006 08:58 AM
Fedora Core 3 Dual Boot, Dual Hard drives, Grub Boot Loader Denali03 Linux - Newbie 1 03-04-2005 02:44 PM
Dual boot machine Grub doesn't install marios_auth Fedora 4 10-26-2004 11:27 PM
Grub Dual Boot Mandrake 9.2 and Win2000 Invalid Boot Disk larsenmtl Linux - Newbie 1 02-01-2004 04:29 PM
Grub does not work on Dell dual boot machine. Darrell22 Linux - General 1 01-24-2004 10:24 PM


All times are GMT -5. The time now is 11:59 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
Open Source Consulting | Domain Registration