OpenBSD on a Mac Mini

One of the two mac mini's I bought was meant to be an OpenBSD firewall. Reasons for considering a Mac Mini with as a firewall:

Configuring OpenBSD was more or less straightforward—I did run into a couple of "gotcha's" but they were easily overcome with a bit of Googling.

OpenBSD initially only wanted to lay claim to eight gigabytes (of the 40 GB disk). The solution was to run fdisk and change the size of the A6 partition.

The USB ethernet adapter works fine (the Mac Mini only has one onboard ethernet connection, and for a firewall you need two), but there are a lot of apparently spurious errors logged to the console. Since the maximum speed of the cable modem link is only a couple of MB/sec I expect the USB ethernet adapter to hold up fine.

At the end of the installation notes it says you can configure the firmware to automatically boot into OpenBSD:

Autobooting OpenBSD/macppc

It is possible to automatically boot into OpenBSD (selectably into Mac OS) by setting up the following:
setenv auto-boot? true
setenv boot-device hd:,ofwboot

[to save the results into NVRAM]
reset-all

These settings assume that the master of the first IDE bus has OpenBSD installed on it, either in MBR format or in shared mode with ofwboot copied into the first HFS(+) partition. It is not necessary to specify '/bsd' on the boot line or in the boot-device variable, since it is the default.

My experience was that when the boot-device was set just to hd:,ofwboot the computer wouldn't start up. The only way I could get it to work was by setting the boot-device to be hd:,ofwboot /bsd.

Next up: besides a few recommended post-installation steps I'm installing snort, nmap, bash, screen, tcl, expect & squid.


—Michael A. Cleverly

Comments:

  1. tuco wrote (at Mon, 09 Apr 2007, 11:13):

If you want a small, quiet router to run OpenBSD, try a Soekris box ( http://www.soekris.com ). You can put a laptop hard drive in them with an optional bracket kit but a 24/7 router is best run without a hard drive.

  1. Doug wrote (at Sat, 05 Mar 2016, 23:11):

Thanks for this post. Yes it's 2016 and this is still informative. I have a 1.5Ghz G4 MacMini and have installed OpenBSD 5.8 on it, but it won't boot. I tried your option as well (hd:,ofwboot /bsd) but I just get the 'folder face' with a blinking question mark. Other possible ideas?

  1. Roberto wrote (at Mon, 23 May 2016, 04:55):

Ciao from Italy, today 23.05.2016. I am try to do the same steps, but after the install, macmini do no boot with :

hd:,ofwboot

or

hd:,ofwboot /bsd any suggest ?

I am try a dual boot with MacOSX (HFS+), but I fan full format HD (MBR) if required.

Permanent URL for this post: http://blog.cleverly.com/permalinks/216.html