I’ll start this off with a disclaimer: this post is really more for my own benefit than the benefit of anyone else.
OpenBSD is my OS of choice when it comes to setting up a quick, simple UNIX-based virtual machine (VM). Need a virtual firewall? Use OpenBSD. Need a router? Use OpenBSD. Need a web server or an FTP server? Use OpenBSD. Need to run some network security tools? Use OpenBSD.
The problem is this: once I get an OpenBSD system up and running, it runs so well that I rarely have to go set up another one. Because there is then this length of time between installations, I always find myself forgetting the steps to take when installing an OpenBSD system. Thus, the need for this post and why I say it’s really for my benefit more than anything else. Next time I need to install OpenBSD in a VM for some reason, I can quickly come back and reference my list. (I will say that the installation of OpenBSD in recent versions has gotten much simpler than it was in the past.)
Oh, another disclaimer is probably necessary here, too: this is not to be considered some sort of “best practices” guide, so please don’t hammer the comments with stuff like “You know, you really should…”. This is just a quick and simple setup.
With those disclaimers out of the way, here’s the installation procedure. This was written for use with OpenBSD 4.6:
- Boot from the OpenBSD installation ISO image. When prompted, choose “i” to install.
- Press Enter for the default keyboard layout (unless you need a different layout, naturally).
- Enter the system’s hostname in short form.
- Enter the name of the network interface to configure. When installing on VMware Fusion 3.0.2 on my Macintosh, the default interface is
em0. On VMware vSphere 4, the default interface is
- Enter the IPv4 address or press Enter to use DHCP.
- Enter the IPv6 address or press Enter to not assign an IPv6 address.
- Press Enter to complete the configuration of network interfaces.
- Press Enter not to perform any manual network configuration.
- Enter and confirm the root password.
- Press Enter to start
- Press Enter not to start
- Enter “no” to indicate that you will not be running the X Window System.
- Press Enter not to change the default console to
- Press Enter not to create an additional user. (I generally prefer to create an additional user after installation is complete.)
- Press Enter to accept the default disk as the root disk. On my Mac running VMware Fusion 3.0.2, the default disk is
- Press Enter to use the whole disk.
- Press Enter to use auto layout of partitions on the disk. (I’m not sure what version of OpenBSD added this feature, but it is quite handy for simple installations.)
- Press Enter to use the CD to install the sets. The CD in the VM should be mapped to the ISO image of the OpenBSD 4.6 install CD.
- Press Enter to use the default CD (which showed up as
cd0on my system).
- Press Enter to use the default path to the sets.
- Remove the X Window System sets by entering “-x*” and pressing Enter.
- Verify that the X Window System sets (
xserv46.tgz) are unselected, then press Enter to complete set selection. OpenBSD will start installing the sets.
- Enter the timezone, such as “US/Eastern”.
rebootto reboot your new OpenBSD VM. You should now be ready to perform final configuration of OpenBSD, such as using
pkg_addto install packages or editing
rc.conf.localto control what daemons are launched at startup. (Of course, those are tasks for an entirely different blog post).
That’s it. Again, this not a best practice/ideal installation. It’s just a “drop dead simple” installation in a VM for when you need to get something done quickly.
Comments are now closed.