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:
- The distro uses the 2.6 kernel
- The distro installer uses parted to repartition the drive
- The installation is done on a large hard drive
- 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:
- kernel 2.6 doesn’t try to give the logical geometry, and gives the physical geometry instead
- 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
- the BIOS sees that the partition table uses a different CHS geometry, and adapts to it
- 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.
Welcome to LinuxBasics.org - The online community that helps people to get Linux installed and running.
During this tour, we will guide you through our website, which has many facets which wait to be explored
The biggest project we are running is our Linux course, based on the LBook.
The book is stored in wiki-format, which enables us to update and correct it as we go.
Discussion for the course is on our Forum
Our Forum is used for discussion of Linux and for questions and answers.
Search the mailing-list that was used prior to the Forum.
The questions and answers from the list are stored in the list's archives in order to help others with the same problems.
Every weekend, we meet to chat in IRC. These meetings are NOT mandatory, but are a nice chance to get to know each other better.
IRC is also a great tool to solve many problems, since it is very quick and easy to ask for more details if you need them.
The tutorials are one of the oldest sections on the LBo-website.
Here you find explanations on how to do specific tasks in Linux. Many of the tutorials were created after a certain problem
has been discussed (and usually solved :) on the mailing-list.
The tutorials are categorized in
In the links section, you find outbound links to other valuable resources.
One of our later additions to the site. We maintain a mirror of the Linux Documentation Project. This is our contribution to the "home of the HOWTOs"
Another later addition is the LBlog which focuses on how to do stuff on the Linux Desktop. It begins with the basics on installing Ubuntu.
Using the integrated site-search, you can search the tutorials, the LBook and all other wiki-pages
Simply type the search term into the box in the upper-right corner of our webpages
As a community, we depend on your feedback and collaboration. So, if you have something to share with others, please contact us. If you have a suggestion for a topic you would like to see covered here, please add it on the Wishlist.
There are many ways to contribute: You can answer questions on the Forum, you can write a complete tutorial or just a step-by-step documentation on how you completed a specific task using linux. Ask questions if the information on this site is not clear, tell us if we got something wrong, spell-check our writings, whatever.
We are looking forward to meeting you at LinuxBasics.org
Anita, Jisao, Sam and Stefan