How to install Linux on a vintage 68K Mac
If you're like me and happen to have a bunch of vintage Macs powered by Motorola 680x0 CPUs lying around, then you probably like to tinker with them. And what better way to tinker with obsolete hardware than by installing an obsolete version of Linux on it? It's a difficult and time-consuming procedure with no practical purpose, of course, but when has that ever stopped us?
In this how-to, I'll install Debian 4 (a Linux distribution) on a 68K Mac. There are some catches, and the road to functioning Linux on a 68K machine can be long and frustrating, so I'll try to condense the process into a series of easy-to-follow steps. No matter how I simplify it, though, keep in mind that almost everything about this process is antithetical to the traditional Macintosh experience, so it is not for the faint-hearted.
Step 1: Prepare the Mac
Find a Mac that will work with the version of Linux we're using. There is no hard and fast guide to compatibility, so you'll have to go by the general guidelines I lay out below. Before you begin, be sure you have a fresh PRAM battery installed.
CPU. You need a Mac with a 68020, 68030, or 68040 CPU. The plain 68000 CPU machines (like the Mac SE) will not work with this version of Linux. The list of candidate machines that can use this version of Linux includes most Quadras, the Centris machines, some Performas, many of the LC models, and most of the Mac II series.
RAM. Your Linux Mac should have at least 16MB of RAM, but I recommend 24MB or more. You need at least 10MB free (after Mac OS loads) to run the bootloader program at a minimum.
Hard drive. Use a large hard drive for the era--at least 200MB, hopefully more. If you have data on the hard drive that you don't want to lose, back it up, because you'll be repartitioning it later. That means you are 100% guaranteed to lose the data currently on it.
Removable storage. For the most streamlined installation, you'll need to have an internal or external CD-ROM drive. A Linux distro image will be burned onto a CD-R.
In my case, I used a Mac LC575, which runs on a 33 MHz 68LC040 CPU, with 36MB of RAM and a 540MB hard drive. It also has a built-in CD-ROM drive.
Step 2: Get the software
After your Mac is ready, it's time to get some software. Here is the list.
Mac OS 7.1 to OS 7.6. You will need a basic Mac OS installation on the hard disk to launch the Linux bootloader program (called Penguin), so you need to be able to install Mac OS (or copy over a working system folder from another disk). Doing so is generally beyond the scope of this piece, but if you need a copy of Mac OS, Apple provides version 7.5.3 via its FTP site free of charge.
Patched Apple HD SC Setup 7.3.5. Versions of this SCSI hard drive formatting and partitioning utility come with every version of Mac OS, but you'll likely need a patched version of 7.3.5 that will allow you to use the tool with non-Apple hard disks. You can download the patched version as part of this SIT-compressed package.
Debian 4.0 CD image. I will use a specially-built version of Debian Linux 4.0 for 68K machines. It's old, but it's the best we have right now. You can download the Linux ISO.
That ISO is a CD disk image, and you'll have to know how to burn it to a CD-R. (If you're reading this far, I'm guessing you probably do.) The ISO contains the other software we'll need, namely the Penguin bootloader, a Linux kernel file, and a RAM disk image, which we'll talk about more below.
Step 3: Prepare the hard drive
To prepare the hard drive, you'll need another drive to boot from that has the Apple HD SC Setup program on it. I recommend using a bootable Mac floppy disk. Copy the HD SC Setup to that disk.
Next, physically connect (if it isn't already) the SCSI hard drive you want to use for Linux to your Mac. Insert the HD setup floppy and boot to it.
Run the HD SC Setup program and select the proper drive ID. Then click the partition button and (Warning: This will delete your data) remove whatever partitions already exist on the drive.
Next, you'll add three new partitions by clicking on the "custom" button, then clicking on the blank volume area to the left of the window:
First partition: A Mac OS partition that will hold the Mac system software and the Penguin bootloader. That partition should be at least 20MB, but if you have the room, make it 50MB to 100MB so you have space for other Mac OS utilities that may come in handy another time.
Second partition: An "A/UX Swap slice 1" partition, which will function as swap space (virtual memory) for Linux. It should be roughly double the size of your installed RAM. So make it 48MB to 64MB. The exact amount isn't too important.
Third partition: An "A/UX Root slice 0" partition, which will be the main (root) storage space for the Linux OS and its related programs. You should fill up the remaining hard drive space with this partition. Ideally, it should be at least 100MB.
Additionally, you could do more fancy partitioning for user space and such, but this is way is simpler and it works just fine for how often you'll likely be using your Linux installation (i.e. a few times).
Step 4: Install Mac OS
As I previously mentioned, you'll need a basic installation of Mac OS on the hard drive in order to boot into Linux. So using whatever method (and OS version) you're comfortable with, install it on the Mac OS partition we just created.
If you have lots of other vintage Macs lying around, it's handy to simply connect your Linux HD as a second disk on another working Mac and copy a working System 7.x folder over. It saves a lot of time versus switching floppies or even a CD install.
Step 5: Prepare the Linux files
If you haven't done so already, burn the Debian 4.0 ISO to a CD-R. You can use whatever modern PC or Mac you're comfortable with to do it. Just make sure you're actually burning the image contents itself to the CD-R and not just copying the ISO file to it. In Mac OS X, you'll have to use Disk Utility to properly burn the image to a CD.
Once you've got the CD, you'll need to get a few files off of it and onto your vintage Mac OS 7.x partition. In my case, I had a Mac OS 7.x extension that could read the Linux CD file system, so I stuck the CD in my LC 575 and copied the files directly. If you don't have that extension, then you may have to copy them from the CD on your modern machine and copy them over to the vintage Mac via another method (beyond the scope of this article).
Here are the exact files you'll need (including the paths to them on the CD):
Once you have those files on your Mac OS 7.x partition, put them all inside a folder called Penguin. Then un-binhex the three HQX files--StuffIt Expander usually works, and I bet you have that utility already if you've come this far.
Now you'll have three functional pieces in the folder: the Penguin bootloader program, the Linux kernel (vmlinuz-2.6.26-1-mac), and the RAM disk image (initrd.gz).
Before we go further, I'll step back and explain what each part does. The bootloader is a Mac OS program that allows us to boot up Linux on older Macintosh hardware. Because of the way older Macs work, you can't boot directly into Linux right after flipping on the power switch like you can on a more modern machine. The Linux kernel is the basic package of non-Mac binary code that forms the heart of the Linux operating system. The RAM disk image is an encapsulated file system that contains a minimal set of Linux binaries, scripts, and setup files needed to start the Linux installation process.
Step 6: Run and configure the Linux bootloader
Now that you have all the files you need on your Mac OS 7.x partition, it's time to run the Penguin bootloader and configure it properly.
Before you run Penguin, it's best to allocate some RAM to it so it works properly. Click on the Penguin icon and choose Get Info from the file menu in Finder. Down at the bottom there's a box where you can type in the amount of RAM the system reserves for it at a minimum. I put in 10MB for mine--values less than that caused errors for me when I tried to boot Linux later.
Now double click on the Penguin program to start it. Go to File > Settings in the menu bar to open up the settings. In the first tab, Kernel, click on the Kernel button and select the "vmlinuz-2.6.26-1-mac" file. Then click on the RAMdisk button and select the "initrd.gz" file.
Next, click on the Options tab in setup. Find a field labeled "command line" and enter root=/dev/ram into this field.
You're a brave one to get this far. We're almost ready to start the install process.
Step 7: Install Linux
Now it's time to start up Linux for the first time. In this case, I'll boot into the RAM disk image that contains the setup program needed to copy the files over from the Debian CD-ROM.
In Penguin, go to File > Boot. If all goes well, text will start scrolling in the Penguin console window. In a moment, the screen will blank and you'll see a white or cyan penguin logo (if you're using a color monitor, that is) in the upper right corner of the screen.
After that, it may look like the computer is hung up, but give it some time. In a moment, if the Linux kernel we used likes your hardware, the screen will blank again, showing a colorful Penguin logo in the upper left of the screen, and a familiar Linux text crawl will begin scrolling downward. Don't be alarmed if you see some error messages. As long as crawl keeps going, you're OK.
Soon, an interactive menu-based install program will pop up on the screen, guiding you through the install process. It should find your CD-ROM drive, help you set up the target hard disk, and begin the process of copying the OS and various program packages off the CD and onto your hard drive, which can take quite a while. After a reboot, you should be good to go.
Congratulations. You're now running Linux on your 68K Mac!
If you're like me, things didn't work perfectly the first time around. This is where the frustration sets in. Sometimes Debian just doesn't like your particular Mac. Maybe it's the CPU type, maybe it doesn't recognize your CD-ROM drive, maybe you don't have enough RAM.
Whichever way it fails, it's not immediately obvious how to get this hobbyist-built (and generally abandoned) Debian distro to like your particular Mac. So I'm afraid you're on your own at this point. First, try a different 68K Mac. If that still doesn't work, The Linux/mac68k Project has some excellent info on machine compatibility, troubleshooting, setup tips, and more. There are also older versions of Debian on that site that may work with your particular machine.
Good luck. Always remember: The journey is the reward. Having come this far--even if your 68K Linux isn't functioning properly--you've ideally grown in some way as a human being. You're also a stone-cold computer nerd! Steve Jobs would be disgusted--and proud. High five.