*BSD News Article 51053


Return to BSD News archive

#! rnews 5211 bsd
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!fu-berlin.de!cs.tu-berlin.de!sandmann.prz.tu-berlin.de!not-for-mail
From: wolf@prz.tu-berlin.de (Thomas Wolfram)
Newsgroups: comp.periphs.scsi,comp.unix.bsd.freebsd.misc
Subject: Re: PCI 2940 Config (and NCR)
Followup-To: comp.periphs.scsi,comp.unix.bsd.freebsd.misc
Date: 9 Sep 1995 15:45:27 GMT
Organization: PRZ/TU-Berlin
Lines: 82
Message-ID: <42scqn$n65@sandmann.prz.tu-berlin.de>
References: <4298im$h4@trauma.rn.com> <42abn3$mkv@crl.crl.com> <1995Sep3.134248.26342@wavehh.hanse.de> <42f5tp$ca@trauma.rn.com>
NNTP-Posting-Host: apollo.prz.tu-berlin.de
X-Newsreader: TIN [UNIX 1.3 950515BETA PL0]
Xref: euryale.cc.adfa.oz.au comp.periphs.scsi:37421 comp.unix.bsd.freebsd.misc:6006

Hi,

Larry Snyder (larry@rn.com) wrote:
> In article <1995Sep3.134248.26342@wavehh.hanse.de>,
> Martin Cracauer <cracauer@wavehh.hanse.de> wrote:
[...]
> Using which controller to re-fdisk the drive (2940 or NCR) - and second,
> just I keep the "Extended DOS translation for drives greater than 1 GIG
> enabled?"
> 
> >This can be true, but doesn't have to. I can use the same partitions
> >both with NCR and AHA and can boot both by just exchanging the
> >drive. 
> 
> could it be related to the BIOS translation of the disk geometry?
[...]
> I'm beginning to think I need to disable the "Bios translation for
> drives greater than 1 gig" with is by default enabled with the 2940.


as far as I know the problem with 2940 and NCR C/H/S (cylinder/head/sector)
translation is this:
All Adaptec controllers used always a translation based on 64 heads with 32
sectors and computed the number of cylinders accordingly. It's done to keep
DOS happy which is based on the "int 0x13" function of the BIOS for disk
access which was developed in old MFM disk days. 
Unfortunatly this function is also needed to boot the PC, because it's the
only way for any boot loader to access the disks at this stage.

Because disks were very small in the early eighties this function provides
only a very limited range to specify C, H and S. In fact 10 bits for the C,
8 bits for H and 6 bits for S. That means the BIOS interface can only access
a range of 1024 cylinders, 256 heads and 63 sectors (for odd reasons sector
numbering starts with 1 not 0), i.e. cover at maximum a ~8GB disk.
But because Adaptec didn't take advantage of the whole range and choosed a
64 heads/32 sectors mapping the biggest disk the Adaptec BIOS "int 0x13"
implemenation could cover was: 1024 x 64 x 32 sectors = 1GB. That means all
sectors beyond this border were not accessible using the BIOS -- remember
the real disk geometry has nothing to with it, SCSI disks itself provide
only a interface to specify absolute block numbers anyway.
To overcome this limitation for DOS which is depending on the "int 0x13"
interface Adaptec added the "Extended DOS translation for drives greater
than 1GB". I don't know off-hand but I think it's a 256 heads and 32 (?)
sectors mapping active if you enable it.

What does this mean? It means that if you have a disk greater then 1GB and
you want to put a big DOS-FAT partition on it (no good idea!) you have to
enable the "Extended DOS translation".
But if the partition is smaller then 1GB and the rest is used for FreeBSD,
Linux or whatever, you don't need it necessarily. But as I said above even
the boot loaders of 32-bit systems need the int 0x13 in the first place so
a partition you want to boot from should always start below the 1GB assuming
that the boot loaders resides at the beginning of the partition.
But if you partition a new disk greater then 1GB I see no reason to disable
"Extended DOS translation". With that feature you don't have to care about
where to put your partitions -- but I don't know whether it could cause
problems with FreeBSD in some way. I heard of several "geometry-determining"
problems of FreeBSD.

Ok, what about NCR? As far as I know NCR's "SMDS" BIOS has two features.
If it discovers a disk with no partitions on it, it just computes a optimal
C/H/S translation for int 0x13 which fits best and is below the above de-
scribed 1024C/256H/63S limits.
If you partition then this disk with the NCR but you connect it later to
an Adaptec you get a problem because of its different C/H/S mapping. The boot
loaders, probably already the master boot loader, gets totally confused and
loads anything but not the desired OS.
On the other hand the NCR "SMDS" BIOS is in some way smart. If it discovers
a disk which has already a partition table it's able to determine which
int 0x13 C/H/S mapping was active when these partition table was created. 
Instead of using "optimal" values it uses these original mapping.
That means if you partition a disk on an Adaptec and connect it later
to a NCR it should work.


Thomas
-- 
Thomas Wolfram        <thomas@aeon.in-berlin.de>    Germany:    0 30 31421171
PRZ TU Berlin         <wolf@prz.tu-berlin.de>        abroad:  +49 30 31421171
EANTC                 WWW:                  http://www.prz.tu-berlin.de/~wolf
_____________________________________________________________________________
_____S__I__C____T__R__A__N__S__I__T____G__L__O__R__I__A____M__U__N__D__I_____