Linux on a Mac - #1


Fully vaccinated are you?
What's with Linux?

MRP Feature by Jay Timmer, January 21, 1999

What's all this about Linux?

Most people reading this article have already heard of Linux; the Unix style operating system has received attention as an alternative to Microsoft products and recent surveys indicate that Linux is now being adopted more quickly than Windows NT. Several Mac-specific Web sites cover Linux happenings and the MacWorld Expo featured a demonstration of ApplixWare's office suite running under LinuxPPC.

How carefully should the average Mac user follow Linux? Should any seriously consider switching to it? In a series of articles, I'll explain how to obtain, install, and begin working with Linux on Apple hardware. The goal of this series is to determine whether a user can do everything on Linux that can be done now under the MacOS—a major factor for anyone trying to decide if Linux is a viable choice. Although these articles form an anecdotal account, I'll try to provide technical background along the way. I also expect that I'll make some mistakes, and hope that anyone noticing such errors will take the time to inform me so I may set the record straight.

Why Linux?

There are a wide variety of reasons to consider Linux, but only some may seem significant to each reader:

Performance: If you've followed the news about Mac OS X at all, you know it offers host of features notably lacking from the MacOS—preemptive multitasking, multi-threading, protected memory, true virtual memory, and symmetric multiprocessing. These features enable your machine to crash less often, to use memory more efficiently, and to perform more than one task at a time without bogging down. Windows NT offers all of them, and has thus made gains in the publishing and media markets; Linux has all of them as well. Although Mac OS 8.5 performs very well and is quite stable, many consider these features a must for any computer used as an Internet server or for serious multimedia work.

Price: Simply noting that Linux is freely distributed understates its advantage—in fact, a host of free software accompanies most Linux distributions. Imagine that bundled with your OS are not only a few Internet and productivity applications, but full versions of BBEdit, Photoshop LE, games, and Metrowerk's Discover Programming as well—not to mention, telnet, mail, and FTP severs, and the most popular Web server (Apache). You've just imagined a basic install of Linux. If you find the bundled software lacking, there is a vast amount of Linux software freely available at FTP sites, dramatically cutting the cost of configuring and maintaining your computer.

Hardware requirements: Really, a subsection of cost. Versions of Linux run on just about any hardware you can find—if you've found a good deal on a Pentium box, or have an old 7100, you can run Linux. Linux even runs well on older hardware because its disk access and networking are so efficient. Heavy graphics manipulations may seem sluggish (that's why you're replacing the 7100, anyway), but the machine will likely run beautifully as an email, ftp, or Web server.

Experience: A while ago, some felt that Apple's troubles made learning Linux an intelligent hedge. Although seeimingly no longer an issue, one can never have too much experience! A large portion of corporate and academic computing is done on various versions of Unix, with which Linux shares functionality. If you know how to use and administer a Linux system, moving to another Unix variant is fairly straightforward.

A taste of the future: MkLinux, Apple's officially sanctioned version, and Mac OS X run on a similar microkernel, and thus using it now may help you when managing future versions of the Mac OS. There's also a group working on GNUStep—an attempt to map all of the Next/Yellow Box APIs to Linux's graphical user interface, the Xwindow System. This would allow an application developed in the Yellow Box to be merely recompiled to run under Linux, and would turn a Linux box into the most affordable development environment for Yellow Box applications.

Which Linux?

There are currently two groups porting Linux to the PowerPC processor: Apple/OSF's MkLinux and LinuxPPC. Both support many Macs, though only MkLinux runs on NuBus PowerMacs. The differences between MkLinux and LinuxPC mainly lie in the operating system's plumbing. LinuxPPC is a "traditional" operating system— its Kernel handles everything from communicating with hardware and allocating memory to providing a user interface. Under MkLinux, the Mach microkernel handles the hardware and interprocess communication, but treats the user front end like any other process, and thus (interesting to those with a computer science bent) more than one user interface process may be run at a time.

What does this mean to the average user? The reading I've done indicates that LinuxPPC is faster for daily use, since the OS functions as a complete unit. MkLinux may have an advantage as a server, since the server processes avoid the user interface and thus work more directly with the hardware. Ultimately, performance doesn't seem like a compelling selection criterion for most users. Both install basically the same software and differences are easily corrected by downloading freely available packages. Both rely on a RedHat style installer (named for the company which makes it) to get the software in place.

