LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Grub wont boot XP (https://www.linuxquestions.org/questions/fedora-35/grub-wont-boot-xp-574255/)

vicky_me 08-02-2007 12:08 PM

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

lcole 08-02-2007 12:23 PM

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

WhatsHisName 08-02-2007 12:26 PM

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.

pixellany 08-02-2007 12:28 PM

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.

hollywoodb 08-02-2007 12:29 PM

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.

pixellany 08-02-2007 01:30 PM

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.

hollywoodb 08-02-2007 01:36 PM

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.

pixellany 08-02-2007 01:47 PM

Oooooops--I obviously mis-read your post..sorry.

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


All times are GMT -5. The time now is 02:57 PM.