LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 08-02-2007, 12:08 PM   #1
vicky_me
Member
 
Registered: Aug 2006
Posts: 39

Rep: Reputation: 15
Question Grub wont boot XP


I have two SATA HDDs and have XP on one hdd and fedora on the other i boot from fedora, i am trying to use grub on my fedora hdd to boot xp too but it wont happen, help needed

[root@localhost ~]# fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3187 25599546 7 HPFS/NTFS
/dev/sda2 3188 3827 5140800 5 Extended
/dev/sda5 3188 3827 5140768+ 7 HPFS/NTFS

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 25 200781 83 Linux
/dev/sdb2 26 50 200812+ 83 Linux
/dev/sdb3 51 703 5245222+ 83 Linux
/dev/sdb4 704 9729 72501345 5 Extended
/dev/sdb5 704 964 2096451 82 Linux swap / Solaris
/dev/sdb6 9534 9729 1574338+ 7 HPFS/NTFS

grub.conf

#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title Fedora-base (2.6.21-1.3194.fc7)
root (hd0,1)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=LABEL=/ noapic all-generic-ide rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img

title Fedora (2.6.20-2925.9.fc7xen)
root (hd0,1)
kernel /xen.gz-2.6.20-2925.9.fc7
module /vmlinuz-2.6.20-2925.9.fc7xen ro root=LABEL=/ noapic all-generic-ide rhgb quiet
module /initrd-2.6.20-2925.9.fc7xen.img

title Windows XP
root (hd1,0)
savedefault
makeactive

Last edited by vicky_me; 08-02-2007 at 12:11 PM.
 
Old 08-02-2007, 12:23 PM   #2
lcole
Member
 
Registered: Aug 2003
Location: Oregon
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 18
You may need the chainloader statement for windows.
Here is an example:
...
#boot=/dev/hda2
default=0
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Red Hat Linux (2.4.7-10)
root (hd0,1)
kernel /vmlinuz-2.4.7-10 ro root=/dev/hda3 hdc=ide-scsi
initrd /initrd-2.4.7-10.img
title Windows 2000
rootnoverify (hd0,0)
chainloader +1
 
Old 08-02-2007, 12:26 PM   #3
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Window$ will only boot from the first BIOS drive and you have set it up as the second BIOS drive.

You need to map the window$ drive as the first BIOS drive.

See the explanation in the Grub Manual section 4.2.6 DOS/Windows.
 
Old 08-02-2007, 12:28 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
did you do that "fdisk -l" from the installed Fedora?
Are you telling the BIOS to boot from the Fedora drive?

If you boot from the Fedora drive, then it should show up as sda, not sdb (I think)...

However, if Fedora boots correctly, then that means the Windows drive is seen as #2. Your root (hd1,0) line is correct, but you also need the map command to trick the system into thinking Windows in on #1. And you need the chainloader command.

Try this:
Quote:
title Windows XP
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
makeactive
boot
Also, I would remove the boot flag from the Fedora partition. Linux doesn't use it, and it is conceivable that it could confuse Winodws.
 
Old 08-02-2007, 12:29 PM   #5
hollywoodb
Member
 
Registered: Aug 2003
Location: Minnesota, U.S.A.
Distribution: Debian, openSUSE
Posts: 400

Rep: Reputation: 30
Code:
/dev/sda1 * 1 3187 25599546 7 HPFS/NTFS             <-- (hd0,0)
/dev/sda2 3188 3827 5140800 5 Extended              <-- (hd0,1)
/dev/sda5 3188 3827 5140768+ 7 HPFS/NTFS            <-- (hd0,2)

/dev/sdb1 * 1 25 200781 83 Linux                    <-- (hd1,0)
/dev/sdb2 26 50 200812+ 83 Linux                    <-- (hd1,1)
/dev/sdb3 51 703 5245222+ 83 Linux                  <-- (hd1,2)
/dev/sdb4 704 9729 72501345 5 Extended              <-- (hd1,3)
/dev/sdb5 704 964 2096451 82 Linux swap / Solaris   <-- (hd1,4)
/dev/sdb6 9534 9729 1574338+ 7 HPFS/NTFS            <-- (hd1,5)
Your Windows section says (hd1,0), which is a linux partition type.
 
Old 08-02-2007, 01:30 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Your Windows section says (hd1,0), which is a linux partition type.
I don't believe this is correct. "(hdX,Y)" is a GRUB designation for partitions---it is independent of the filessystem or OS on the partition.
 
Old 08-02-2007, 01:36 PM   #7
hollywoodb
Member
 
Registered: Aug 2003
Location: Minnesota, U.S.A.
Distribution: Debian, openSUSE
Posts: 400

Rep: Reputation: 30
Quote:
Originally Posted by pixellany
I don't believe this is correct. "(hdX,Y)" is a GRUB designation for partitions---it is independent of the filessystem or OS on the partition.
Right, but GRUB drive order and fdisk drive order should be identical, one drive is primary, the other secondary (or master/slave, whathaveyou).

So it looks like his Windows drive section is referencing the wrong partition, because Windows is likely to be on one of the NTFS partitions. If I had to guess, (hd0,1) looks like the ticket.
 
Old 08-02-2007, 01:47 PM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Oooooops--I obviously mis-read your post..sorry.

Let's wait for OP to catch up.....
 
  


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
GRUB wont boot win2k --chris Linux - General 1 10-28-2006 10:46 AM
Gentoo GRUB wont boot Maverick1182 Linux - Newbie 8 07-24-2006 02:53 AM
grub wont boot windows xp sonesay Red Hat 1 04-27-2005 12:14 AM
grub wont boot XP Dark Elf Linux - Software 2 06-08-2004 03:49 PM
Grub help - Windows XP wont boot! Kennifer Linux - Software 8 06-09-2003 12:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:50 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration