Subject: Re: NetBSD2.0/sparc not ready for prime time?
To: None <port-sparc@NetBSD.org>
From: Eduardo Horvath <eeh@NetBSD.org>
List: port-sparc
Date: 02/09/2005 22:48:37
On Thu, Feb 10, 2005 at 07:20:51AM +0900, Henry Nelson wrote:
>
> Why did NetBSD's sysinst format the disk differently than Solaris? The
> scsi probe at bootup shows the disk larger than it should be. The initial
> installation before the Solaris format put a disk label with more user
> available sectors than there really appear to be. I also wonder about
> NetBSD reporting the total cylinders, and apparently using them, and not
> leaving 2 cylinders alone as alternates as does Solaris.
NetBSD can use a native disklabel as well as a solaris disklabel.
When the NetBSD disklabel program labels a disk it inserts a NetBSD
disklabel and a separate Sun disklabel for OBP to use. The NetBSD
disklabel is in terms of sectors. The Sun disklabel is in terms
of cylinders, heads, and sectors/track. The Sun disklabel is
quite limited in the size of disk it can describe. Obviously
SunOS uses the native Sun disklabel.
The format utility queries the geometry from the disk. If the
geometry cannot be described in the disklabel (that only has
16-bits for each of the cylinders, heads, and sector/track fields)
it will attempt to do transformations on the geometry in an
attempt to get it to fit. Those operations can result in the
loss of multiple gigabytes of disk space. Basically, you are
likely to lose significant amounts of space on 18GB disks and
above.
The NetBSD disklabel describes partitions in terms of sectors,
and has more than 16 bits to play with, it can describe larger
disks than the Sun label. It can also describe partitions that
do not start on cylinder boundaries. This is a problem since the
Sun label can't and that's what OPB reads to boot.
As far as the alternate cylinders are concerned, I don't believe
they are actually used for anything anymore. They were originally
for bad block reallication on the old IPI disks (I think it was
IPI, it's been so long since I excized that code....) Sun originally
used. But now SCSI and IDE disks do bad block reallocation in
firmware.
Eduardo