NetInstall the Linux & Docker Way


With Apple having effectively disabled their NetBoot service in macOS Sonoma and newer I decided to try and preserve the service archiving functionality into the future. I have been running a macOS Ventura virtual machine through Parallels Desktop on a Mac mini M1 system, however it was a clumsy solution requiring that a user must be graphically logged into the host Mac for Parallels Desktop to work correctly. In addition to Parallels Desktop having less server like features and functionality in recent releases there is the issue of newer Mac’s potentially being unable to load the Legacy macOS guest machine through their newer hypervisor. The only remaining solution is to move the NetInstall service to BSDPy : referenced by Apple themselves as an alternative to macOS Server at the time it was withdrawn. NetSUS is another option however I have found its NetBoot capabilities to be unreliable on with my test Mac mini. In addition NetSUS runs on Ubuntu 18.04 which is now in an extended support phase which will end in 2028. I am going to demonstrate hosting BSDPy on Ubuntu 24.04 LTS, the current version at this time but with a little help from Debian 12 (Bookworm).

Getting BSDPy

Unfortunately getting started is not as simple as running bsdpy:latest through Docker as BSDPy is very old and uses an old schema which is deprecated, disabled and removed in recent Docker releases, however it can be acquired from within Debian 12 (Bookworm) with its docker.io packages. I suggest installing Debian 12 amd64 either on hardware, virtualisation or even a cloud machine; it is just to download the bsdpy:latest container to be exported for running locally; the Dockerfile hosted on GitHub cannot be built as a container dependency is no longer available.

With Debian 12 installed install the docker.io package and dependencies by:

# apt install docker.io

With the legacy Docker version installed we need to acquire BSDPy which can be performed by:

# docker run -it bsdpy

This will download a local copy of the container. Once the container is loaded do ‘control’ + ‘c’ to exit and end the process.

We will now generate a .tar file that can be archived and run on newer versions of Docker bypassing the v2 schema deprecation:

# docker image ls #to find our container ID
# docker save idfrompreviouscommand > bsdpy.tar

Copy the resulting tar file to the system you want to use, or if you are happy with Debian 12 just skip ahead and configure the service.

Importing the Container into Ubuntu 24.04

Ubuntu 24.04 is supported through to April 2034 making it a good choice on this date to preserve our NetInstall service. Install Ubuntu Server in the network where you will potentially serve NetInstall images to the Mac’s in your museum. I installed Ubuntu into libvirt on my HPE MicroServer running Red Hat Enterprise Linux 10, but VirtualBox can also be used as a cost effective host for your service.

When installing Ubuntu Server I recommend not installing the Docker snap when presented as this will automatically upgrade the Docker version and may prematurely break this old service; I recommend installing docker.io through apt instead. copy the bsdpy.tar file you created to your server then do the following:

$ sudo apt install docker.io
$ sudo docker load < bsdpy.tar
$ sudo docker image ls #to get the ID for the container

Give the container a test run; I will use my containers generated ID in this example:

$ sudo docker run -it c9c28f2b4778

Quit the loaded container with ‘control’ + ‘c’ .

Preparing NetInstall Images to Serve

The BSDPy server can serve up to 5 NetInstall images however works only for intel Mac’s, although there are forks of BSDPy with additional capabilities. NetInstall .nbi folders must not contain spaces the way they could on Mac OS X Server as they will fail to load from BSDPy. Also check for and clear all disabled systems in the NBImageInfo.plist files. In the following example I followed macOS conventions to setup folders:

$ sudo mkdir -p /Library/NetBoot/NetBootSP0
$ sudo ln -s /Library/NetBoot/NetBootSP0 /Library/NetBoot/.sharepoint

Copy your NetInstall images into the NetBootSP0 folder. With the limit of 5 images I chose:

  • Mac OS X 10.6.3 (the earliest intel Mac’s with the Core Duo processor can all run up to this release)
  • Mac OS X 10.7.5 (this is a cutoff point for some intel Mac’s)
  • OS X 10.11.6 El Capitan (as all Mac’s that can run OS X Mountain Lion to OS X Yosemite can run this version)
  • macOS 10.13.6 High Sierra (all Mac’s that can run macOS Sierra can run macOS High Sierra)
  • macOS 10.14.6 Mojave (the final version of macOS that Apple provides a compatible version of System Image Utility for)

It is now time for a final test run of the BSDPy server. You need the IP address of the Docker host and will host on ports 67/udp 69/udp and 80 for HTTP.

$ sudo docker run -it -p 67:67/udp -p 69:69/udp -p 80:80 -e DOCKER_BSDPY_IP=10.0.1.196 --mount type=bind,src=/Library/NetBoot/.sharepoint,dst=/nbi c9c28f2b4778

Go find an Intel Mac from 2017 or earlier and start it holding down the ‘option’ key then try booting form one of the globes. If all went well quit the container for the last time with ‘control’ + ‘c’ then run it like a background service which will automatically load on system boots: you can reboot your system to test this.

$ sudo docker run -d --restart=always -p 67:67/udp -p 69:69/udp -p 80:80 -e DOCKER_BSDPY_IP=10.0.1.196 --mount type=bind,src=/Library/NetBoot/.sharepoint,dst=/nbi c9c28f2b4778

Some Limitations

  • PowerPC Mac’s might not be able to boot from BSDPy; I tried this with my PowerBook G4 with Mac OS X 10.3 Panther, and Mac OS X 10.4 Tiger without success. A fork of BSDPy explains the issues and offers an alternative: https://github.com/ablakely/bsdpyppc/ .
  • When attempting to select a NetInstall image from Startup Disk my test Mac rebooted into a different image.
  • A reliable way to boot the correct NetInstall Image is to boot a Mac holding down the ‘option’ key and select the desired image.
  • BSDPy is doccumented as only supporting NetInstall images and not NetBoot or NetRestore images.

Some Acknowledgments

Thank you to Merlin the cat for keeping me company whilst figuring this all out, and my special human Peter for helping acquaint me with Docker and putting up with my obsessive behaviour likely traits of my Autism experience. Peter’s WordPress site is: https://greenhac.org.uk .