CLI Home
Articles

Solution to the Windows, Fedora Core 2
Dual Boot Problem

Bill Moss
Updated May 26, 2004

Introduction

The purpose of this note is to serve as a warning to users planning to dual boot Windows 2000/XP and Fedora Core 2 (FC2) and provide a solution for users who have reported that Windows cannot be booted after the installation of FC2. This is not a how-to article on dual booting but rather a note about a couple of additional steps that can be added to a traditional dual boot setup that will avoid the disk geometry problem that is now being widely reported.

Here is summary of the steps. Details follow in the next section. This note covers the case of dual boot installation on a single IDE drive /dev/hda.

  1. Assume that Windows 2000/XP has been installed and hard disk free space has been made available for FC2 or else an existing dual boot partition table will be used.
  2. Insert FC2 disc 1 and boot in rescue mode
    boot: linux rescue
    At the prompt type
    fdisk -l /dev/hda
    and record the hard disk geometry reported as three integers XXX,YYY,ZZZ (cylinders, heads, sectors).
  3. Reset and boot the FC2 installer
    boot: linux hda=XXX,YYY,ZZZ
  4. When you reach the point in the installation script where grub is set up, type the kernel parameter
    hda=XXX,YYY,ZZZ

If you have windows installed on one disk and plan to put FC2 on a second disk, I would suggest that you repeat the above procedure to find the geometry of both disks and then boot the installer with a kernel parameter for each disk as in

boot: linux hda=XXX,YYY,ZZZ hdb=RRR,SSS,TTT
Otherwise, user reports suggest that the FC2 installer may change both partition tables.

Details

I have a Dell C600 laptop dual booted with Windows 2000 and FC1. Partition Magic reports the disk geometry (cylinders, heads, sectors) as 2432,255,63. When booted to FC1, the same values are reported by the commands

fdisk -l /dev/hda
parted /dev/hda
and by the 2.4 kernel in
/proc/ide/hda/settings
When I boot FC2 disc 1 to rescue mode, the 2.6 kernel reports the disk geometry as 38760,16,63, while fdisk reports it as 2432,255,63, and parted reports it as 38760,16,63.

The reports of other users suggest that if new partitions are created during FC2 installation, then Disk Druid will create a new partition table using the geometry 38760,16,63 because Disk Druid uses parted. In this case, Windows will not boot. If new partitions are not created during FC2 installation, that is, the current partition table is used, then Disk Druid will not create a new partition table. In this case, Windows will boot.

What is needed is a method of overriding the disk geometry that the 2.6 kernel is using during installation and thereafter. This can be done by using a kernel parameter. If I insert FC2 disc 1 and boot in rescue mode using a kernel parameter

boot: linux hda=2432,255,63 rescue
I see that the 2.6 kernel, fdisk, and parted all report the geometry as 2432,255,63. Based on this experiment, I believe that I can do a FC2 dual boot install by inserting FC2 disc 1 and booting the installer with a kernel parameter
boot: linux hda=2432,255,63
During installation, the kernel parameter hda=2432,255,63 can be input as part of the grub configuration. This will insure that parted works correctly after installation.

At least one user has reported that Partition Magic will report and fix errors after the installation. I have noticed the same behavior after past dual boot installations but these errors have never caused any problems. Partition Magic is reported to have a restrictive definition of a partition table.

Windows Will Not Boot

If Windows will not boot after installation of FC2, do not reinstall Windows or try to rewrite your MBR. You have not lost any data. All you need to do is to modify your partition table using the sfdisk command. The FC2 installer changed the number of heads recorded in the partition table. Assuming that your head count was 255 before the installation, you can fix your partition table by booting FC2 disc 1 to rescue mode and do the following.

sfdisk -d /dev/hda > MyPartitionTable.txt

Remove the initial error messages, then do

cat MyPartitionTable.txt | sfdisk --no-reread -H255 /dev/hda

Please see the article at

http://www.redhat.com/archives/fedora-devel-list/2004-May/msg00908.html
for an explanation of why this works.