Jump to content
Compatible Support Forums
lanmat

Dual boot; xp x64 + fc 5

Recommended Posts

You have probably heard this before, but I haven't been able to resolve it.

 

I recently got a HP xw4300 workstation. Pentium EM64T, SATA etc. Preinstalled win XP x64. Wanted to dual boot Fedora core 5, got a new SATA drive.

 

Did a "default" installation of fc5 on sdb. Failed to get grub going, XP booted without grub loading. So I booted linux rescue and did something like "grub-install --recheck /dev/sda". Then linux booted perfectly, but I was unable to boot XP.

 

Tried to get grub booting XP, mostly in the grub console. Tried lots of variations on the theme:

rootnoverify (hd0,0)

makeactive

chainloader +1

I always got back to grub again after a very quick flash of a black screen.

 

Then I thougth I might have screwed the XP installation. So I wanted to do "fixmbr" and "fixboot" from XP recovery console. But then the XP recovery didn't find the sata drives, so I couldn't do anything until I found in BIOS that I could set "SATA emulation" to "separate IDE" instead of "AHCI". Then I could do "fixmbr" and "fixboot".

 

Now I'm back at square 1, XP boots, but no bootloader to boot linux. What should I do the next time? All this has taken me a lot of time and effort. I need to get my confidence back before I try again.

 

I'm grateful for any comments or tips.

 

/ Mats

Share this post


Link to post

When you do an installation of Fedora, it assumes that you are installing to one hard drive in the system. Fedora, by default, installs Grub on the MBR of the disk that you choose to install it on. This is why XP booted after you installed Fedora, with no Grub menu.

 

You must tell Fedora, during the installation, to place the grub bootloader on the MBR of the primary sata drive.

 

To complicate matters, HP systems, especially with XP pre-installed, often have a rescue partition at the beginning of the hard drive. This is often a hidden partition, but if you make it active, Grub will try to boot from it (assuming hd0,0 is the XP drive).

 

Quote:
I always got back to grub again after a very quick flash of a black screen.

 

Often this happens with grub, whenthe partition that you are attempting to boot from is hidden.

 

There is also a bug in Grub that can cause this.

 

The following assumes that the primary sata drive has XP on it and you installed Fedora on the secondary sata drive, or sdb, which is not the drive that boots first in the bios.

 

Now that you have changed the designation of how the drives are detected in the bios, you have two choices, try to rescue Fedora again (which may fail) or re-install Fedora the correct way.

 

See my articles on installing Fedora on two hard drives located here and here.

 

Also, see the section on sata drives here.

 

If you re-install Fedora, make sure that grub is installed to the primary (boot) sata drive. My article here speaks about this.

 

The link to the entire article is located here.

Share this post


Link to post

Thanks for your response, danleff.

 

Quote:
You must tell Fedora, during the installation, to place the grub bootloader on the MBR of the primary sata drive.

I think I did, but I'm not sure. Obviously, it didn't work.

 

 

Quote:
To complicate matters, HP systems, especially with XP pre-installed, often have a rescue partition at the beginning of the hard drive. This is often a hidden partition, but if you make it active, Grub will try to boot from it (assuming hd0,0 is the XP drive).

How can I tell if I have a hidden partition? My layout is:

[root@name sbin]# ./fdisk -l

 

Disk /dev/sda: 250.0 GB, 250059350016 bytes

255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot Start End Blocks Id System

/dev/sda1 * 1 30400 244187968+ 7 HPFS/NTFS

 

Disk /dev/sdb: 160.0 GB, 160041885696 bytes

255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot Start End Blocks Id System

/dev/sdb1 * 1 13 104391 83 Linux

/dev/sdb2 14 19457 156183930 8e Linux LVM

 

Is makeactive the way to boot XP with a hidden partition?

 

 

Quote:
There is also a bug in Grub that can cause this.

Referring to your article:

Quote:
grub (hit the enter key & after each command below)

grub> root (hd1,0) (since fedora /boot is on /hdb or the second hard drive)

grub> setup (hd0) (the MBR of the first hard drive)

grub> quit

is this the way to resolve the grub bug?

 

 

Quote:
Now that you have changed the designation of how the drives are detected in the bios, you have two choices, try to rescue Fedora again (which may fail) or re-install Fedora the correct way.

I changed it back to "AHCI" right after doing "fixmbr" and "fixboot". I don't know how this affects the system. Could it affect grub booting XP? Presumably, linux rescue will work again, as I'm really back at where I started after installing Fedora the first time.

 

 

Thanks again for your reply and your nice articles (although, I already had seen them before posting to this forum). Still grateful more feedback.

 

 

/ Mats

 

 

 

Share this post


Link to post

Success!!

 

Now my computer is up and running the way I intended.

 

 

Booted linux rescue, from DVD.

 

ran /sbin/grub-install /dev/sda

after reboot I was able to boot XP "out-of-the-box"

 

So, I'm happy, but I still don't know what I did wrong before!

 

 

/ Mats

Share this post


Link to post

Sorry that I lost track of your thread. Glad that you got it going!

 

Now that Fedora Core 6 got released today! smile

 

I bet that on the previous attempts you did not get a valid chroot to the actual Fedora installation during the rescue process. I've seen this happen as well.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×