LinuxBasics.org

The community that helps people to run Linux

rss

Lose Windows Boot

Loss of Windows XP boot after Linux Install

When repartitioning a large hard drive under certain circumstances you will lose the ability to boot Windows XP which is installed on the same drive.

Some people are finding that they can no longer boot Windows XP after installing Fedora Core 2. I found a similar bugzilla report for Mandrake 10 and reports of this on SUSE 9.1 as well. There is a combination of ingredients that causes this problem.

They are:

  1. The distro uses the 2.6 kernel
  2. The distro installer uses parted to repartition the drive
  3. The installation is done on a large hard drive
  4. Windows XP is installed on that same drive

What happens to cause the problem? I am not an expert on this, but my understanding of what I’ve read in the bug reports is that this is it in a nutshell:

  1. kernel 2.6 doesn’t try to give the logical geometry, and gives the physical geometry instead
  2. parted (front-ends include diskdrake and disk druid) uses the physical geometry given by the kernel to generate the CHS information during the repartitioning. This CHS information gets written to the partition table
  3. the BIOS sees that the partition table uses a different CHS geometry, and adapts to it
  4. Windows has the previous geometry that it keeps in its boot sector. This no longer works with the changed CHS that the BIOS now provides. The Windows boot fails.

To read the bug reports yourself, see:

Mandrake bug report opened: 2004.02.17 http://qa.mandrakesoft.com/show_bug.cgi?id=7959

Fedora bug report opened: 2004-02-17 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=115980

For information on how to prevent or recover from this problem see “Dual Booting Issues With Fedora Core 2 and Windows: Prevention & Recovery” http://lwn.net/Articles/86835/ This guide should also help with other distros which have this problem. The basic idea for prevention here is to give the drive geometry as a parameter when booting the kernel during installation - for example:

 linux hda=14593,255,63

The guide explains that you can get the geometry using fdisk (Linux version) from a rescue disk. The explanation uses the Fedora Rescue CD, but there are a number of rescue disks available - normally the installation CD itself can function as a rescue disk.

Another page on how to avoid this bug in Fedore Core 2 is at http://www.ces.clemson.edu/linux/fc2.html.

An article on the problem and cure from SUSE’s support pages is at http://portal.suse.com/sdb/en/2004/05/fhassel_windows_not_booting91.html

My thinking is that laying down the partitions before doing the install would solve the problem, but many new users would rightfully just use the installer to do the job and run right into this situation of not being able to boot Windows XP afterwards. fdisk or cfdisk do not read the geometry in the same way that parted does.

Another prevention for this would be to install Linux on a separate hard drive. Even if you install on a separate drive, I would recommend that you do not install GRUB or LILO to the MBR of the disk that Windows is on, because I have seen reports of this geometry still being rewritten in such a case.


Copyright (c) by the authors.
Prior to editing, authors agreed to license their contributions by the terms of the GPL.
See our licensing page for details.


Linux® is a registered trademark of Linus Torvalds.


 
  tutorials/during/lose_windows_boot.txt · Last modified: 2008/07/20 21:08

LinuxBasics.org

Start Linux-Course Tutorials Linux Links Security Blog Forum E-mail List Search Online Chat

Site-Info

Help Get in Touch Making of LBo

Wiki-Control

Powered by

Linux Apache DokuWiki Mailman RUTE ht://Dig