This blog is my way of documenting a process I went through to build a gateway that would allow my Apple IIGS to have access to an area of my fileserver (an old 2008 Mac Pro running macOS El-Capitan) using AppleTalk.
I used to have all this working on an uBuntu file server but I recently seized the opportunity to swap it for the silent running Mac Pro that has been collecting dust in my office.
Sadly, some time in the distant past, Apple chose to remove support for AppleTalk from macOS, so you can’t just hook up your Apple IIGS to the network (via the wonderful Uthernet II) and ask GS/OS to connect (using AFPBridge these days) to the Mac like we used to back in the day.
When I was using the uBuntu box, I’d used a package called A2Server to install a version of Netatalk that would allow the fileserver to pretend to be an old Mac supporting AppleTalk over TCP. This worked very well.
There are other flavours of A2Server however they tend to rely on sharing contents of a filesystem (or part thereof) on the local machine. I tried several without much success.
What I wanted was to share the contents of a folder on the Mac Pro to the IIGS. Since I couldn’t do this directly, with some suggestions from the community, I decided to use a Raspberry Pi as a gateway. The Apple IIGS would connect to the Raspberry Pi, and that in turn would connect to the Mac Pro. For the Apple IIGS, it would look like it was seeing files on the Mac Pro.
Connecting the Apple IIGS to the Raspberry Pi
I couldn’t get A2Server to work in this way. A2Server won’t install on the latest version of Raspian because the version of Netatalk it brings in, no longer compiles under the latest Raspian. During my fiddling, I did get A2Server working, but only by finding an oldstable version of Raspian (which right now is Jesse, but that will change) and installing that on the SDCARD first.
Another option was to use a docker image on the Raspberry Pi, kindly provided by fluxo-gs. That worked in so far as the IIGS could see files on the local machine (the Raspberry Pi), but they were read-only. That wasn’t going to be good enough.
What I really wanted was a current version of Raspian with Netatalk 2.2.6 running (you can’t use Netatalk 3.x because the bright sparks that bring us Netatalk decided that the Apple II (and others) community didn’t need to be included anymore; 🤷♂️) that would let the Apple IIGS see the files it’s supposed to.
So, after a bunch of attempts with various versions of Raspian, and toolchains that worked in some part, I settled on finding a version of Netatalk 2.2.6 that would compile on the latest Raspian. I found this via the Netatalk forums where the compilation issues I’d seen with A2Server had been addressed. I grabbed a ZIP of that updated code, and called it netatalk-code.zip.
Connecting the Raspberry Pi to the Mac Pro
The other half of this setup is to get the files on the Mac Pro visible to the Raspberry Pi and placed within the volume being shared with the Apple IIGS by Netatalk.
To do the mount from the Mac Pro, I had two options:
Obviously, my preference was to use AFP, so I spent a lot of time hunting down a version of afpfs-ng that compiles cleanly on the latest Raspian without any issues, like dependencies, etc. afpfs-ng is an AFP client. It also integrates with FUSE so you can setup a mount point with it via the mount_afp command. Don’t try to add a mount point using it in /etc/fstab, as that will just put your Raspberry Pi into emergency mode.
Getting afpfs-ng to compile on the older Raspian versions was way too hard, which was part of why I fixated on using the latest Raspian. That said, it does depend on a bunch of things like FUSE.
Although I got AFP working via afpfs-ng, sadly there are some issues with how it integrates with FUSE that prevents me from mounting the AFP volume at a mount point inside the Netatalk volume. FUSE issues a warning and says to use the “nonempty” option, however afpfs-ng, via the mount_afp tool it provides does not support this option. You can’t just delete all the files within that mount point though because Netatalk is creating stuff in there dynamically as part of it’s AppleTalk implementation.
So I had to settle on using SAMBA. 😔
SAMBA works; it just meant that I had to share the folder from the Mac Pro using SAMBA as well as AFP which is, to my mind, messy. I might have been able to use NFS instead but that would have meant setting up stuff on the Mac Pro that was only achievable via bash scripts (as far as I know) and I was trying to keep the Mac Pro “clean”.
Conclusion
Below are the steps I took to build up my Raspian image. It now boots, starts Netatalk, and after booting, kicks off a @reboot cron job to establish the SAMBA mount point inside the Netatalk volume. The steps marked with an 🍎 are not needed I believe, unless you want to get the AFP via afpfs-ng thing working.
My Apple IIGS is happy; it can see, read, and write files on my Mac Pro, and life goes on.
Steps