Subject: disktab entries
To: None <port-vax@NetBSD.ORG>
From: Chris Quayle <icq@dial.pipex.com>
List: port-vax
Date: 03/04/1997 11:46:16
On Monday 3rd March, Rick Copland wrote, re disktab entries:

> There is of course something I am missing here, could you
> fill me in? 

Hope Ragge won't mind if I jump in here...

Coming from a dec vax environment before unix, the whole idea of
partition tables seems a little anachronistic anyway. You end up having
a fragmented disk before you even start to do anything with it... Thus,
I usually set up the number of partitions for a disk to be as few as
poss. Assuming a large disk, a typical layout might be:

        partition a = 64 megs           root
        partition b = 64 megs           swap
        partition c = the whole disk
        partition g = c - (a + b)       /usr

If you have only a small disk / memory system (<= 16megs), root and swap
can be made 32 megs or less each to save disk space and if you have a
lot of user accounts, you may also want to set up a separate /home
partition. The main thing is that most of the space should go to /usr
for max flexibility. This means that all the good stuff you add to the
system can have plenty of room to grow in /usr/local.

Here, NetBSD was set up on Vax using an RF71 and KFQSA, (RF71 not in
disktab) with no idea of total number of blocks. So, first boot VMS, log
in and do a:

show dev/full dua0:

and you get a whole screen full of data describing the device. One of
the edlabel needed values (I forget which) is not listed, but can be
calculated from the rest of the data. VMS says RF71 has 781440 x 512
byte blocks total. Decide a layout, for example:

partition a = 64000   ~32 meg root
partition b = 64000   ~32 meg swap
partition c = 781440  whole disk
partition g = 781440 - (64000 + 64000) = 653440  /usr

Run edlabel, pluggged in the following values:

bytes /sector   512
sectors / track 37
tracks / cyl    16
sectors / cyl   592     (37 * 16, I think this was the value not listed
by
VMS)
cylinders       1320

partition a offset      0
blocks                  64000

partition b offset      64000
blocks                  64000

partition c offset      0
blocks                  781440
..
..
partition g offset      128000
blocks                  653440  <--- remainder after a and b allocated

Answer 0 for all the other partition (c,d,e,f,h) questions.

...and that was it. Write the label and install the OS. The main thing
to remember is that there really is nothing magical about partition
tables and you can set the disk up any way you like. The OS reads the
label from the disk on boot to get the disk geometry and could care less
how you have allocated the space, so long as the layout is sensible in
terms of swap space etc.

If you use edlabel, you don't actually need the disktab entry, other
than to find out the overall geometry. On a Sun system, the labelling
process is menu driven using disk names and info from disktab, but with
the capability to roll your own. We don't have that dubious luxury here
as yet though. Adding up _all_ the partitions is meaningless since the C
partition covers the whole disk, irrespective of what you have defined
the rest to be. Adding up all _except_ the C partition should however,
equal the total number of blocks, assuming the whole disk has been
allocated in the table.

Hope all this helps... 

Regards, Chris