*BSD News Article 67617


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.bhp.com.au!mel.dit.csiro.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!serv.hinet.net!nctuccca.edu.tw!howland.reston.ans.net!swrinde!newsfeed.internetmci.com!news.mathworks.com!fu-berlin.de!zib-berlin.de!news.tu-chemnitz.de!irz401!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Western Digital 2.5GB IDE HD doesn't work under FreeBSD !
Date: 3 May 1996 16:31:58 GMT
Organization: Private FreeBSD site, Dresden
Lines: 51
Message-ID: <4mdcdu$hqu@uriah.heep.sax.de>
References: <aak2.830530576@ra.msstate.edu> <4m3dua$3db@uriah.heep.sax.de>
  <4m56qj$nc@anorak.coverform.lan>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6

brian@awfulhak.demon.co.uk (Brian Somers) writes:

>: What are ``the right parameters'' in your book?
>
>The ones printed on the label on the undercarriage of the disk.

So that is not what you are supposed to tell FreeBSD (unless it's
incidentally the same as your BIOS uses).  Btw., unless these ``right
parameters'' look like:

	cylinders:         2453
	heads:             15
	sectors per track: 28 ... 45

youre drive's label is most likely lying.  (And if they look like in
my example, how do you enter them into any fdisk editor? <g>)

Your ``right parameters'' are just one possible translation, the one
the vendor recommends (since hopefully it will result in only a
minimal number of blocks being wasted due to transforming the actual
number of blocks into a plain C/H/S scheme).

>One thing I don't understand.... If I say that the drive has 15 sectors,
>37 heads and 102 tracks, and this works controller-wise, does that mean
>that the OS tells the controller the geometry that it wants to use ?

Yes.  Traditionally, all BIOSes try to read the very last sector of
the drive during disk initialization, just to see if the parameters
would fit.  The disk recomputes the intended geometry out of the C/H/S
values provided in this command, and remembers this one during the
session.  It then calculates all C/H/S values presented at the WD-1007
register interface into logical block numbers, and maps these logical
block numbers to the physical location on the disk (which is not only
recomputing the physical C/H/S values, but also involves bad sector
replacement).

The only requirement is that the C/H/S limits told to the BIOS
multiply up to not more than the total number of blocks on the disk.
There's usually always a small difference between both, and these
blocks are unusable in a system that thinks in C/H/S terms.  (For SCSI
disks, FreeBSD can use the entire disk, since it doesn't use the C/H/S
model, and since it's possible to ask the disk about its total number
of blocks available.  This will only happen in ``dangerously dedicated''
mode.)

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)