Setting Up Your Mac to be a Linux Netinstall Server

Revive your PowerPC Mac running Linux

So, installing Linux from a CD or DVD didn’t work out for you. I guess it’s time to learn how to turn your Mac into a Linux netinstall server. Grab a couple of Mountain Dews, fill up on Cheetos, and let’s get cracking. There’s a fair bit of work to be done.

Setting Up Your Mac to be a Linux Netinstall Server
When all else fails, you can use your Mac as a Linux netinstall server to get Debian running on your PowerBook (Image Credit: Gergely)

Starting to Set Up Your Mac as a Linux Netinstall Server

This first step is the trickiest part of setting up your Mac as a Linux netinstall server. You’ll need to get macOS’s built-in Tiny File Transfer Protocol (TFTP) server working properly. FTP servers aren’t configured very intuitively in the first place. Apple makes this problem even more profound in macOS.

By default, the TFTP server in macOS hosts all of its files in /private/tftpboot. This is problematic, because that folder can cause permissions and ownership problems. I recommend moving it, but it ain’t that easy. First, you need to disable System Integrity Protection (SIP).

To disable SIP, you’ll have to boot to your recovery partition. You do that by rebooting and holding Option-R during the startup process. When Recovery mode boots, launch Terminal and enter this command:

csrutil disable

Then reboot back into normal macOS. Once logged in, open a Terminal window and issue these commands, one at a time:

mkdir /Users/[username]/tftpboot
chown [username]:staff /users/[username]/tftpboot
chmod a+rx /Users/[username]/tftpboot
chmod u+w /Users/[username]/tftpboot
sudo rm -rf /private/tftpboot
sudo ln -sf /Users/[username]tftpboot /private/tftpboot

These commands create the tftpboot directory, change ownership of the directory to your username and the “staff” group, and then change the permissions to make the directory accessible. Even though we only give your user account write permission, this can be a security concern. Make sure you shut down your TFTP server when you aren’t using it.

Testing TFTP to Make Sure It works

Now, we’re ready to start our TFTP server and test it. Navigate to your tftpboot directory, and create a test file there. Just a plain text document will do nicely for testing. Once created, make sure the permissions are right. From Terminal, issue these commands (assuming your test file is named test).

chown [username]:staff /Users/[username]/tftpboot/test
chmod 666 /Users/[username]/tftpboot/test

To fire up the TFTP server, issue this command:

sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist

Now switch to a directory different from your tftpboot directory, and issue these commands in Terminal.

tftp localhost
get test

You should get confirmation that a file was transferred, and can double-check to make sure it’s your test file. If that’s all good, carry on to the next step. Otherwise, review your ownership and permissions, and make sure everything is set up right.

Now, let’s shut down our TFTP server while we get the rest of what we need. Do this by typing the following command in Terminal:

sudo launchctl unload -F /System/Library/LaunchDaemons/tftp.plist

Getting the Files You Need

You’ll need to download the following files. Most of the files come from the Jessie PowerPC mirror. However, there is something amiss with yaboot, the bootloader we need to boot up Linux on a PowerPC-based Mac, right now, so I’m linking to the version from Lubuntu. I’m not sure why; the yaboot file from Debian worked fine previously, but recently started throwing errors.

I place boot.msg, mini.iso, yaboot, and yaboot.conf in /Users/clefmeister/tftpboot. In /Users/clefmeister/tftpboot/powerpc, I put initrd.gz and vmlinux.

Make sure all of the files have permissions and ownership set properly. See the previous sections for guidance here.

Start Your TFTP Server and Boot Your PowerPC

Now it’s time to start the the Linux netinstall server and begin our Debian installation over the network. The easiest way I’ve found is to connect an Ethernet cable between the Mac and the PowerBook, and make sure Internet Sharing is enabled on the Mac. In essence, you want to configure Internet Sharing in System Preferences -> Sharing to share your Wi-Fi connection with Ethernet.

Start up the TFTP server, as we did when we tested.

Now, power on the PowerBook. At the startup chime, press and hold Command-Option-O-F until you see the OpenFirmware console screen. At that prompt, type this command:

boot enet:0,yaboot

Assuming everything is configured properly, you’ll see some text flash by followed by a message welcoming you to yaboot. Hit Enter, and it should boot up the Linux installer.

From this point on, it’s all a matter of following the prompts. You’ll still need to choose a partition scheme, or let the installer do that for you. In my case, I allowed the installer to do it for me because I had no intention of leaving such an outdated version of OS X in use.

Depending on your PowerBook’s specifications, you can choose almost any display manager and/or window manager you wish to use. The only “gotcha” I found was that Gnome absolutely would not work on my hardware. I ended up using LXDM for my display manager and MATE for my display environment. It worked fine for me for several weeks, before I got bored and decided to give Lubuntu a whirl.

Once everything is complete, you’ll have a working version of Linux, with a graphical interface.

If you run into problems that double-checking the instructions here don’t resolve, shoot me a message or leave a comment. I’ll do what I can to help. Setting up a Linux netinstall server isn’t a trivial task, but I’ve pulled it off a couple of times and might be able to quickly resolve a problem.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.