Breaking Eggs And Making Omelettes

Topics On Multimedia Technology and Reverse Engineering


Archives:

Rant From The Past: Linux on PowerPC

January 4th, 2006 by Multimedia Mike

I dug up this old rant on my hard drive. The way it is formatted I obviously intended to publish it. The file is dated April 28, 2001. Some of you may find it interesting or amusing. More data on this episode is archived at the Yellowdog Linux mailing list. In the end, I solved the problem and got Linux onto a PowerPC machine but it took me 9 days from the start of my journey until the end.

Trying to Install Linux on a PowerPC

All I want to do is run Linux on a PowerPC machine…it’s a good thing I appreciate a challenge…

Introduction

I’ve always fancied myself a rather tolerant individual when it comes to diversity of computing environments. I respect the fact that there are many different computers, operating systems, and computing environments that are conducive to different people and tasks. This includes being respectful towards Macintosh users.

After my experience trying to install Linux on a PowerPC machine via a clean MacOS v7.6 installation, it’s difficult to hold Macs in very high regard. To be fair, it’s not that Macintosh hardware is inferior or that Mac end users are of low intelligence; the problem lies squarely with the people who designed the OS and its applications.

I wrote this little document as a therapeutic measure to help me deal with the remarkable idiocy of the situation. Maybe, just maybe, someone else will find the description of my trials useful in solving a problem that they’re having.

The Setup and the Challenge

I’ve been working with Intel x86 hardware for a long, long time. I know how to work DOS, Windows, and especially Linux on an x86 CPU pretty well. I suddenly became interested in trying Linux on other hardware and I decided to start with a PowerPC machine. There’s a place in my town that sells used Mac hardware on consignment and I picked up this machine, except with 96MB of RAM instead of 16MB and a 24X CD-ROM drive instead of a 4X.

I did my homework on how to install Linux on a PPC, thanks to LinuxPPC and Yellow Dog Linux. I think it’s possible to install it via the network, but I need to start an installation process on the PPC machine first. It seems that in order to kick off a Linux installation on the type of machine I
have, I need to perform 2 steps:

  1. reformat and repartition the hard drive so that Linux can use part of it
  2. install three files onto the machine:
    • BootX (Linux bootloader to be installed as an extention)
    • vmlinux (basic Linux kernel)
    • ramdisk.tar.gz (RAM disk image of the installation program)

When I got the machine, it booted MacOS v8.1 and had a variety of software on it, including Netscape v3. I was able to hook it up to my home LAN and browse the web. Also, when I purchased the machine, it came with two CD-ROMs: One with MacOS v7.5.3 and one with v7.6.

So I reformatted and repartitioned the HD. Then I reinstalled MacOS v7.6. Step one is complete. Proceed to step two: Get those 3 files onto the machine and install them. Umm…how?

This is the challenge at hand: Get the 3 files onto the PPC machine and install them.

Classic Chicken-and-Egg

If you’re not very familiar with the Mac, allow me to carefully explain a simple chicken-and-egg type of problem on the Mac platform. Most Mac programs on the internet are distributed in one of these three formats:

  • MacBinary (.bin)
  • BinHex (.hqx)
  • StuffIt format (.sit)

There are many handy utilities available for download, most notably StuffIt, which are able to decode these file formats. However, it seems that all of such files are available either in .bin, .hqx, or .sit format. If you didn’t catch the paradox, go back and read that again. The programs are distributed in the same formats that they’re tasked to decode.

No matter how many times I think about it, the sheer absurdity of the situation still makes my head hurt. I don’t know if I can adequately articulate what madness this is. A fellow named Blackfox does a much better job of it in his .plan file (search for the 4/2/01 entry).

Most Macs seem to magically have StuffIt installed by default, as if it’s part of the OS. Well, it’s not part of MacOS v7.x (though I understand that it is distributed with v9; glad they finally caught on). But I don’t have a general decoding utility on this Mac and it’s not on any of the CD-ROMs that came with the system.

Transferring Files

In their advertisements, Apple used to encourage people to “Think Different.” That’s exactly what I’ve been doing in order to get these 3 files on the Mac in the first place.

The first and simplest transfer method I could think of what via floppy disk since all of my computers at least have a 3.5″ drive. Problem: 2 out of the 3 files are larger than 1.44MB. Possible solution: Common compression utilities, at least under DOS, have methods of breaking up large files to be copied onto multiple floppies. Problem: I don’t have any compression utilities on this Mac.

The next approach was to transfer via the network. After all, the Linux boxes on my home LAN run FTP and HTTP servers. Problem: even though MacOS v7.6 has easily-configurable TCP/IP facilities, it doesn’t come with any basic TCP/IP applications, like a web browser, FTP client, or even telnet client. Scratch that idea.

I was advised to look into Appletalk and Appleshare, the Apple-proprietary networking protocols and applications which are also supported on Linux. After some research and recompiling on Linux, I turned a Linux box into an Apple file server. Now I can easily transfer files between Linux and the Mac.

Learning Experience

I’m not entirely positive, but I think I could have played with the existing disk partitions with MacOS v8.1 when I first got the machine. With this approach, I should have been able to resize the Mac partition and reformatted the rest of the space for Linux, thus leaving the MacOS and related software intact. So maybe my first mistake was reformatting and reinstalling? No, I won’t accept that. It should be possible to wipe the hard disk clean and build the machine back up into a functional state.

I could take the pre-packaged CD-ROM approach but by now I’m quite indignant that I can’t get this to work when I know it should. Besides, how do I know the CD-ROM won’t require StuffIt?

As a result of this adventure, I now know how to configure and administer an Appletalk network, though I don’t plan to mention that on my resume/CV.

Posted in General | 4 Comments »

4 Responses

  1. RC Says:

    Had similar problems with an older Mac, but worse…

    Built-in NIC didn’t work, so I plugged-in a cheap realtek PCI NIC. So, how to get the drivers installed? All the compressors are compressed! I found a self-extracting version created by the last sane Mac users, on some random website. Unfortunately, if it’s on a DOS floppy, MacOS will only view it at text!

    There was only one way to get things working… Install a 68000 emulator (BasilliskII) on a Windows PC… Then I had actual net access, and could Mac-format a floppy, and put the self-extractor on it.

    Stuffit really loved that situation… They’re more than happy to sell you a floppy with the self-extracting Stuffit on it, for the low-low price of $30 (or something like that).

  2. AG Says:

    Alas there is a solution to your problem. You can actually use hfsutils to build the appropriate bootable Mac filesystem. It is akin to ‘mtools’ for DOS. One of my buddies has an archive of Mac 7.0.1 files that should get you going. You can find em here. You can also read about his cool Mac-OS clock project. Prolly the only useful application for Mac-OS prior to OSX.

  3. Multimedia Mike Says:

    Thanks for the input. The issue is beyond moot for me now. I figured out a solution at the time, almost 5 years ago (now I feel old). Additionally, I fired up the system the other night for the first time in a long time. After poking around in Linux for awhile, every filesystem operating started return myriad SCSI errors. I couldn’t even invoke /sbin/shutdown. So I hard reset the machine…

    Tell me again: When a Mac boots up with an icon of a floppy disk with a flashing question mark, that’s a bad thing, right?

  4. AG Says:

    Yep, it just means that you don’t have a valid system boot disk. It can’t find a bootable OS.