Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Aug 95 18:42:59 MDT
From:      terry@cs.weber.edu (Terry Lambert)
To:        bde@zeta.org.au (Bruce Evans)
Cc:        bde@zeta.org.au, freebsd-hackers@freebsd.org, imb@scgt.oz.au, msmith@atrad.adelaide.edu.au, roberto@keltia.frmug.fr.net
Subject:   Re: Install issues (was: State of the union speech
Message-ID:  <9508230043.AA02605@cs.weber.edu>
In-Reply-To: <199508222335.JAA26750@godzilla.zeta.org.au> from "Bruce Evans" at Aug 23, 95 09:35:53 am

next in thread | previous in thread | raw e-mail | index | archive | help
> >DISABLE perfect media, DISABLE translation, relow-loevel-format.
> 
> This sounds like a trial and error solution to me, and a lot of work.
> Simply disabling alternate sectors (is perfect media the opposite of
> that?) should work provided you get everything to agree about the new
> geometry, but it should be tried last because it creates work.  Enabling
> translation must work if translation works (it certainly works for the
> WD1007V-SE*) and is supported by all drivers, by the definition of
> translation.  The FreeBSD wd driver supports it by issuing a "set
> parameters" command.  This should override the bogus default translation
> iff translation is enabled (*).  All wd drivers that I've looked at
> issue a "set parameters" command.  It's part of the ATA ([E]IDE) spec.
> 
> (*) Translated mode will have too many cylinders.  Be careful not to use
> the nonexistent cylinders.  Use whatever geometry worked in old versions
> of FreeBSD with the same jumper settings.

There is translation and then there is translation.

By default, the WD1007 does both.

The first kind of translation is the C/H/S geometry translation to make
the BIOS happy about big drives.

THe second translation is sector sparing.  Sector sparing is a non-linear
translation mechanism.

Say that I have s=36; now say I have sparing enabled, which steals the
36th and leaves me with an equivalent of s=35 + 1 spare.

The problem in this scenario is that the drive geometry query is going
to return 36, but the hardware will enforce 35.

But the actual will be 36.

So I can't get at the 36th sector from a non-BIOS driver, like in BSD
because the format on the drive won't permit it.

To accomodate this, I have to have the software know that every 36th
sector is inaccessable.  You can see this when "scanning" the drive for
bad144, since every 36th sector will fail the scan.

So effectively, you have a non-BIOS disk access which must access the
disk, pretending every 36th sector does not exist.

Well, even thoguh this is one of the newfs options, it isn't one of
the disklabel options.

So what you do instead is turn off the sparing.

This requires that you reformat your drive.

The sparing doesn't actually go off unless you also disable translation.

So in any case, you will be two jumpers (whatever they end up being) and
a low level format away from accessing the device.

The AT&T SVR4.0.2 wd driver understands ESDI and sector sparing, so it
will work; however, because of the non-linear translation, you can not
install both the AT&T UNIX and DOS on the same drive unless translation
is off because of the way the sparing causes a loss of one sector in 36,
so for n sectors, n> 36, you mistake the partition start by n/36 in the
boot code.

The 386BSD code would work correctly to boot this device because the
386BSD code was not BIOS-based -- the AT&T code isn't BIOS based either,
so it will also work.

The NetBSD code would work for NetBSD releases 0.8 and 0.9.  This is
because they had wierd geometry enforcement code.

More recent NetBSD or FreeBSD requires a low level format, period.

UnixWare, which now uses a BIOS based boot, in part because of my
nagging them about it, also requires a low level format.

What's really needed is ESDI knowledge in the wd driver, only a portion
of what's actually necessary being in the AT&T code, mostly because all
they needed was enough to make the 6368 WGA, 6386E WGS, and StarServer
ESDI drives shipped with the default hardware happy.


Going to a VM86() based "fallback" driver would work because the BIOS
would enforce the C/H/S sector offset translations to physical sectors
to always skip the spare sectors and thus avoif the error.  This isn't
really a good option, though I'd like to have it anyway so that BSD
would run on all 386 and above hardware DOS runs on.

Even with that, the best you could do is disassembling the wdc.com
format code and see how it identifieds the sparing and jumper settings,
or you'd still have to install the software by itself on the drive with
not other partitions present.

In theory, if the sector offsets were translated using the disklabel
C/H/S vs the hardware C/H/S, and you set the disklabel values to
skip sector 36, well then, everything would work -- this is the NetBSD
0.x bogosity that allowed it to operate.


					Terry Lambert
					terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9508230043.AA02605>