LinuxPPC on the Macintosh PowerBook

Richard Kinne

Issue #76, August 2000

Graphical installation environments help Macintoshes play better than ever with Linux.

To say Linux has undergone a growth in popularity over the last few years is, of course, an understatement. One cannot read any computer-related medium today without being bombarded with news and views on the Linux operating system. Some would even have you believe that Linux has the chance to unseat Windows as the operating system of popular choice. In the Intel-based world, we can choose from several Linux packages that can be installed on our machines. Intel-based Linux is even being courted by the game publishers, with such popular titles as Quake III now available.

What some people may not realize is that Linux for the PowerPC chip, usually on a Macintosh platform, is not far behind and has experienced similar growth in the last few years since its first inception as MkLinux back in 1996. Today, PowerPC users can choose among the original MkLinux package, which still offers its Mach kernel version of Linux, or the PowerPC and Yellow Dog packages with their monolithic RPM-based distributions. New distributions on the PowerPC chip horizon include SuSE, a popular German-based package, TurboLinux, popular in Asia, and RockLinux, billed as a “power user” distribution.

This article concentrates on the LinuxPPC distribution package, its installation and use on the Macintosh PowerBook, specifically the G3 Wallstreet PowerBook. Longtime readers of Linux Journal might find that odd, since I wrote the breakthrough article on MkLinux back in 1996. As with everything connected with Apple Computer, MkLinux went through some difficulties in the late '90s. In the summer of 1998, Apple stopped its support of MkLinux and development was turned over to the MkLinux community, which caused a slowdown in support of Apple's newer machines, as MkLinux was largely still working off of the DR3 kernel release. At the same time, I became a certified “road warrior” by getting rid of my desktop machine and computing exclusively on my Wallstreet G3 PowerBook. MkLinux's support of that model was far from ready for prime time. I am happy to report, however, that the MkLinux community has been busy generating what they have called “generic kernels” that do support most of Apple's latest machines, including the PowerBooks. However, since that wasn't the case a couple of years ago, I migrated to the LinuxPPC package.

Installing LinuxPPC

LinuxPPC recently released their LinuxPPC 2000 package. This package contained, of course, various kernels in the 2.2.x range, including some specifically compiled for certain models of Macintosh PowerBooks. Also included are both the KDE and GNOME desktop environments, the Netscape browser, and a Mac-on-Linux emulator that allows you to run the Mac OS in a window from within Linux. The CD also contains the full range of Linux development tools including GNU C, C++ and Java. Nice extras include PalmPilot synchronization software for both the KDE and GNOME environments. A second CD provides all relevant source code.

If you're not willing to wait for the CDs or aren't into development or the KDE desktop environment, you can download a LinuxPPC 2000 “lite” version (see Resources). The LinuxPPC lite version includes the basic system, libraries and the GNOME desktop environment. The file is about 170MB, so even though it's not a quick download, LinuxPPC did give some thought to those of us using modem connections to the Internet.

One of the highly touted features of the LinuxPPC 2000 release is its user-friendly graphical installation environment. The installation CD is meant to boot your system and load whatever it needs onto the Macintosh in order to start installing Linux. These components will vary from system to system, depending on whether or not the “Open Firmware” of the computer involved is well-supported, or whether the system boots better using the included BootX utility that operates somewhat like LILO on Intel-based machines. Due to oddities in the Open Firmware implementation on the Wallstreet PowerBook G3, it commonly uses BootX in order to load Linux, and the installer realizes this. Once any Macintosh portion of the installation is done, the computer reboots and continues with the Linux installation process.

The graphical installation environment now comes into play. The computer will boot into Linux enough to give you a simple, restricted X Window System environment. These simple windows will guide you through disk partitioning, formatting, mounting, choosing packages for installation and allowing you to choose your root password. Upon reboot, your Linux installation is complete. If for some reason the X environment will not load, the DOS-like Red Hat installer (common with LinuxPPC in the past and familiar to anyone who has loaded Red Hat Linux on anything in the last few years) will automatically be invoked, allowing you to continue with your installation.

Simple, right? Well, anyone who has ever installed Linux onto any system knows that, try as the package companies may, installation is never quite that simple. It's worth sharing a couple of “gotchas” I experienced during my own installation. If you'll be using BootX to do your LILO-like choosing between MacOS and Linux, you must remember to reset the control panel from the RAM disk used by the system to do the initial installation to the root partition. Remember to write down which partition you use for root, since you'll need it at this point.

If you're not an old hand at Linux installation, that is, if the concept of the user-friendly installation interface is a selling point for you, accept the fact that the initial default desktop environment for the LinuxPPC installation will be GNOME. This was a little disheartening to me, since I'm a KDE fan and I wanted to set up KDE as my desktop environment. You are able to do that, but let the installation install GNOME as the default at first. Problems have been reported and experienced in getting KDE to run right after installation, because the installer apparently doesn't install the QT1x libraries that KDE needs. It's a simple matter, upon reboot, to go into GNOME, install the libraries via the RPM program if needed, then go into KDE. Once there, you can modify and customize things easily.

The good news is the installation procedure, if allowed to install the defaults, solved all the previous installation problems I'd had with Xconfig in the past.

Congratulations! You now have a portable UNIX system that would have run several colleges in the late '80s. So now, what can you do with this newfound power on a PowerPC-based Macintosh laptop?

Things to Do

The great thing about laptops today is that, for most intents and purposes, they are the equal of desktop machines. You may not want to do heavy-duty video production on a PowerBook using any operating system, but for writing, database work, telecommunications, networking (especially networking) and game playing, the PowerBook running Linux is the equal of any machine in its class.

