Subject: Re: Rototil of sysinst partitioning code
To: None <current-users@netbsd.org>
From: Chuck Yerkes <chuck+nbsd@2003.snew.com>
List: current-users
Date: 06/05/2003 16:02:06
Quoting David Laight (david@l8s.co.uk):
> I've just commited a rototil of the sysinst code that asks for the
> sizes of the netbsd partitions.
> 
> After earlier discussions I've defaulted to 128MB of swap and
> all the rest of the space in "/".
> 
> The default sizes will be different to what they were before.
> In particular I didn't want to change the size of "/" if "/usr"
> is created (it gets hard to know whether the size of "/" had
> already been set - the code is complicated enough as it is!)

Perhaps ASKING how the machine will be used would be helpful.
I *hate* massive / unless it's a disposable machine or its use
is unknown.  >8GB / can be deadly on x86 machines (bios) too.

> The next plan is to do something similar to the partition table
> editor and the mbr table editor - but a bit of feedback would be nice.

 
With respect to folks developing on disposable machines
(recovered with a CD or diskless boot and CVS checkouts),
partitioning is good.

There are several reasons.

I used to never exceed 5GB partitions (8mm 8505 tape size),
but I exceed that now.

Here's a starting point for me:
/           50MB [often RO, but mounted RW as needed by admins]
/dev         2MB MFS (smallest possible) [noexec]
/usr      1000MB (with X)    [readonly]
/var       400MB (logs, var/db, mail queues, etc)   [RW, nodev, nosuid, noexec]
/var/imap 5000MB (IMAP folders for 2 mail horders). [RW, nodev, nosuid, noexec]
/netbsd    LARGE (link targets to /usr/src/ /usr/obj/ and pkgsrc etc).
                  [nodev, nosuid]
/home     varies  [nodev, nosuid]  (home and netbsd could be merged, my /home
                                    is an NFS mount, so speed wants local src)



The BEST solution, IMHO, is to ask the user, generally, what kind
of machine this is to be:
  workstation (small var, larger home)
  development  (lots of /usr inodes perhaps)
  server (lots of room for logs perhaps?)
  other variations

Extra food pellets for being able to do a (DNS?) query on the type
they put in and perhaps overriding defaults with the results of
a TXT lookup.  eg: lookup "workstation" and get (for me in snew.com):
 workstation.snew.com. IN TXT "/-50,SWAP=$MEM*2,/usr-1500,/var-400,/lhome-HOG"

and parse it.  But I dream (I get to, I used to sit at Athena
workstations that are still easier to manage that 2003 machines).


Unix history has given us 
/     for things needed to boot and make the machine run
/usr  (for things too large to fit on the / disk),
/var from Sun (AFAIR) gave us so /usr could be shared over NFS

/home is not always there (sun annoying promotes /export/home on
      non-nfs machines).

Solaris, quite annoyingly, cannot boot single user without network
or /usr being available.  This is, IMNHO, very bad behavior.
(they also put temp files like pipes into /etc - ick)

BSD, by habit, I guess,  puts src into /usr/src and /usr/pkgsrc/.

This is fine, but on a working machine, /usr/ should be static
and changes should be careful and deliberate.

I mount /usr/ readonly and change that only when I need.  Not being
a pedant, this is not true on my build machines most of the time.
It offers a LITTLE security*, it offers a lot of protection against
stupid mistakes.  Having this fail:
   "cd /hmoe/chuck/tmp; rm l*" from as root from /usr/lib/ 
pays for the periodic minor inconvenience.

I mount / readonly for this as well.  I don't want root files changing
without forethought.


Sources can be anywhere.  of the choices of /, /usr, and /var, I guess
/usr makes sense from the traditional perspective.
Me?  I'd rather it be in /home/src and /home/pgsrc as a default.  But
/home is a per system choice.


bottom line:
big / bad.
make /, SWAP /var and /usr at a minimum.