Subject: Re: adding extra hard disk (cont.)
To: Rick Copeland <rickgc@calweb.com>
From: John F. Woods <jfw@jfwhome.funhouse.com>
List: port-i386
Date: 06/24/1997 11:59:13
>        1. Does the disktab file have to reflect the drive parameters of the
> currently installed drive?

If you use a prototype file instead of a disk-type, then /etc/disktab does
not have to reflect the drive parameters of a drive you want to label.
However, *something* has to contain parameters for the drive.  But see
below:

>        2. If it is required to have such a listing for the second drive I
> am trying to install how would I write it?
>              These are the parameters for my second drive I am trying to
> install:
>              a) Maxtor SCSI type 7345, 2220 cyl, 4 heads, 76 sectors.
>              b)The disktab wants: tracks/cylinder and
> sectors/track where do I get this information?

OK, *if* the information given were correct, then disktab would want to
be told 4 tracks per cylinder (one head per track), 76 sectors per
track, and 2220 cylinders.  (give it a disk type name of M7345SC or
something like that.)

However, there are two things to note:  first, that geometry is probably
not correct:  most disks now have different numbers of sectors per track
(I think they usually report the number for inner tracks, or an average
figure, one or the other), so it turns out to be impossible to accurately
describe the geometry with BSD disktab.  Second, if you want to use DOS
partitioning on the disk, you'll almost certainly need to use the fictitious
geometry enforced by most DOS SCSI interfaces (64 tracks per cylinder, 32
sectors per track, one cylinder per binary megabyte of capacity).  You do
not need to worry about this last issue if you want a pure NetBSD disk,
but it turns out that I label all *my* disks with this ficticious geometry
just so I don't have to worry about it.  (That may be costing me some
performance, at least on the portions of my disks where the BSD geometry
would agree with reality, and someday I might even have time to experiment
with it to find out how much...  considering that the BSD geometry *also*
has to lie about portions of disks, it's unlikely to be as much as one might
think.  (I hope. ;-) )

> I would assume from the disklabel man page that the proper command to
> deisklabel the drive would be:
>         disklabel -w sd1 (name of drive)
> Is this correct?

You may also want to use the "-r" flag.  (I always use it, but I haven't
labelled a bootable disk in a LONG time, so if I'm fouling things up with it,
I haven't noticed.)  You can also stick individual descriptions in prototype
files (which, frankly, I prefer because they're more readable), and use
	disklabel -R [-r] sd1 /path/of/proto-file

You can get a skeleton prototype file by using

	disklabel sd0 > /tmp/proto

then edit appropriately.