Skip to content

Instantly share code, notes, and snippets.

@cellularmitosis
Last active October 31, 2022 00:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cellularmitosis/07177abbe5753bc59916931733c1fec0 to your computer and use it in GitHub Desktop.
Save cellularmitosis/07177abbe5753bc59916931733c1fec0 to your computer and use it in GitHub Desktop.
Installing OpenBSD 6.6 on a PowerPC eMac

Blog 2019/11/22

<- previous | index | next ->

Installing OpenBSD 6.6 on a PowerPC eMac

I recently picked up a PowerPC eMac off of eBay, with the idea of having another platform to target while learning to write a compiler.

emac-openbsd

I thought I'd try throwing OpenBSD on it!

Installer CD

Download http://cdn.openbsd.org/pub/OpenBSD/6.6/macppc/install66.iso, burn it and boot from it.

Follow the install prompts. I went with the defaults (MBR partition table, all of the distribution packs, etc).

It doesn't boot!

When you reboot, your mac will likely not boot (you may see a gray screen with a small folder icon in the center).

To solve this, you need to configure your mac's Open Firmware to boot your new OpenBSD install.

Reboot and hold down Command-Option-O-F to access Open Firmware (note: I was unable to do this using a Matias Mac keyboard -- I had to switch to an Apple keyboard).

setenv auto-boot? true
setenv boot-device hd:,ofwboot
reset-all

It boots but eventually ends up at a black screen!

I believe there's an issue with X11 on my (nVidia) eMac.

Hit Control-Alt-F1 to switch out of X11 to a terminal.

I can't install anything!

pkg_add fails:

# pkg_add vim
https://cdn.openbsd.org/pub/OpenBSD/6.6/packages/powerpc/: no such dir
Can't find vim

32-bit PowerPC pre-built binary packages do exist for 6.5, but it appears this was dropped for 6.6.

However, you can still build software from source, using the "ports" system.

Setting up ports

Grab a ports tarball:

# cd /tmp
# ftp http://cdn.openbsd.org/pub/OpenBSD/6.6/ports.tar.gz
# cd /usr
# tar xzf /tmp/ports.tar.gz
# rm /tmp/ports.tar.gz

Create /etc/mk.conf:

WRKOBJDIR=/usr/obj/ports
DISTDIR=/usr/distfiles
PACKAGE_REPOSITORY=/usr/packages

Now install a port:

# cd /usr/ports/editors/vim
# env FLAVOR=no_x11 make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment