So. I was to install OpenBSD on the two new gateway-machines today. The plan was to use a USB-stick to boot from, but this turned out to fail miserably. A few Google-searches later, and I was ready to try to boot via the network using PXE. It was quite easy, actually.
Connect a network-cable between en0 on the Mac (normal, physical ethernet), and an interface on the machine you want to use PXE on. Then you start “Internet Sharing” on the Mac, copy /etc/bootpd.plist to a temporary location (/tmp works fine), and then you can stop “Internet Sharing” again. Open up bootpd.plist, and add the following lines;
<dhcp_option_66</key> <string>192.168.2.1</string> <key>dhcp_option_67</key> <string>pxeboot</string> |
Copy the file back to /etc (so that you have /etc/bootpd.plist). Then you set a static IP on the en0-interface; 192.168.2.1/24. You’ll also want to setup a TFTP-server on the Mac, but I won’t go into details here. We’ll assume that you have set the TFTP-root to /TFTP. In /TFTP you’ll need two files; bsd.rd and pxeboot — both is available on all of OpenBSDs mirrors (http://ftp.ini.uzh.ch/pub/OpenBSD/4.8/amd64/ in my case).
Then start the BOOTP/DHCP-server;
joachim@keklolwtf: ~ $ sudo /usr/libexec/bootpd -DdSv -i en0 bootpd[18136]: server starting |
That’s it. When PXE loads, you’ll have to manually enter “bsd.rd” at the prompt.