SETI Forum | Linux Forum

Site Navigation:

Get Firefox!

Linux

Dual Booting Linux and Windows

There are a number of ways you can dual boot Windows and Linux. Both Operating Systems can be on the same hard disk, or they can be on separate disks. You can use one of the Linux boot loaders (Lilo or GRUB) or you can use the Windows boot loader to control the boot process. These different procedures are described in detail below.

Note

Important: There is a bug in the way Linux 2.6.x kernel versions (for example, Fedora Core 2, Mandrake 10.0, SuSe Pro 9.1) write the MBR that may leave your Windows partition inaccessible . The problem stems from the different ways in which Linux and Windows writes the disk geometry to the partition table and is manifested when the Linux installation partitioning tools update the partition table after creating the Linux partitions during the installation process.

The original bug was reported for Fedora here. SuSe also has a page describing the problem here. About the best description of the bug I have seen to date, how to prevent it and how to recover from it are detailed here. The main issues and details on how to prevent the bug are summarized below.

SuSe summarizes the problem as follows:

The partitioning tool parted , which YaST uses during the installation, may write an incorrect partition table. The problem occurs if
  • the BIOS and Linux "see" different disk geometries AND
  • the Windows partition is larger than about 8 GB (more precisely: if the first hard disk partition ends on cylinder 1024 or beyond this point).
When the system is booted, Windows may use the values in the partition table, which causes a failure.

Solutions to prevent the issue

This would suggest a number of possible solutions to avoid the issue when installing Linux in a dual boot setup with Windows.
  1. Change the disk access mode in the BIOS to LBA, not AUTO, to ensure both Windows and Linux see the same disk geometry.
  2. Ensure that the Windows system partition does not pass cylinder 1023 (making it about 8 GB in size).
  3. Manually pass the correct disk geometry to Linux when booting the initial Linux installation.

You can establish the correct disk geometry by booting from the Fedora rescue CD and issuing the fdisk -l /dev/hda command as root:

# fdisk -l /dev/hda

Disk /dev/hda: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Then, boot the Linux installation CD and start the installation passing the C,H,S disk geometry to the installer with the following command (obviously you need to substitute your own values for C,H,S here) and proceed to set up your dual boot system according to your preferred method:

linux hda=10011,255,63



Methods for Dual Booting Linux and Windows

Please check out my new site, www.pendre.co.uk, offering IT consultancy in Pembrokeshire. We specialize in spam-free email hosting and other custom Linux solutions.