LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora > Fedora - Installation
User Name
Password
Fedora - Installation This forum is for the discussion of installation issues with Fedora.

Notices


Reply
  Search this Thread
Old 10-29-2004, 09:40 PM   #1
TheDevo
LQ Newbie
 
Registered: Oct 2004
Location: England
Distribution: Fedora 2
Posts: 5

Rep: Reputation: 0
[SOLVED] Unable to load Windows XP using GRUB


Hi all,

I am having quite a strange problem with my duel boot of windows XP/Fedora 2. The GRUB loader can load Fedora without any problems, but when I try to load windows XP, it outputs the grub commands and then hangs. I have two hard drives, the master has the /boot

When I installed linux, I used the command "linux hdc=116301,16,63" to avoid the known bug.

My windows is installed into /dev/sda5 (Not quite sure why, but windows decided it wanted to go there when I told it to use all the free space left on the sda hard drive. /sda2 was already defined, but /sda1 wasn't)

Below are a couple of things that should provide a bit more detail...
fdisk -l
Code:
Disk /dev/hdc: 60.0 GB, 60022480896 bytes
16 heads, 63 sectors/track, 116301 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1               1         203      102280+  83  Linux (/boot)
/dev/hdc2             204       40838    20480040   83  Linux (/root)
/dev/hdc3   *       40839       44901     2047752   82  Linux swap (/swap)
/dev/hdc4           44902      116298    35984088    f  W95 Ext'd (LBA) 
/dev/hdc5           44902      116298    35984056+   c  W95 FAT32 (LBA) (E:)
 
Disk /dev/sda: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           2        1912    15350107+   f  W95 Ext'd (LBA)
/dev/sda2            1913       10011    65055217+   7  HPFS/NTFS (D:)
/dev/sda5               2        1912    15350076    7  HPFS/NTFS (C:)
grub.conf
Code:
# 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/hdc2
#          initrd /initrd-version.img
#boot=/dev/hdc
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
password --md5 $1$sgCr4pyy$LBsd2X/YznQO0ctsY6lOS.
title Fedora Core (2.6.5-1.358)
        root (hd0,0)
        kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.5-1.358.img
title Windows
        rootnoverify (hd1,5)
        chainloader +1
device.map
Code:
# this device map was generated by anaconda
(fd0)     /dev/fd0
(hd0)     /dev/hdc
(hd1)     /dev/sda
I imagine i've missed something really obvious, but it is ~3 am in the morning so I have an excuse!

Thanks for any help

Last edited by TheDevo; 11-04-2004 at 04:11 AM.
 
Old 10-30-2004, 07:26 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The obvious thing that you missed is that grub starts counting from 0. So /dev/sda5 is (hd1,4) .

Should be like this:
Code:
title Fedora Core (2.6.5-1.358)
        root (hd0,0)
        kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.5-1.358.img
title Windows
        rootnoverify (hd1,4)
        chainloader +1

Last edited by jschiwal; 10-30-2004 at 07:28 AM.
 
Old 10-30-2004, 12:13 PM   #3
TheDevo
LQ Newbie
 
Registered: Oct 2004
Location: England
Distribution: Fedora 2
Posts: 5

Original Poster
Rep: Reputation: 0
Unfortunately that didn't work. I still have the same problem. I am currently trying to re-install windows and then set up grub. Hopefully second time lucky!
 
Old 10-30-2004, 01:05 PM   #4
TheDevo
LQ Newbie
 
Registered: Oct 2004
Location: England
Distribution: Fedora 2
Posts: 5

Original Poster
Rep: Reputation: 0
Now I get a "Error loading operating system" when I try to install windows. The first stage where it boots off the CD and copies the setup files to the harddrive works fine. However, when the computer restarts, I get that error message.

Thankfully, running "grub-install" from my recover disk returns good old grub to the control seat and lets me get into Fedora at least.

Stupid Microsoft
 
Old 10-30-2004, 07:26 PM   #5
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
I'd unplug the IDE drive for your Windows reinstall. I had a similar problem, but it may be for a different reason. The Windows bootloader refuses to work if it's not loaded from certain places.

For example: My case. I was given a hand-me-down with XP (The machine really isn't capable of running it well, but I use it sometimes). I purchased a new HD and made it the primary master. Windows refused to load from the primary slave position. Luckily, GRUB has a command (map) that can trick windows into thinking that it is the primary master just long enough to convince it to load.

I'm not at my home machine at the moment, but the command is something like this inserted before the chainloader command:
map (hda), (hdb)
map (hdb), (hda)

I know that Windows can load from SCSI, but maybe it is refusing to load while there is an IDE hard drive present. Who knows with MS. Good luck.
 
Old 10-30-2004, 09:51 PM   #6
TheDevo
LQ Newbie
 
Registered: Oct 2004
Location: England
Distribution: Fedora 2
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by gd2shoe
I'd unplug the IDE drive for your Windows reinstall. I had a similar problem, but it may be for a different reason. The Windows bootloader refuses to work if it's not loaded from certain places.

For example: My case. I was given a hand-me-down with XP (The machine really isn't capable of running it well, but I use it sometimes). I purchased a new HD and made it the primary master. Windows refused to load from the primary slave position. Luckily, GRUB has a command (map) that can trick windows into thinking that it is the primary master just long enough to convince it to load.

I'm not at my home machine at the moment, but the command is something like this inserted before the chainloader command:
map (hda), (hdb)
map (hdb), (hda)

I know that Windows can load from SCSI, but maybe it is refusing to load while there is an IDE hard drive present. Who knows with MS. Good luck.
I want your babies

On a more serious note, this solved my problems first time! I've been battling with windows for the past 30 hours or so, and I have finally made it bend to my will! It seems to be 3am again, but atleast I can sleep happy tonight safe in the knowledge I can duel boot.
 
Old 11-03-2004, 11:37 PM   #7
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
well done on fixing the bug but have another look at your fdisk output.
the asterix is what is bootable and you have a bootable hdc3 and a sda1

if you can boot both who cares but if you have trouble with windows you may consider using windows version of fdisk to change the bootable flag for sda5 to ON and turn off sda1 & hdc3
 
Old 11-04-2004, 04:10 AM   #8
TheDevo
LQ Newbie
 
Registered: Oct 2004
Location: England
Distribution: Fedora 2
Posts: 5

Original Poster
Rep: Reputation: 0
It works already :-) gd2shoe's solution was perfect, but thanks for your input
 
Old 11-04-2004, 03:38 PM   #9
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
All the bootable flag does is direct the MBR on the disk to boot to that partition. It's like a relay race. The BIOS passes the baton to the MBR, the MBR to the Partition boot sector (of the partition that's marked bootable on it's disk), and the boot sector to the OS.

GRUB replaces much of that. GRUB stage 1 hides in the MBR. Stage 2 is in /boot on one of your partitions. The boot order goes from BIOS to the MBR (aka GRUB stage 1), and then to GRUB stage 2. Stage 2 then gives you the menu and can either pass control to an OS kernel or to a partition boot sector (chainloader).

It's the normal (MS) MBR that looks to the boot flag for direction. I don't believe the flag does anything on a GRUB system (Unless you load your stage 1 in a partition boot sector. Useful, but rare).

This is my understanding. I'm open to correction. Good day!
 
Old 11-04-2004, 07:42 PM   #10
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
you may have missed my words "but if you have trouble with windows"
 
Old 11-04-2004, 09:43 PM   #11
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
Uh...

The Windows MBR (master boot record) cares about the bootable flag. I don't believe there is any other part of Windows that has any reason to care.

Besides, I don't think you can turn the bootable flag completely off, just change the value from one partition to another. It doesn't need to ever be off. If boot control reaches the MBR of a disk, then one of the partitions should hold an OS (or at least another redirect). If it doesn't reach the disk's MBR then the value doesn't matter.

And Windows XP doesn't have a version of fdisk. That functionality has moved to "Computer Management" in the control panel. In fact, I don't think you can monkey with the boot flag, even there.
 
Old 11-04-2004, 10:16 PM   #12
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
I will take your word for it as I don't have XP but did have w98se
 
  


Reply



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 doesn't load Windows XP Vladk1000 Linux - Newbie 4 09-17-2005 03:08 AM
GRUB won't load Windows Norab Linux - Hardware 1 08-19-2005 01:33 PM
ipw2200 - Unable to load ucode, unable to load firmware blizinsk Linux - Wireless Networking 2 10-10-2004 08:28 AM
unable to load FreeBSD 5.2.1 with grub 0.94 sterrenkijker *BSD 2 06-13-2004 05:20 PM
configuring GRUB to load windows merlin371 Linux - General 1 02-28-2004 10:38 AM

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

All times are GMT -5. The time now is 05:09 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