> What we really want to know is how Windows determines the geometry?
> Anyone know?
see http://www.kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.5-rc1
search for "Get Legacy Parameters"
here is a snapshot (hopefully it will be formatted ok
----------------------------------------------------
<ak...@os...>
[PATCH] EDD: Get Legacy Parameters
From: Matt Domsch <Mat...@de...>
Patch below from Patrick J. LoPresti and myself. Patrick describes:
Why this patch? The problem is that the legacy BIOS interface
(INT13/AH=3D08) for querying the disk geometry returns different values
than the extended INT13 interface which the EDD code currently uses. This
is because the legacy interface only provides a 10-bit cylinder field, so
modern BIOSes "lie" about the head/sector counts in order to make more of
the disk visible within the first 1024 cylinders.
Many non-Linux applications, including the stock Windows boot loader, DOS
fdisk, etc., rely upon the legacy interface and geometry. So it is useful
to be able to obtain the legacy values from a running Linux kernel.
What this patch does is to add new entries under
/sys/firmware/edd/int13_devXX named "legacy_cylinders", "legacy_heads", and
"legacy_sectors". These provide the geometry given by the legacy
INT13/AH=3D08 BIOS interface, just like the current "default_cylinders"
etc. provide the the geometry given by the INT13/AH=3D48 interface.
Without this patch, I cannot use Linux to partition a drive and install
Windows, which happens to be my application.
- Pat
http://unattended.sourceforge.net/
In addition, this adds two buggy BIOS workarounds in the EDD int13
calls as suggested by Ralf Brown's interrupt list.
I'm also interested in moving this code out of arch/i386/kernel/edd.c and
include/asm-i386/edd.h, as I believe it is applicable on x86-64 as well.
However, there's no good place under drivers/ to put edd.c when it's not
tied to a bus, but to several CPU architectures and their firmwares...
Maybe a new directory drivers/firmware?
-------------------------------------------------------
especially notice:
"Many non-Linux applications, including the stock Windows boot loader, DOS fdisk, etc., rely upon the legacy interface and geometry. So it is useful"
also notice the header: "changes ... to v2.6.5-rc1"
a detailed explenation (the diff file) is found at:
http://www.zytor.com/pipermail/syslinux/2004-February/003269.html
have a nice day.
|