[syslinux] BIOS disk geometry and Linux 2.6

Patrick J. LoPresti patl at users.sourceforge.net
Fri Feb 27 07:34:26 PST 2004


"H. Peter Anvin" <hpa at zytor.com> writes:

> This is odd, because the kernel already does this.  You may want to
> make sure you have enabled EDD support in your kernel.

I had it enabled as a module, but I did not know what it was so I was
not loading it.  I have tried it now, but it did not help; see below.

> If you have EDD support in your kernel enabled, and this happens, I
> think you should file a bug report against the kernel.  This is
> plain broken.

Looking at the kernel source (2.6.3), I do not see where the EDD code
has any influence on the IDE code.

However, EDD does create nodes under /sys/firmware/edd.  In
particular, it creates a directory named "int13_dev80", and inside
that live individual files with the C/H/S values from the EDD data.

Unfortunately, those values are wrong.  They are the same values
returned by the HDIO_GETGEO ioctl, not the values that DOS fdisk uses
when creating the partition table.  (Which are the values the BIOS
actually needs to allow the Windows boot sector to work.)  This is too
bad; if the values were right, I could just do:

  echo "bios_cyl:X bios_head:Y bios_sect:Z" > /proc/ide/hda/settings

...to correct the kernel's notion of the disk geometry at run time.

This is not an isolated problem.  I can reproduce it on two different
systems, a Dell C640 and an IBM T21 (both laptops).

Specifically, when I create the partition table under DOS, the
geometry it uses is */255/63 on the C640 and */240/63 on the T21.
(Note the latter, which implies that always forcing bios_cyls to 255
will not work.)

Under Linux, the values shown by EDD (and reported by HDIO_GETGEO) are
*/15/63 for both systems.

Apparently, BIOSes which do address translation report something
different for INT13/AH=08h than they display in the EDD data.

So I am back to wanting to call INT13/AH=08h (and maybe INT13/AH=48h
too) and passing the results on the kernel command line.

Unless you have another suggestion?

 - Pat




More information about the Syslinux mailing list