Programming can be a major use of a home-based Linux machine. There is no better platform than Linux for learning to program. UNIXl recently, I wouldn't have said that, because my concept of programming in a UNIX environment was always command-line-based, and professional programming has long since left the command-line world. With the proliferation of X-based GUI environments like GNOME and KDE, not only can a home-based Linux machine enable you to get a good introduction in modern, object-oriented languages like C++, Java and Tcl/Tk, but you have the opportunity to significantly contribute to the Linux community as your skills develop. Now you can develop those valuable skills on the bus ride home with all the included development packages Linux can put on your PowerBook.

A prime use for a home-based Linux machine is in networking. The Internet was built, and continues to be dominated by, UNIX-based machines. High-speed broadband Internet access has entered the home, and it's here that Linux can play one of its most useful roles. Included in any Linux computer is the ability to act as a masquerading gateway machine, allowing many machines on one side of the gateway machine to effectively share one Internet IP address at the same time. This ability allows you to put all your home machines onto an Internet connection simultaneously.

This use mandates grabbing the source code for the kernel you are running (it's on the CD if you bought the package, and on the Net if you downloaded the package) and recompile the kernel to include IP masquerading. Once that's done, grab the latest version of IP chains from ftp://ftp.linuxppc.org/. This tool will allow you to set up your IP masquerading gateway very simply via scripts. More information on how this might be set up for your machine can be found in the Linux on PowerPC FAQ-O-Matic (see Resources).

Feel a little queasy right now at the thought of compiling your own kernel? Well, especially for something as popular as IP masquerading, someone has already done the work for you. Investigate, via the Linux on PowerPC FAQ-O-Matic, the possibility of using a pre-compiled kernel which has already been set up for the features you need. With IP masquerading set up on an older PowerPC Macintosh (even a PowerBook), your home can enjoy the same networking possibilities, for a lower cost and less with complexity, that large corporations did just a couple of years ago.

Linux machines are better at multitasking their resources than any other operating system on the market today. You have unparalleled control over how much CPU time each application will need on average. I use this ability to run such applications as SETI@home and the RC5 code-cracking client in the background while using my machine to do other things. Both projects have PPC Linux versions available as binaries, or you can build your own client from sources in the RC5 project's case. Here, the creativity of the Linux programming community has shown through most strongly. For both of these projects, Linux users have far more choice and control over the information these clients are generating than with either Windows or Mac OS. Use your portable Linux power to contribute to the search for ET or to convince the government that we need larger cryptography keys (see Resources).

How about everyday, real-world applications like word processing, databases and spreadsheets? Even though Linux started life as a “geek project”, significant progress is being made in getting office productivity packages onto PPC Linux. Having said that, I also have to report that PPC Linux is behind Intel-based Linux in this regard. The “version” of Linux you're using isn't a problem if you have the program's source code and can build the binaries yourself, but commercial applications such as Corel WordPerfect don't give their source code away for us to build PPC versions of their programs. We have to persuade these companies that there are enough of us out here in the PPC world to care about!

Does this mean we're out in the cold? Of course not! More and more progress is being made in educating companies to jump onto the Linux bandwagon to offer PPC versions of their binaries. And, as is usual with the Linux community, we've taken the bull by the horns ourselves. One of the most exciting “office productivity” projects currently taking place is KOffice, a Microsoft Office-like program suite made to operate under KDE and licensed under the GPL.

KOffice, which is currently designated “alpha software”, consists of several parts. KWord is the suite's word processor. It supports frames, multiple columns, headers, footers, numbering of chapters, auto-correction, spell checking and templates. Import filters that include Word97 are being written. The suite's spreadsheet component is called Kspread. Other components include KPresenter, KIllustrator, KImageShop, Katabase, KChart and KImage. These components each do exactly what you might guess they would. KIllustrator is a vector drawing program, whereas KImageShop is an image processor and KImage is an image viewer.

What makes me excited about KOffice as opposed to other possible productivity software offerings such as Corel WordPerfect or Sun's StarOffice? Quite simply, KOffice is distributed under the GPL. Leaving aside the legal, financial and possible moral issues with regard to the GPL, the fact that KOffice is distributed under that license means more than just being able to read and study the source code. Even though KOffice might be directly marketed to the x86 crowd, a recompile of the sources will make it a wonderful tool for the portable PPC-chip folks. That's an advantage you don't get with Corel or even Sun, as friendly as they have been to the Linux and Macintosh communities. KDE is currently at version 1.1.2, with the much-awaited version 2.0 due out by the time you read this. KOffice is designed to be integrated into KDE as a collection of components. Indeed, components and how KDE uses them are the main difference between KDE V1.1.x and the upcoming KDE V2.0.

Linux has continued its great advance into the PowerPC/Macintosh world. Slowly—I think more slowly than most Linux fans would want—the operating system is moving into an arena where it might be generally useful. Still, right now, Linux is a specialized operating system catering to developers, networkers and IT professionals. With the ever-increasing hardware support in both the Intel and PowerPC chip communities, and with GUI desktop support given by such packages as KDE and GNOME, Linux is positioning itself for mainstream big time. Already, this is percolating down to us in the form of equal installations on laptop computers, and attention by big-name publishers and developers in both the Intel and PPC-based worlds. The future continues to look bright.

Resources

The Good, The Bad

Richard Kinne (n2ikr@arrl.net) uses LinuxPPC on his PowerBook to improve the versatility of the machine. He holds the position of Technical Support Representative for The CBORD Group as well as Lecturer in the computer science department of Ithaca College. When not writing or hacking with his significant other, he enjoys Star Trek, Babylon 5 and playing with his cats.