• Published on | Mar 05, 2013 | by FozzTexx

Yes, this is Debian Linux 6.0.7 running on a PowerMac 7200

This is the second part of a previous article about getting Linux installed onto an old Mac. You can read the first part here.

Inspired by the upcoming #RetroComputerWeek I had tinkered around and got my Apple IIgs connected to Dropbox. It worked but I started wondering if I could find a better way. The method I used was rather roundabout and required far too many computers.

About a month ago I rescued a couple of PowerMac 7200 computers from destruction. I thought that if I could get Linux running on one of them then maybe it could handle both LocalTalk and file serving in one. A little digging and it appeared that the latest Debian 6.0.7 squeeze supported a Mac of this era.

Well of course it wasn't going to be that easy. What I thought would be a couple of hours of installing onto supported and tested hardware turned into a challenge that took several days to complete. It's been a long time since I messed with a Mac this old, and I had forgotten just how stubborn and difficult they are to get to do what you want. Everything I tried caused the Mac to throw up another obstacle in my way.

After the first couple of days I was feeling like Hero Boy from Freakazoid. What the Mac wasn't expecting though was that I am much more stubborn than it is. In the end it was forced to submit to my will and run a modern version of Debian.

Small steps

Late Sunday I managed to figure out the install sequence to get Debian 3.0 woody to boot and run the installer. I got the hard drive partitioned the way I wanted and started doing the install. Something made it refuse to mount the install CD, even though the drive works and the CD looked fine in another computer. Instead of using the CD, I let it download everything from a Debian archive. Part way through it complained that it couldn't get a particular package and I thought I was going to have to try something else, but after retrying it got all the packages.

After getting everything on the hard drive the installer wanted me to setup the repositories. This part completely failed because apt would segfault during the step of reading the package lists. I was able to boot into it, but sources.list was empty and even if I manually added anything apt would segfault in the same place over and over. Even so, getting the Mac able to boot into a broken Debian 3.0 seemed like a small amount of success.

There was a possibility I could get to Debian 6.0 by upgrading step by step through all the in-between releases if I could somehow get apt to work. It seemed to me though that until I could get a 2.6 kernel working there wasn't much point in fighting to get apt working under Debian 3.0.

Going modern while remaining old

During all the trial and error to find out how to get Debian 3.0 to boot, I was pretty sure that the 2.6 kernel from Debian 6.0 was actually booting. If I didn't provide it with an initrd it would actually fill the console with messages and then panic because it couldn't mount a rootfs. However if I did give it an initrd, the kernel would hang trying to put the initrd into place long before it even started to boot.

I set out to see if I could build my own 2.6 kernel. I found a guide on how to cross compile a 2.6 kernel on an Intel system. After managing to get the kernel to build and copied onto the Mac, it immediately froze with a black screen. Clearly it wasn't going to be that easy.

I had to wonder how Debian did it, and after lots of searching I found the kernel config that they had used to build the kernel which I had seen sort of work. I rebuilt my kernel using their config and tried it on the Mac, and there were the console messages with a panic about not finding the rootfs! Progress!

I then started figuring out which drivers the Mac needs for the SCSI and the ethernet and had the kernel compile them in. I got it to boot and it would detect the hard disk and the partition with the previously installed Debian 3.0, but still it wouldn't mount. More looking for drivers in the kernel config and I discovered that ext2 and ext3 were modules too! I compiled them in and finally I had the Mac booted up with a 2.6 Linux kernel!

Ok, so now that I have a modern kernel, how can I get Debian 6.0 on there? I tried the apt under 3.0 and it still segfaulted. My kernel still had the same initrd problem as the Debian built one. I tried extracting the initrd and mounting it with NFS, but it caused a kernel panic because it would run out of RAM.

Then it hit me: debootstrap! I used debootstrap to create a powerpc install on the NFS server, and then booted the Mac up using that as the NFS root. I had the Mac finish the second stage, rebooted into the NFS root, and I had it up and running on Debian 6.0. I erased everything from the Debian 3.0 partition and copied everything from the NFS server onto it, rebooted and this time I was running Debian 6.0 off the HD!

