OpenBSD 4.1 on a Macbook Pro
NOTE: This Guide is old. Please see the new guide.
Abstract
OpenBSD 4.1 does not have ACPI enabled in the BSD.RD kernel by default, leading to problematic situations when attempting to use the boot CD’s to load OpenBSD on a Macbook Pro. This document details my struggles and their solutions.
Introduction
Executive Summary
By utilizing emulation software it is possible to install an OpenBSD 4.1-RELEASE instance just long enough to generate a modified Boot-only ISO. This ISO is available for download. It was created using a process almost identical to the script used to build the official boot-only iso’s, except that the bsd.rd kernel which is used for the kernel image has been altered using config(8) to enable ACPI and some names were changed.
Hardware
(1) Core Duo Macbook Pro 2.16ghz with 2GB of RAM.
(1) Recordable CD-R
Software
Mac OS 10.4.9
Q - qemu for Mac OS X ( Homepage )
Files
4.1/i386/*
The Problem
When I booted my Macbook Pro from the CD drive using the cd41.iso I ran into the trouble of the kernel failing to get further than the “rd0…” line. It would just hang there. After some kind help from some of my friends on misc@, I learned that ACPI was to blame.
Emulated OpenBSD
The Q program is a very easy to use version of qemu designed to run on Mac OS X. The GUI allows you to set up a reasonable installation shell for OpenBSD in about one minute. When I created the “PC” in Q on which I would install OpenBSD, I first selected my cd41.iso file as the default CD-ROM Image. I also made sure that Q was going to boot from the virtual CD drive.
However, I also needed a way to install the package sets. To do this, I enabled networking on the PC and also enabled the Mac OS X FTP server. This allows me to simulate an FTP installation from Q.
The installation process is completely straightforward. The only thing different is that you will use the IP address of your machine as the FTP server, and you will need to authenticate. Make sure you use quotes to delimit the packages path if the path has spaces in it.
Preparing for the ISO creation
There were a few files that I needed to retrieve from the i386 directory before I could make a new ISO. These were cdboot, cdbr, and bsd.rd. I grabbed these the same way I grabbed the package sets from my Mac OS X machine into the emulated PC of Q, now running OpenBSD.
$ mkdir cd-dir
$ cd cd-dir
$ mkdir -p 4.1/i386
$ mkdir -p etc
$ cp ~/cdboot ~/cdbr ~/bsd.rd 4.1/i386
$ config -ef 4.1/i386/bsd.rd
…
> enable acpi
…
> quit
…
$
Now you. are ready to make the ISO.
Creating the ISO
These instructions have been adapted from src/distrib/i386/cdfs/Makefile
$ cd ~/cd-dir
$ echo "set image /4.1/i386/bsd.rd" > etc/boot.conf
$ mkhybrid -a -R -T -L -l -d -D -N -o ~/cd41_acpi.iso -v -v \
> -A "OpenBSD 4.1 i386 bootonly CD ACPI" \
> -V "OpenBSD/i386 4.1 ACPI" \
> -b 4.1/i386/cdbr -c 4.1/i386/boot.catalog \
> ./
…
This should create an ISO in your home directory entitled cd4.1_acpi.iso.
The follow through
Once you have created the ISO it is a simple matter of transferring it to OS X via the FTP interface we have been using all along. You can then use the Disk Utility to burn a Macbook Pro-ready boot-only CD for OpenBSD!
NOTES and CAVEATS
I only tested this system up to the install program and a couple of shell programs. I can’t dump OS X yet so I have not done a complete installation. Thus far there are a few notes I can see:
-
•OpenBSD does not support the Intel Audio Controller.
-
•OpenBSD does not yet support the iSight camera.
-
•Function based keys, such as the PgUp and PgDn keys do not work as expected. It seems that in the install program OpenBSD does not recognize the Fn modifier key, or the signals are crossing somewhere.
-
•The documentation on OpenBSD’s ACPI driver warns that some computers may overheat because of a lack of power management and thermal control in the driver. I did not spend long periods of time in OpenBSD to be able to make a call here, but it is something to think about, especially considering how hot these computers get.
-
•BootCamp is installed on this computer, so I might not be experiencing the possible no-BIOS problems that could theoretically occur if someone attempts this procedure without BootCamp installed.