*BSD News Article 3962


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel!munnari.oz.au!mips!decwrl!sdd.hp.com!caen!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!unidui!du9ds3!veit
From: veit@du9ds3.uni-duisburg.de (Holger Veit)
Subject: Re: Endless boot cycle- suggestions?
References: <Aug.14.12.34.42.1992.8037@action.rutgers.edu> <45240001@hpycla.kobe.hp.com> <Aug.18.17.41.42.1992.4915@action.rutgers.edu> <1072@galileo.rtn.ca.boeing.com>
Date: 20 Aug 92 16:02:05 GMT
Reply-To: veit@du9ds3.uni-duisburg.de
Organization: Uni-Duisburg FB9 Datenverarbeitung
Sender: @unidui.uni-duisburg.de
Message-ID: <veit.714326525@du9ds3>
Lines: 86

In <1072@galileo.rtn.ca.boeing.com> dmp3592@galileo.rtn.ca.boeing.com (Dean M. Phillips) writes:

>A disk drive which does geometry translation will hopelessly confuse
>386BSD.

Sometimes true, sometimes false. See below.

>Background:

>MessDOS has a hard limit of 10 bits for a cylinder number.  This
>prevents MessDOS from accessing cylinders beyond 1023.  Most large hard
>disks have more than 1024 cylinders.

>So, to make these disks useable with MessDOS, the disk drive
>manufacturers invented geometry translation.  The way this works is the
>drive says that it has more heads than it really does, and less
>cylinders than it really does, so that the total number of sectors
>comes out the same but with less than 1024 cylinders.  When MessDOS
>asks for a particular track, sector, and cylinder, the drive silently
>translates this to the real location.  "Brain damage begets brain
>damage."

Ok

>386BSD gets the geometry and its partition info from the partition
>table and then TURNS OFF GEOMETRY TRANSLATION.  If geometry translation
>was on in the first place, 386BSD will get hopelessly lost, fail to
>find its disk label and panic.

I just wonder why on my Fujitsu 262XT IDE drive both OS/2 and 386bsd live
without any problems. Even the Mtools worked after I told them the 
geometry of my OS/2 FAT+Extd. partitions.
The Fuji is a 420 MB IDE drive with 1001 cylinders, 13 heads and 63 sectors
(written down from memory), but this is certainly translation. The only
thing I did was patching BIOS ROMs such that there is a real drive entry
in it (the Phoenix BIOS I used was so outdated that it had no user configurable
entry :-( but it has at least been proven to be quite bug free for the
last years).

>Solution:

>Make sure that geometry translation is turned off.  I was able to do
>this by running setup, specifying drive type 47 and keying in the real
>number of heads, etc.

Most IDE's take and use the geometry they were told to have when they are 
initialized by the BIOS, but I would not count on this. At least I didn't 
succeed in persuading my Fuji to use a different geometry.
In particular, many IDE drives use zone bit recording to get most out 
of the disks. They have a number of cylinder areas with different 
numbers of sectors. I am quite curious how you enter this information 
in entry 47. Of course, you may take the minimum values, but you will
lose capacity.

>If you don't know what your disk's real geometry is, you can find out
>with a little hacking.  I will post a patch when I get mwrite to work.

>Disclaimer:

>Not all reboot cycles are caused by geometry translation.

Certainly not. I believe that many problems are caused by non-standard
drive commands. Not all the additional IDE commands (published in one of
the latest Byte magazines, anyone has the reference?) are supported by
every drive. For instance 386bsd uses one of these to query the disk 
type which is printed out at boot time. I don't know what a "non-standard" 
drive will do if it does not support this command. Of course, there may be
other incompatibilities.

>On my system, it would still work with geometry translation if I let
>386BSD have the whole disk.  This is because the disk label is located
>on cylinder 0, head 0, sector 2 for both the real and the translated
>geometry.
>-- 
>----------------------------------------------------------------------
>#include <standard_disclaimer.h>
>Dean M. Phillips                                        (206) 393-9333
>Boeing Commercial Airplane Group            dmp3592@galileo.boeing.com

Holger

-- 
|  |   / Holger Veit             | INTERNET: veit@du9ds3.uni-duisburg.de
|__|  /  University of Duisburg  | BITNET: veit%du9ds3.uni-duisburg.de@UNIDO
|  | /   Dept. of Electr. Eng.   | "No, my programs are not BUGGY, these are
|  |/    Inst. f. Dataprocessing |          just unexpected FEATURES"