A while back I got the idea in my head that I needed a fileshare for my classic Macintoshes. The move to HTTPS in recent years has left ancient browsers out in the cold for hitting classic software repositories like Macintosh Garden which meant I needed to either suffer the pain of heavy browsing in Classilla on my iMac G4 or download files on a modern machine that the Macs could get access to. Initially I thought a simple FTP server would suffice. Though FTP got the job done more or less, FTP clients such as Fetch would freeze on >100MB downloads on my older machines like the Quadra 630. FTP just wouldn’t cut it. I needed a proper AppleTalk fileshare.
My first attempt at an AppleTalk fileshare involved Ivanx’s A2SERVER project. I attempted to install and configure this project on both a VM running Ubuntu 16.4 LTS and my RaspberryPi running Raspbian Jessie. In both cases I could see the fileshare on my modern iMac running El Capitan, but not from MacOS 9 on the iMac G4 or MacOS 7.6 on the Quadra. Digging deeper I realized the A2SERVER was probably a bit more than I needed. What I really needed was the AppleTalk core of A2SERVER, Netatalk, to work correctly on my Pi.
More recent versions of Netatalk – the 3.x branch – dropped support for classic Mac AppleTalk filesharing over ethernet. To get a Linux machine to share files with a classic Macintosh you need to get the 2.x branch of Netatalk up and working. This is no easy feat. If your distro does include Netatalk 2.x it most likely does not include classic AFP support. Netatalk will need to be compiled with AFP support enabled.
If you search the Internet you will find many guides explaining how to compile Netatalk 2.x and configure it so that you can share volumes with classic Macintoshes. The only problem is that most of these tutorials are several years old and just don’t work on modern distros. Cups versions past 1.5 cause build issues and there is a bug in the compile script – at least in 2.1.6 – that requires manual compilation of ACL. After much trial and error I was able to get Netatalk 2.1.6 to compile and run correctly on Raspbian Jessie running on a RaspberryPi B. I did this by following Apple Fool’s great tutorial with a few modifications to explicitly exclude printing support, Bonjour support, and to compile ACL.
How to Compile & Configure Netatalk 2.1.6 on Raspbian Jessie
The below instructions will take you step-by-step through setting up an AppleTalk fileshare on a Raspberry Pi connected via ethernet to your LAN. Steps 1 through 6 are my own additions to modernize Apple Fool’s tutorial. From steps 7 to 16, I am riffing on Apple Fool’s tutorial, adding additional clarity where I can.
Download netatalk-2.1.6.tar.gz source
Install libraries recommended by Apple Fool with the addition of several other packages not included in the Rasbian Jessie mini distro
sudo apt-get install libavahi-client-dev libcups2-dev libdb-dev libssl-dev libacl1-dev libopenafs-dev gawk libltdl-dev libltdl7 autoconf libgcrypt20-dev libgcrypt20 cracklib-runtime libpam-cracklib lsof procps rc quota texinfo coreutils cdbs autotools-dev devscripts debhelper dh-buildinfo libwrap0-dev libpam0g-dev libkrb5-dev libltdl3-dev libgcrypt11-dev libcrack2-dev libldap2-dev d-shlibs hardening-includes -y
tar -zxvf netatalk-2.1.6.tar.gz
Enter netatalk directory
Configure Netatalk for compilation
./configure --enable-debian --sysconfdir=/etc --with-uams-path=/usr/lib/netatalk --with-ssl-dir=/usr/lib/ --disable-cups
sudo make install
Create the RetroServe directory in your user’s home directory.
Open the netatalk configuration file
sudo vi /etc/default/netatalk
Find the line
ATALKD_RUN=noand change the
yes. Save your changes. (Esc, :, wq, Enter)vi commands
Add the RetroServe directory to the list of directories to be shared.
sudo vi /etc/netatalk/AppleVolumes.default
Scroll to the end of the
AppleVolumes.defaultfile and find the
~near the end. Replace the
~with the following line. Save your changes. (NB: Apple Fool reports the possibility of needing to add
volsizelimitproperties to the end of the share path for System 7.5.3 and earlier.)
Open the AFPD configuration file.
sudo vi /etc/netatalk/afpd.conf
Configure AFPD to accept all the supported authentication protocols and to allow the Classic Mac OS user to save their password. Add this line to the bottom of the
afpd.conffile. Save your changes.
- -transall -uamlist uams_clrtxt.so,uams_dhx.so,uams_dhx2.so
Open the ATALKD configuration file to configure your networking preferences.
sudo vi /etc/netatalk/atalkd.conf
Go to the bottom of the file and add the following line. Save your changes. (NB: This assumes you are using an ethernet connection. If not, please reference Apple Fool’s tutorial.)
eth0 -phase 2 -net 0-65534 -addr 65280.163
Start Netatalk with your new configuration settings. (NB: You will need to run this each time your Raspberry Pi is restarted. Investigate your own method to automate this.)
sudo /etc/init.d/netatalk start
Configure Your Classic Macintosh to Connect to an AppleTalk Network Share
Open the Chooser and click on “Server IP Address…”
Enter the IP address of your Raspberry Pi and click “OK”.
Select “Apple Standard UAMs” and click “OK”.
Enter the username and password for the Raspberry Pi user you compiled Netatalk with. Click “Connect”.
Select “RetroServe” — or whatever you named your share —, click the checkbox, and select “Save My Name and Password”. Click “OK”.
Your share is now mounted to the desktop.
You Might also Want FTP
sudo apt install ftpd
There is no step 2.