In mid-1998, I chose to install MkLinux because it offered a more convenient method for running a dual boot system (an advantage recently nullified by the release of BootX for LinuxPPC). Under MkLinux, the boot process starts under the Mac OS until an early extension invokes a standard Mac dialog, which lets you choose either the Mac OS or Linux—choose the Mac OS, and startup proceeds as normal; choose Linux, and the hardware information the boot process has already gathered is passed to the Mach microkernel, which then takes over.

Until recently, the LinuxPPC startup process relied on Open Firmware, a compact bit of software that controls the boot process on all PCI-based PowerMacs. Open Firmware determines what hardware is present and where the operating system can be found. Under LinuxPPC, the user was originally required to manually instruct Open Firmware to find the operating system in the appropriate Linux partition. Further, changes to the Open Firmware settings are stored in PRAM, so zapping PRAM is often needed when mixups occur (which has the undesirable side effect of clearing those Mac OS settings stored in PRAM). [To enter Open Firmware on Macs that support it, hold the command-option-O-F key combination at startup; OF's command line interface will appear.] Recognizing this complication as a barrier to the average user, a LinuxPPC developer recently created BootX, which should make the boot process (I haven't used it yet) as simple and painless as it is under MkLinux.

But because I didn't feel inclined to remember the appropriate OF commands for booting each operating system and BootX wasn't available in mid-1998, I chose to use MkLinux. Recall that if you have a NuBus based Power Mac, this is your only choice as LinuxPPC does not run on these machines.

Linux in flux.

Since mid-1998, the status of MkLinux has changed. Apple's MkLinux collaborator, the Open Software Foundation, changed its name to the Open Group, and dropped all Mach development efforts. Apple itself pruned its MkLinux development team to one, and has temporarily reassigned him. Sounds like a shift in corporate policy has left MkLinux dead in the water, right?

"Not so," says David Gatwood, who supplied me with the above information. By the time support was cut, MkLinux was a mature release, had attracted developers, and had users who depended on it. A handful of these users are now working on the Mach Kernel/Linux Server combination using the open source code of the last Apple/OSF version. They've squashed some bugs and improved hardware support; the fruits of their labor can be found by following the links from David's website.

Currently, their efforts are focused on improving the Kernel/Server combination and they're leaving the work of compiling PowerPC programs and building installation packages to the LinuxPPC folks. This is not a significant deficiency, since a program that runs on top of LinuxPPC will run nicely on top of MkLinux. It's possible to install LinuxPPC, and then switch to the Mach Kernel, and even to switch back and forth between the two Kernels every time you reboot. Because the Kernel deals with all the hardware issues, it's the only item that needs to be customized for a given machine. I've attached an external hard drive with MkLinux installed to a variety of Macs and, after placing the appropriate hardware-specific version of Mach Kernel in the Mac's System Folder, been able to reboot into Linux without a hitch!

The people working on LinuxPPC have not been standing still, either. Currently, they're distributing release 4 of their packages, which offers roughly the same software as the MkLinux DR3 release, and release 5 is in the offing. In addition to incorporating the aforementioned BootX, release 5 promises to incorporate the newest Kernel (probably the 2.2 Kernel, see below) and improved versions of some of the code libraries that provide fundamental functionality, such as video output. Also included will be updated versions of bundled software, new user-requested programs, a new default window manager (Gnome), and the option of bundling the ApplixWare office suite when buying the LinuxPPC distribution.

A description of DR5 at their website includes the statement, "Release 5.0 will bring modern Linux shared libraries (called 'glibc2')." When this was announced, I remember reading someone questioning the judgement of this as, in his view, glibc2 was not yet release quality. That assessment may be accurate, as the latest from LinuxPPC on release 5 is:

January 18, 1999 Update: We've sent a PowerPC computer to a developer at Netscape to help get Netscape Communicator to build under R5. Currently, Netscape crashes far too frequently to be useable. R5 probably won't ship in January, and we don't have an estimate for when it will ship. Too many things are in developmental states right now to ship a working product.

Finally, the Linux community is gearing up for the transition from the 2.1 Kernel to the 2.2 release, which may not seem like a big deal until you consider that the current Kernel has reached a version number in the area of 2.1.130, indicating that significant changes are required before the powers will call for a modest version jump. These changes are detailed in a TechWeb article; in short, the 2.2 Kernel will include better network and disk cache performance, and support a greater range of hardware and RAID hard drives. Significant to Mac users, the release adds support for the HFS file system, and lists the PowerPC in its list of officially supported processors, joining Alpha, Sparc, and x86. The updated Kernel should be available early next week (1/25/99).
Top Bottom