[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Fix for the XP dual boot problem

Michal Jaegermann wrote:

The problem is that there is no "wrong geometry".  For quite a while
these "geometries" are just inventions and illusions.  Many years
ago hard disks indeed had all these head and cylinder geometries,
physical ones, but this is a bygone era.  The trouble here is that
here XP invents one geometry and your kernel another and XP refuses
to work with what it decided it likes.  Linux kernel is more
forgiving than that and anaconda should just read what an existing
partition table said and do not bother with any alerts.

Well, not exactly. What I call "wrong geometry" is when the two values (physical and logical) don't match. I know the same disk can be seen as having different geometries (e.g. 16 heads vs 255) but in the final C*H*S should be the same. As I mentioned in another post I get very different values from the 2.6 kernel, while 2.4 returns the correct ones:

These are examples from FC2:
$ more /proc/ide/hda/geometry
physical     16383/16/63
logical      19841/16/63

On another FC2 machine:
$ more /proc/ide/hda/geometry
physical     16383/16/63
logical      16383/255/63

On a FC1 machine (2.4 kernel) the numbers are ok:
$ more /proc/ide/hda/geometry
physical     155009/16/63
logical      9726/255/63

The product C*H*S should be the same (or close at least)...
But they are different (even for the same OS, not even talking about XP here).

Strictly speaking the bug is on an XP side but you are not likely
fare that well pursuing that.

I agree this may be fixed on the XP side too. But still the installer has a problem. Why will it otherwise offer without any warning to change the mbr, when I did not select any partitioning and I chose to put Grub in the Linux partition. This reminds me of another OS (guess:)) which overwrites mbr on install again without asking.
Plus, there are report on bugzilla of people that did run partition magic after installing FC2 and got a lot of errors (mismatch) in the partition table.
From the fdisk manual, the mbr stores the info in two ways: as an absolute number of sectors and as C/H/S. Windows uses both, while Linux never uses C/H/S. That's why I think Linux can still boot, and Windows not. Only C/H/S are changed during installation. That's why it is also possible to restore the original aprtition table.
Fedora 2 is not the only one affected by it, but also Mandrake 10 and Suse 9.1. See:


So far this post by Alan Cox seems to be the best explanation why this problem occurs with 2.6 kernels:


"This seems to be a bug in the FC2 tools. The Linux kernel no longer
does partition guessing (its a heuristic and policy at best), as a
result the  parted tools should be honouring existing partition table
claims when they are present. Failure to do so causes very bad things
to happen.

Previously these situations the kernel itself would report the
partition table or BIOS guess it made, now its firmly in userspace."

-- Radu

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]