Subject: Re: adding extra hard disk (cont.)
To: Rick Copeland <rickgc@calweb.com>
From: Joel Reicher <void@yoyo.cc.monash.edu.au>
List: port-i386
Date: 06/25/1997 01:53:57
On Tue, 24 Jun 1997, Rick Copeland wrote:

>         1. Does the disktab file have to reflect the drive parameters of the
> currently installed drive?

Depends what you mean by "installed". AFAIK, the disktab is only really 
used to write the disklabel. Once that is done, the disktab can vanish. 
In fact, that's what the install script does (at least on i386). When 
it's asking you for all those parameters, it's creating a disktab that it 
uses to label the disk, and then when you install the etc distribution, 
that disktab gets overwritten, because it's really not needed anymore.

> 
>         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?

tracks/cylinder=heads
sectors is short for sectors/track

Be careful if another OS is sharing this disk. I can't remember the 
conditions under which a SCSI drive is translated,  but it's a fair bet 
that NetBSD will need to use the same geometry as the other OS. If you 
don't have any other OS's, don't worry about translation. Using the 
kernel probed values _should_ work no probs.

The disktab entry is going to look like this:

Whatever names|you|feel like putting|here|and any number of them too:\
	:dt=SCSI:ty=winchester:se#512:nt#4:ns#76:nc#2220:\
	:pa#...... etc.

That first line should probably be something like:

max7345|Maxtor 7345:\

or whatever you think is reasonable. I assumed on the second line that 
the drive is 512 bytes/sector. Mostly a safe assumption AFAIK, but it 
never hurts to check...

The third line is the start of what will probably be a few partition 
descriptions. I'm not sure that these are necessary for the first 
disklabel. Since you're already booting from another disk, and if I'm 
right in thinking only the first two lines are really necessary, you may 
find it easier to just disklabel with those, and then set up your 
partitions with something like a disklabel -e

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

Bingo. The name of the drive used is one of the '|' delimited entries in 
the disktab file for the disktab entry you want to use.


BTW, I could have got some of this wrong. Labelling disks is not 
something I've needed to do very often... :)

	- Joel