Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Mar 1997 09:44:21 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, dgy@rtd.com
Cc:        hackers@freebsd.org, helbig@MX.BA-Stuttgart.De
Subject:   Re: wd driver questions
Message-ID:  <199703162244.JAA17242@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> No, the probed geometry is used for everything in the driver.
>
>Yes, that's what it appears to be.  Except that the BIOS geometry is
>used during boot (at least in the 2.1 stuff).

Booting is not part of the driver :-).

>> The geometry read from the label is not used by the driver (except in
>> `#if 0' code).  It is normally only used by fdisk.  newfs ignores it by
>> default.
>
>How does fdisk use it?  Just to determine where cylinder boundaries
>exist?  (i.e. so partitions are an integral multiple of cylinder size?)

fdisk presents it as a default if the disk doesn't already have a
(reasonable) partition table on it.  This seems to mainly confuse
users :-(.  It later uses the geometry that the user set or accepted
to write the CHS values.  Garbage geometry -> garbage CHS values ->
unbootable partitions and probably a different garbage geometry for
the default next time.

>> The BIOS geometry is not used either, except in some kludgy cases
>> involving drives that don't report their geometry (old MFM drives).
>
>Again, the IPL stuff comes from the disk using the BIOS/"system ROM"
>geometry, right?

What's IPL?  No, FreeBSD doesn't use the geometry reported by the BIOS
except to print a table of BIOS geometries when it is booted with -v,
and in some kludgy cases (see above).  It doesn't know the correspondence
between BIOS drives numbers and FreeBSD drive names, so it can't look up
its table of BIOS drive geometries to get the BIOS geometry (if any)
corresponding to each FreeBSD drive.

>No one (with the exception of fdisk?) *should* need to know the real
>geometry, right?  And, it could possibly be argues that fdisk/newfs
>only "need" to know it for "performance" reasons, right?

Yes.  No/yes.  fdisk needs to know if for constructing bootable MBRs.

Bruce



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