NextStep/OpenStep NFS File Share with a Raspberry Pi

I recently restored a NeXTstation computer — the grandfather of Mac OS X computers (and therefore the great grandfather of iOS). It joins a network of historical Mac computers in my basement, but was woefully disconnected from them. A crude file transfer between a G4 Cube running OS X 10.4 could be established relatively easily using FTP, but I wanted NeXT to really fit into the neighborhood.

Every computer in the house can reach a common file share running on a Raspberry Pi, which serves up a folder over SMB and legacy AFP (AppleTalk), with an ethernet-capable OS 9 machine bridging to the LocalTalk-only Macs from the early days. Unfortunately NeXTStep and OpenStep support neither SMB nor AFP (technically one version of NextStep had a crappy AppleTalk implementation, but not the version I’m running.) What Next did support was NFS — Network File System. And fortunately so does the Raspberry Pi…there’s just a little modification required to make it work with old versions.

Setup your server as Host on the local system first

After following the steps here to enable NFS and establish a share (using the same folder as AFP and SMB), a fellow nerd on Facebook provided some steps to force support for older clients (NFSv2):

  • Edit the file /etc/exports that you made when you enabled NFS, and decorate your share with some less secure options (at your own risk — obviously don’t expose this to the Internet!) I also had to assign an fsid. Here’s what my export looks like:
    /srv/A2SERVER/A2FILES *(rw,fsid=1,all_squash,insecure,sync,no_subtree_check,anonuid=1000,anongid=1000)
  • Edit the file /etc/default/nfs-kernel-server as sudo
  • At the bottom, add the line RPCNFSDOPTS="--nfs-version 2,3,4"
  • Run exportfs and make sure no errors are reported.

On both OpenStep and NeXTStep, you’ll want to set up a Host for your server. This can be done in NextAdmin/ — assuming you’ve already got networking setup. Instructions for setting up the network are here, and Sophie Haskins has a good blog entry about some of the hurdles to NextStep networking.

Important note: Your server should have a matching DNS or Hosts file record, since NFS does a reverse lookup when you try to mount a share.

On NeXTStep 3.3, the GUI was not able to successfully mount the share — I had to do it from the su command line:

  • Launch
  • Type su and hit enter — provide a password if needed.
  • Enter a mount command like:
    mount serverhost:/pathto/yourshare /Net/localmountpoint
  • So, for example, my server is on a Host named NetPi and the shared path is /srv/A2SERVER/A2FILES (since the path is also used by A2Server’s AFP share) and I want to mount it to a local folder on my NeXTstation called NetPi, so my command is:
    mount netpi:/srv/A2SERVER/A2FILES /Net/netpi

If you want this to run at every boot, use as root to add your mount command to the end of the file /etc/rc.local
But be 100% sure your mount command works before you do — this can prevent booting if its wrong. To be on the safe side, include a time-out and limit retries like:
mount -o rw,bg,mnttimeo=8,retry=1 serverhost:/pathto/share /Net/localmountpoint/

In OpenStep 4.2, the GUI did work, and Sophie’s blog shows how to use it. And just as a point of interest, following the same steps to tell NeXT about a LaserJet 4 compatible printer on the Network let’s it print too!

In OpenStep you can use the GUI, in NextStep the command line works best

2 thoughts on “NextStep/OpenStep NFS File Share with a Raspberry Pi

Leave a Reply

Your email address will not be published.