Subject: diskpart (it was "Re: none" sorry I forgot to include the subject")
To: Lazaro Daniel Salem <SALEM@statoil.com>
From: Lazaro D. Salem <lazaro@online.no>
List: netbsd-help
Date: 05/01/1999 10:25:14
On 30. april 1999 19:00 Perry E. Metzger <perry@piermont.com> writes:
>
>"Lazaro Daniel Salem" <SALEM@statoil.com> writes:
>> I am puzzled with the partition table suggested when running
>> diskpart
>
>The program dates back to the age of supereagles running on vaxes and
>such, and hasn't been maintained. It probably should be revamped for
>the modern age -- right now, it is fairly useless.

Well... the size of the base + usr system has not changed that much in these
years.
(the rcs Id dates ...yes.. from 1993)
Variable size dirs go in var or home (no one pretends "a one size fits all"
solution)

I am not sure is completerly useless. I rather would like to know what
scenario
the folks (at UCB ?) had in mind.

>> Any idea about the correspondence partitions <-> filesystem tree
branches?
>> I could not find many hints in the man page.

neither from reading the source code at
ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/usr.sbin/diskpart/diskpar
t.c

As an example here is a transcript of what I get for my 1001MB disk (on a
hp300 box)

susanita# diskpart Micropolis
Micropolis: unknown disk type, want to supply parameters (y/n)? y
Disk/controller type (SMD)? SCSI
type (winchester|removable|simulated)? winchester
(type <cr> to get default value, if only one)
sector size (512)?
#sectors/track ? 32
#tracks/cylinder ? 64
#cylinders ? 1001
sectors/cylinder (2048)?
Drive-type-specific parameters, <cr> to terminate:
d0?
Micropolis: #sectors/track=32, #tracks/cylinder=64 #cylinders=1001

    Partition      Size  Offset    Range
        a         15884       0    0 - 7*
        b         66880   16384    8 - 40*
        c       2050048       0    0 - 1000
        d         15884  376832  184 - 191*
        e        307200  393216  192 - 341
        f       1349632  700416  342 - 1000
        g       1673216  376832  184 - 1000
        h        291346   83968   41 - 183*

Notice:
1) I have chosen nt=64 tracsk/cyl, ns=32 sectors/track and "nc"=1001 cyls
per unit
so 1cyl=1MB (in the CHS language C=1001, H=64 and S=32) as usually
translated
by SCSI disk controllers on PCs.
From the cylinders "Range" in the last column (cyllinders range) of the
table above
one can easily read the partition size (in MB) as suggested by diskpart.

c= 1001 MB  the whole disk seen by NetBSD
a=7.76MB    most likely for root
b=32.65 MB    most likely for swap
h=143 MB    most likely for /usr  (some pepple call it first /usr :-) "h" is
"sort of physically" before "d"

As of NetBSD 1.3.3 or older the size of this "h" is enough to hold a
complete NetBSD system
(base, comp, text, games, man, misc, xbase, xfonts, xserver, xclients and no
matter port) except for the sources and except the recently introduced
packages system tree /usr/pkgsrc and /usr/pkg).
if thispicture is correct then h can be exported read only to NFS clients.

pause...

Since g= d+e+f only one of the following is possible

IMPORTANT: The following GUESSED use of the suggested partition
layout is less clear to me. So I hope somebody will step in with pointers
to primary sources (I could read
more from the source code of diskpart)

diskpart Option 1:
d=7.76 MB   (/tmp if short of RAM otherwise /tmp is a mem fs and then d
could be used for...?)
e=150 MB    (/var excluding /var/tmp)
f= the rest of the disk (inthis case 659 MB)  maybe /home?

/usr/local, /usr/pkg and /usr/src must within this picture be links.
Obviously it would be impractical to export /home as read only
so directories under it will be in principle less protected
than an ro mounted filesys....

diskpart Option 2:
g = for "large" disks (> 330MB) diskpart assigns to g the rest
of the disk. In my case 816.76MB

Pressumably for  everything that can grow in size with time
(unpredictable) like /home and of course /var and /usr/src
/usr/pkg /usr/local. Either choose /var or /home  in fstab and
the others as links. For example mount g at /var and make /home
a link to /var/users, /usr/src a link to /var/usr_src,
/usr/whatever_can_grow
a link to
/usr/src is a link to /var/usr/src
Mostly






Here is my guess of the layout (I assume that diskpart's authors
had in mind a single disk for at least one of the options) :

option 1:
a+b+h (root + swap + /usr respectively). By this I mean /, /usr and swap
_must_ therefore be in /etec/fstab.
The partition g, which is the rest of this
("big" as of 1993) disk for whatever that can grow with time
what comes to mind is /var and through links from /home and /usr
/usr/src or /usr/local or /usr/pkg or...)

option 2:


a= root      (   7.76 MB)
b= swap      (  32.65 MB)
c=           (1001    MB)
h= /var      ( 143    MB) .....!"h" is "sort of physically" before "d"
d= /var/tmp  (   7.76 MB)
e= /usr      ( 150    MB)      (this gives room for xbase and an  X server)
f= /home     ( 659    MB)
g= /home+/usr/var/tmp  (816.76MB)

output is
Of course one should choose between
option 2:  a+b+h +d +e +f
Sounds this a reasonable guess ?

Notice that there is no offset for the a partition (no place for
bootblock?)
The reason for "h" physically before "d"+"e"+"f"  could be for tuning?
transportability?
-----Original Message-----
From: Perry E. Metzger <perry@piermont.com>
To: Lazaro Daniel Salem <SALEM@statoil.com>
Cc: netbsd-help@netbsd.org <netbsd-help@netbsd.org>
Date: 30. april 1999 19:00
Subject: Re: none


>
>"Lazaro Daniel Salem" <SALEM@statoil.com> writes:
>> I am puzzled with the partition table suggested when running
>> diskpart
>
>The program dates back to the age of supereagles running on vaxes and
>such, and hasn't been maintained. It probably should be revamped for
>the modern age -- right now, it is fairly useless.
>
>> Any idea about the correspondence partitions <-> filesystem tree
branches?
>> I could not find many hints in the man page.
>>
>> Thanks.
>>
>> Lazaro
>