The Mini-ITX box powering schmonz.com has been limping through hardware trouble for the last year. I just bought a Mac mini to replace it. Like its predecessor, it will run NetBSD.

Installing NetBSD on PowerPC Macs can be tedious. The install instructions, assuming that an Apple partition map and a small Mac OS X boot partition are needed for Open Firmware 3 machines, explain how to get Mac OS X and NetBSD to coexist on a single disk. I found a post by Matt Thomas showing these assumptions to be false, and have installed NetBSD all by itself as follows.

  1. From another Unix machine, create a small ISO9660 filesystem containing the bootloader:

    mkisofs -r -apple -o boot.iso ofwboot.xcf
  2. Get to an Open Firmware prompt, then boot the NetBSD 3.0 install CD:

    boot cd:,\ofwboot.xcf netbsd.macppc
  3. Escape to a shell and copy boot.iso onto the Mac somehow (I newfs’d a bit of disk and scp’d it there).

  4. Write it to the internal IDE disk:

    dd if=boot.iso of=/dev/wd0c
  5. Go back to sysinst and install NetBSD.

  6. When writing the disklabel, create a 1MB h partition starting at the beginning of the disk, then adjust the a partition to start after h.

  7. Point Open Firmware at the bootloader:

    setenv boot-command " screen" output boot
    setenv boot-device hd:OFWBOOT.XCF;1
    setenv auto-boot? true
    reset-all
  8. Later, if you need to update the bootloader, run mkisofs over the new ofwboot.xcf, then run the same dd command as before, adding the arguments skip=32 seek=32 (this should avoid scribbling over your disklabel).

Thanks to matt and uwe for their help.