Subject: Re: Adaptec disk geometry!!!
To: Robert.V.Baron <rvb@gluck.coda.cs.cmu.edu>
From: Frank van der Linden <frank@wins.uva.nl>
List: tech-install
Date: 01/27/1998 16:48:59
On Tue, Jan 27, 1998 at 10:11:00AM +0000, Robert.V.Baron wrote:
[...]
> BUT if you tell netbsd you have a cylinder of 255
> heads and 63 sectors, newfs pukes. (You need blocks > 8K and larger
> frags to support this.) What I do in this case, since this is all
> make believe anyway, is say I have cylinders with 51 heads (255/5)
> and 63 sectors/track. I then multiply the number of cyls and cyl
> offsets by 5. It all works well.
To avoid confusion to others: this is the geometry specificied in the NetBSD
disklabel, used as soon as NetBSD has booted. You can basically set this
to most anything you like with a SCSI disk, as long as it gives you the
right total number of sectors (or less, if you wish).
The problems discussed here when booting, come from a mismatch between
the geometry that the controller's BIOS uses, and the one that was
used to specify the MBR. This geometry is only used when booting,
because you need the BIOS to do the initial stages of the boot.
Therefore, you need to verify that the install program is actually
using the cylinder/head/sector values that the BIOS expects when
creating the MBR. pfdisk is one way to get them, sometimes you
can also get them from the controller's BIOS setup. Ideally,
the install program would call the BIOS itself, but this can
be a problem. Another way is to have the bootcode call the BIOS
while it's still in 'real mode', and pass it on to the NetBSD
kernel. This works, but then your next problem is that you
don't have a fullproof way of matching BIOS harddisk #N to
NetBSD {sd,wd} disk #X. Though in some cases it's obvious, i.e.
when you just have one disk. In install program (in combination
with the kernel) should handle this case.
- Frank