Re: IDE drives with > 65535 cylinders

From: Guest section DW (dwguest@win.tue.nl)
Date: Tue Jan 18 2000 - 22:14:20 EST


On Wed, Jan 19, 2000 at 11:27:41AM +1100, Tim Potter wrote:
> Hello. I've got a couple of IBM 35.7 GB DeskStar IDE drives which
> seem to confuse Linux and fdisk as they report >65535 cylinders when
> probed.
>
> hde: IBM-DPTA-353750, 35772MB w/1961kB Cache, CHS=72680/16/63
> hdf: IBM-DPTA-353750, 35772MB w/1961kB Cache, CHS=72680/16/63
> hdg: IBM-DPTA-353750, 35772MB w/1961kB Cache, CHS=72680/16/63
>
> Now fdisk gets really confused as the HDIO_GETGEO ioctl returns
> (unsigned short)drive->bios_cyl which is equal to 72680 % 65535 = 7145
> cylinders. This is about 10% of the actual drive capacity.
>
> It's possible to use the fdisk expert menu to fool around with the CHS
> settings and create a usable partition, but afterwards fdisk *still*
> gets things wrong with respect to the actual number of cylinders on
> the drive although by a slightly different margin - 8191.
>
> Is there any reason why there is a 32-bit limit on the number of
> cylinders apart from the ATAPI spec? (-: It would be nice to have
> Linux support these drives straight off.

"Linux" is not a well-defined quantity.
You do not reveal what kernel you use. Or what fdisk version.

With a recent kernel and a recent cfdisk, all should be well.

[More precise discussion: 2.2.14 will invent a translation with
255 heads, so that you would see CHS=4560/255/63 or so.
Things should work without any further user action.

2.3.21+ follows a more puristic line, and does not invent translations
when nobody asks for them. You can get one by specifying boot parameters.
You also get one when the partition table suggests you are using one.
Without translation, C will be larger than 65536 and hence cannot be
reported by the HDIO_GETGEO ioctl, as you remark. Fortunately, recent
cfdisk versions do not use that ioctl, so all is well.
Of course the idea is that we want to get rid of everything that
reminds of disk geometry - it is a concept of the past.
Now that HDIO_GETGEO is broken, instead of repairing it we just
eliminate all places where it was used.]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:19 EST