View Single Post
  #1   (View Single Post)  
Old 22nd February 2016
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default OpenBSD automatic disklabel allocation

From disklabel(8):

Code:
     A template for the automatic allocation can be passed to disklabel using
     the -T option.  The template consists of one line per partition, with
     each line giving mountpoint, min-max size range, and percentage of disk,
     space-separated.  Max can be unlimited by specifying '*'.  If only
     mountpoint and min size are given, the partition is created with that
     exact size.

           /               250M
           swap            80-256M 10%
           /tmp            120M-4G 8%
           /var            80M-4G  13%
           /usr            900M-2G 5%
           /usr/X11R6      512M-1G 3%
           /usr/local      2G-10G  10%
           /usr/src        1-2G    2%
           /usr/obj        1.3G-2G 4%
           /home           1G-*    45%
Such a template can be used when doing automatic OpenBSD installations (autoinstall(8))

After some experimentation I came up with the following minimal template that I used for a pxe booted virtualized OpenBSD autoinstall under Linux KVM:

Code:
/               100M
swap            180M
/tmp            200M
/home           2G
/var            500M
/var/log        200M
/usr            1G-*
The result on a 8192 MB (8 GB) disk:
Code:
root@kvm[~]df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd0a     98.3M   52.1M   41.3M    56%    /
/dev/sd0e      2.0G   10.5M    1.9G     1%    /home
/dev/sd0d      197M    8.0K    187M     0%    /tmp
/dev/sd0h      4.8G    413M    4.1G     9%    /usr
/dev/sd0f      492M    4.7M    463M     1%    /var
/dev/sd0g      197M   28.0K    187M     0%    /var/log
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump

Last edited by J65nko; 7th November 2016 at 09:38 PM.
Reply With Quote