...My own configuration
......Creating an OpenBSD partition
......Creating disk labels
...Configure the network
...Select sets
...End of installation

...User management
...Package management
......Pkg add
......Interesting packages


I would like to insist that the OpenBSD Installation Guide is excellent, and it will probably be useful to have it available during your first few installations.

My own configuration

AMD Duron, 192 M RAM, 19G hard disk, Dlink network card, NVidia GeForce 2 video card, OpenBSD 4.0/i386 Getting OpenBSD

Burning the CDs

There's probably a neater way to do it, but this is how I have managed to build my OpenBSD CDs:

  • download and burn on a bootable CD cd40.iso. I usually struggle to make a bootable CD. The installation guide suggests a few tools to do that in case you're lost.
  • on another CD download and burn:
    • bsd,
    • bsd.rd,
    • comp40.tgz,
    • etc40.tgz,
    • man40.tgz,
    • misc40.tgz,
    • xbase40.tgz,
    • xetc40.tgz,
    • xfont40.tgz,
    • xserv40.tgz,
    • xshare40.tgz.

The installation guide explains what those packages (called 'sets') are meant for . Depending on your own needs, you might want to select other sets. The good thing here is those packages aren't huge: if you have a decent Internet connection, they'll be downloaded quite quickly, and everything fits on a single CD.


OpenBSD recognizes foreign keymaps such as the French keymap.


OpenBSD has a quite interesting way to handle partitions . First, you must create an OpenBSD partition (type A6) - this is done with the fdisk utility (directly available from the bootable CD) - then, this partition is subdivided into 'labels' (using the disklabel utility), each label corresponding to a specific mount point or use (/, /usr, /var, swap...). This differs from Linux's view that requires one partition per use (one partition for root, one for the swap, one for home etc) - and actually, I personally find OpenBSD's view neater because the "partitioning details" of a given operating system are hidden within a single global high level partition.

Creating an OpenBSD partition

Perhaps one of the first tricks is to make sure to skip the first disk track . Again, the explanation is in the Installation Guide . If you fail to do this, it is likely the OS won't boot, or there'll be some other 'funny' behaviour... To skip the first track:

  • identify the number of sectors per track on your disk. In the example below, there are 63 sectors per track, and a total of 40001850 sectors (one sector = 512 byte, so this is a ~19G disk)
disk: 1> print
Disk: wd0       geometry: 2490/255/63 [40001850 Sectors]
  • erase unnecessary partitions: this consists in selecting them, and assigning them the partition type 00:
disk: 1> edit 1
Partition id ('0' to disable)  [0 - FF]: [0] (? for help) 0

  • create the OpenBSD partition:
disk: 1> edit 0
Partition id ('0' to disable)  [0 - FF]: [0] (? for help) A6
Do you wish to edit in CHS mode? [n] n
offset ? 63
size ? 10G 
  • You should get something like this:
Offset: 0       Signature: 0xAA55
Starting       Ending       LBA Info:
#: id    C   H  S -    C   H  S [       start:      size   ]
*0: A6    0   1  1 -  1305 107 17 [          63:     20971520 ] OpenBSD
 1: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
 2: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
 3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused

Make sure you have an appropriate active partition (fdisk 'flag' command). Don't forget to save your new configuration ('quit' command)

Creating disk labels

I have chosen a simple layout: basically everything on the root label, and a swap. This is the strict minimum, i.e the OS won't install correctly if there's no mount point for root and no swap. Of course, more sophisticated layouts are recommended: check out the installation guide.

delete a disk label with command 'd' and label's name (a letter). You cannot delete label 'c'. This one is special, it represents the entire disk and may not be deleted.

create a new disk label with command 'a' followed by the label's letter.

> a a
offset: [3069360] Enter
size: 7.7G
Rounding to nearest cylinder: 
FS type: [4.2BSD] Enter
mount point: [none] /
> a b
offset: [3069360] Enter
size: 300M
Rounding to nearest cylinder: 
FS type: [swap] Enter

You should get this:

> p m
#             size        offset  fstype [fsize bsize  cpg]
a:      7577.7M       0  	4.2BSD 2048 16384 328    
b:      300M		7577.7M
c:      19536.8M     0		unused      0     0      
Save changes (quit - not exit !)
> q 

Configure the network

This is quite straightforward: select the appropriate network interface in case you have several, name your host, set up network card options, set the IPv4 address, netmask, DNS server, DNS domain name etc. See the Installation Guide . In my case (using Free), I use dhcp.

Select sets

Select the sets you wish to install: see above , this depends on the sets you wish to install. In my case, the bsd.rd set is found on the bootable CD:

Let's install the sets!
    Location of sets? (cd disk ftp http or 'done') [cd] Enter
    Available CD-ROMs are: cd0.

    Which one contains the install media? (or 'done') [cd0] Enter
    Pathname to the sets?  (or 'done') [4.0/i386] Enter 

    Select sets by entering a set name, a file name pattern or 'all'. De-select
    sets by prepending a '-' to the set name, file name pattern or 'all'. Selected
    sets are labeled '[x]'.

    [X] bsd.rd 

    Set name? (or 'done') [done] done

and the other sets are on the other CD I burned. Note in my case, those sets are burned directly on the root path of the CD, so pathname must be changed to /.
    Location of sets? (cd disk ftp http or 'done') [cd] Enter
    Available CD-ROMs are: cd0.

    Which one contains the install media? (or 'done') [cd0] Enter
    Pathname to the sets?  (or 'done') [4.0/i386] / 

End of installation

The OpenBSD installation is basically finished. It'll ask for a few other questions (do you want to start sshd by default etc), and then, you may reboot the computer (remove the installation CD from the reader).



  • to use dhcp for a given interface: echo dhcp > /etc/hostname.<interface> (e.g /etc/hostname.rl0)
  • to have the DHCP server always provide the same IP address: this configuration concerns the DHCP server. My current ISP is Free . The freebox can be configured to always return a given IP address for a given MAC address. The freebox needs to be rebooted. To get one's MAC address: ifconfig prints it.
  • to restart the network: sh -x /etc/netstart

User management

* use: useradd, usermod etc or directly write to /etc/passwd and /etc/group * you need to be in the wheel group if you intend to 'su root' from your own user account

Package management


You need to be root

    export  PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/4.0/packages/i386
    pkg_add <packagename> (e.g pkg_add emacs-21.4p1-no_x11.tgz)
  This downloads and installs the package from FTP to your host
    emacs-21.4p1-no_x11: complete 

Interesting packages