Subject: Re: Woops, forgot to CC the list: More disk questions
To: Bill Squier <groo@guinness.cs.stevens-tech.edu>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-i386
Date: 08/14/1997 16:23:08
> However, I still have a couple of questions.  Can someone check me on
> my assumptions:

> 1) The disk has a real, honest to God geometry.  That is, it really
> is organized into a certain number of cyls, has a certain number of
> heads, and has a certain number of sectors per track.  (I hope at
> least _this_ is true :) )

Sorry. :-)

The disk probably does have "real" cylinder and head counts; they
correspond to physical reality.  But if the disk is at all modern, it
probably does not have any single sectors-per-track number; on almost
any disk nowadays the sector count varies with the cylinder number
(outer cylinders have more magnetic material per disk revolution
available, so they store more bits there).

If you're using IDE/EIDE, I _think_ addressing demands that the disk
pretend to have a fixed sectors-per-track value, but if it does I'm
quite sure it's just pretense.  (A SCSI disk is just a big linear array
of sectors anyway; the only pretense involved there is what the OS
imposes on itself - like geometry information in disk labels.)

> 2) The controller talks to the physical disk using these parameters.

> 3) The BIOS provides geometry translation so braindead operating
> systems can access the disk.

I think these are true, but it's rather out of my area of expertise.

> It seems to me that all three of these can't be true.  If they are,
> why can't an operating system update eliminate all the geometry
> translation nonsense?

As I understand it, compatability with old OS versions demands that the
BIOS do the fakery; with the BIOS doing that, OSes have to deal with
it.

> Secondly, why is it that 

> 1) On a label pasted on the top of the disk, it says 1416 cyls, 16
> heads, 63 spt
> 1.5) www.wdc.com says the Caviar AC2700 has 1416/16/63
> 2) The BIOS says 1416/16/63
> 3) NetBSD says 1416/16/63 when it asks the drive
> 4) pfdisk claims 707/32/63

> What's pfdisk know that the manufacturer doesn't?

Probably, I would say, that some OSes have trouble with cylinder counts
over 1023 (or is it over 1024?).  So someone is lying - maybe the BIOS
is fudging the values returned by the call pfdisk makes?  Or by pfdisk
do you not mean some DOS-level program that would use BIOS calls to
access the disk?  That's pure guesswork....

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B