Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Aug 95 11:43:43 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:  <9508231743.AA04656@cs.weber.edu>
In-Reply-To: <199508230234.MAA31690@godzilla.zeta.org.au> from "Bruce Evans" at Aug 23, 95 12:34:27 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> Physically it is 36 but the controller should report 35...unless this
> form of translation is regarded as a bug fix for the option base 1
> sector numbers :-).  What happens if translation is enabled and the set
> parameters command tells the drive that there are 36 sectors/ track?
> Translation has to slip a sector for each track if translation is to
> work.  I guess the spare sectors should be inaccessible in translated
> mode (you could specify sector 0, but the accumulated slippages stops
> that from being related to a physical sector 0).

The spare sectors are inaccessable in translated mode.

They are also inaccessable (give an error) in non-translated mode IF the
drive was not low level formated not in translated mode.

> >The sparing doesn't actually go off unless you also disable translation.
> 
> Yes it does.  Of course you have to add 1 to the number of sectors in
> the BIOS geometry and in disk labels to use the extra sectors.

Think about this for a second.  The BSD driver uses "LBA" -- or what the
rest of the world has called absolute sector addressing before the DOS
weenies started to pollute the world with their own vocabulary.

Basically, that means that as I linearly traverse the drive space, every
36th sector is just... not there.

> This can be handled by using adjusting the geometry in the smart driver.
> Use a drive table entry with 35 sectors since 35 is all the BIOS can
> normally see.  Use 36 sectors in the smart driver.  Other OS's will have
> problems reading file systems written by the smart driver.

The smart driver has to use geometry itself to translate logical absolute
sectors to physical absolute sectors -- skipping the missing "36th" sector
for each set of sectors.

This  is more information that a driver really want to have to know, and
it may actually be impossible to provide.

> I think all the BSDs used the disklabel values until I "improved" the
> FreeBSD driver in 2.0.5.  This is what the disklabel was for - for
> specifying the final values to be used in case the hardware or BIOS
> values are unavailable or wrong.

The hardware values are wrong, and no matter what disklabel values you
specify, they'll be wrong too, since as soon as I try to read the sector
at offset 35 (option base 0) using the BSD driver, I'm going to get an
error unless the driver (not the controller) translates this into a
request for the physical sector at offset 36 (option base 0) and reduces
the overall apparent drive size by 1/36th.

The question now is how to make the driver do this.  I don't think it's
possible without a lot more crap than we want (or can fit) in the boot
code.

The answer is to reset the jumpers and reformat the drive, so it isn't
necessary.  Or only use BIOS calls, which isn't currently an option.


					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?9508231743.AA04656>