Things I'd do if I ever have time

Wish list

Please help a man further his career by donating expensive hardware. Cash works too.

OpenBSD Minimalist Install

Published: 09/16/2009

I don't profess to be a BSD expert - far from it, actually. However, I've been using OpenBSD for basic infrastructure needs (NTP, syslog, pf, basic routing, httpd, IPsec tunnels, etc.) for a while now and although I have some really minor gripes about it, as a general-purpose server operating platform it is often the first thing I grab off the shelf when the requirements call for something other than Windows.

If you're new to OpenBSD, the installation might feel confusing at first, especially on the partitioning section. There's no fancy GUIs (or text-based GUIs) to guide you through the installation process. However, if you know what you're doing you can get through it in 4 to 10 minutes depending on the options you select. This article demonstrates how to do a slim OS install. The less software code there is on the machine, the less you have to patch and maintain due to the low overall footprint.

The following is an example install log (based on CD media install for i386) on a 4-year old Dell PowerEdge 400SC for OpenBSD 4.5. I set the partitioning in the following manner:

100 MB for /
1 GB for swap
1 GB for /tmp
5 GB for /usr
and everything else for /var

This is just an example. Your server needs may be drastically different. Season to taste.

From start to finish in just a few minutes

Everything in red below will clue you in as to what to type when you encounter the various prompts during install. When you finally finish, eject the CD, and reboot ... you're done. That's it. Windows or Red Hat doesn't install nearly this quick. And when you log in as root for the first time, do a df -h and top and see how much resources are actually used up. Very, very little.

   Show installation screen

Congratulations, you now have a fully-working server in record time.

Keep in mind I intentionally removed a few packages from the default install selection, such as compilers and games. I could have slimmed it all down a little more, but I like keeping man pages handy.

If you happen to screw up in the partitioning section, you can always press ? to see your options. p will display your current setup and d will allow you to delete existing partitions of your choice and start over on the disk slicing.

OpenBSD by default doesn't require much to run. If you have an old Pentium II system with only 64 MB of memory, that will suffice for starters. There will be no complaints about needing at least 256 MB of memory just to install. You can have a perfectly functioning router or firewall with 128 MB of memory or less depending on how many clients are being served, so that 10-year old PII clunker collecting dust in the closet can have some life again.

Some post-install notes: create a new user account to administrate the system with and provide it sudo access:

# useradd -m adminguy
# passwd adminguy
# visudo

    # User privilege specification
    root        ALL=(ALL) ALL
    adminguy    ALL=(ALL) ALL

Then update /etc/ssh/sshd_config so the root account can't log in remotely.

PermitRootLogin no

There's also an afterboot man page which you might want to check out if this is your first time using OpenBSD:

# man afterboot

Update: 09/17/09 - installing the OS for no money down

If you don't feel like shelling out the measly $50 for an official OpenBSD 4.5 CD set, then get the basic installer bootstrap CD ISO (5.5 MB) from:

then burn it to a CD, ensure that your machine has Internet connectivity and can resolve public DNS, then boot from it. You'll be presented with nearly the same options as above. When it gets to the point where it asks you where to install from, instead of selecting cd type in ftp and you'll be presented an opportunity to list the various download locations and select from it. Unless you're on dial-up or some other high-latency Internet connection, installing the OS shouldn't take long at all.

Go back to the main articles list.