After thoughts

I sort of wonder if the Mac had more than 56 megs of RAM if things might have been a little easier. But I had to work with what I had available, I'm certainly not going to drop any cash on this antique for a silly experiment that I only expect to mess around with for a short while.

For anyone who wants to reproduce what I've done, I'm providing the config I used and the kernel I built. You can download them below.

Media

Commenting disabled for spambots

+1  Posted by Grant • Mar.07.2013 at 18.46 • Reply

I my experiences with putting Linux on old and/or obscure hardware, lack of RAM is the second biggest problems after weird boot systems. At around 128MB, things start getting slow for modern distros, even without X, and at around 64Mb, stuff starts breaking, unless you are using a specialized minimalist distro (which tend not to be very compatible with software they didn't come with). Some of it is just not having enough RAM for programs to work (a 15MB file when this device was released was large, but now 50MB files are common). Other problems are caused by bugs, but no one is very interested in fixing bugs that only affect a few people and only arise on obscure hardware or in incredibly resource constrained environments. And always remember, just because a distro provides a build that is theoretically compatible with your hardware, doesn't actually mean that they intended you to run that build on your hardware.

+1  Posted by jazz • Mar.15.2013 at 05.35 • Reply

Grant: not exactly, but close. And its called a SWAP FILE. 'dphys' or such packages will enable this even on an SDCARD mapped to SPI pins...so dont give me that. LEARN a tad while the guy is doing this and maybe you'll know why APPLE/MSFT/REDHAT did what they did or youll see something they didnt.

+1  Posted by Raz • Mar.07.2013 at 20.31 • Reply

Would it be possible to have GUI on there? What about the applications for debian? Will they run on a powerpc processor?

+1  Posted by FozzTexx • Mar.07.2013 at 20.33 • Reply

If you want a GUI this probably isn't for you. It may run but I'm sure not well. But yes in theory everything that comes stock with Debian should be able to run.

+1  Posted by Raz • Mar.08.2013 at 17.14 • Reply

Have you experimented with GUI? What about the applications? Im really curious! :-) There are several different linux distros at www.macintoshgarden.org For example: http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/official/iso/ppc/

+1  Posted by Steve C • Mar.09.2013 at 08.33 • Reply

... yeah.... but will it run crysis?

+1  Posted by tom • Mar.10.2013 at 15.43 • Reply

Nice job! From my experiences with older hardware and Linux is that anything not x86 is hard. With Macintosh, it's harder.

I've gone to NetBSD/OpenBSD for support of more modern apps. I've been able to run OpenBSD with 32 MB RAM in a VM as an SSH gateway. I also run it on a Sparc LX. I suspect the BSDs would work well on your 7200 with Netatalk + NFS as a fileserver.

+1  Posted by kb • Apr.04.2014 at 03.31 • Reply

I believe NetBSD/macppc does not support the 7200 because it uses the PPC601.

+1  Posted by jazz • Mar.15.2013 at 05.33 • Reply

LINUX(UBUNTU) can run on ATMEL644, an SD card, so dont go giving me hell about lack of RAM, people...

+1  Posted by Michael Campbell • May.25.2014 at 17.53 • Reply

Thanks for a great post! I am working on getting Linux up and running on a Power Macintosh 7300/200, and it is great to see that you have blazed the trial - you commented on my posts in my "Quadras, Cubes and G5s" blog over at Wordpress (happymacs.wordpress.com), drawing my attention to this post and your blog. Thanks for sharing, particularly the kernel configuration files. I hope I don't have to go that far, but if I do, I share your trait of persistence and determination, and I will! Thanks again.

+1  Posted by TheRalf. • Oct.13.2015 at 09.30 • Reply

can you netboot an old ppc from a raspberry pi?

+1  Posted by FozzTexx • Oct.13.2015 at 14.06 • Reply

A Raspberry Pi is just another Linux box and can easily run the same services needed to netboot another computer. The trick is with the PPC Mac, it needs to have Open Firmware in order to netboot.