There are many reasons to recommend a Mac. Plug and Play made Mac hardware setup trivial long before it became a hyped technology on other platforms. The computer’s built-in networking support ensures that connecting Macs with both AppleTalk and TCP/IP is quick and simple.

However, the ease with which you can construct Mac peer networks creates management problems. Tracking different versions of hundreds of files distributed over many machines is tedious. Maintaining security and performing backups are a real nightmare.

Centralizing the important data on a single server was the logical solution. However, as much as I like the Mac OS, it is not robust enough to provide file-system security or manage quotas and resources such as the Web, e-mail, and name servers.

Organizations that have made an investment in Mac hardware may legitimately wonder what is the best option when they need a server that provides these functions, yet integrates seamlessly into the existing network. Can these services still be provided by a Mac? The answer, as I discovered, is yes.

Linux on the PowerPC

While I was researching these issues for a small Mac network, I came across the MkLinux OS–Linux for the Power Mac. MkLinux began its life in 1995, when Apple began supporting a project by the Open Group’s Research Institute to port this freely distributable Unix-like OS to the Power Mac.

Both MkLinux and the BeOS lead the trend to open up the Mac platform to alternative OSes.

In a departure from the monolithic kernel design of other Linux distributions, MkLinux runs natively on top of the Open Group Mach (PMK 1.1) microkernel, which itself is derived from Carnegie Mellon University’s Mach 3.0 microkernel. The Mach microkernel performs only a small number of functions. Among these functions are low-level hardware I/O, interprocess communications (IPC), memory management, and scheduling.

These services provide an abstract layer onto which you can port other OSes. A server is a Mach process that gives the OS its “personality” and provides higher-level functions such as file-system and network support, as shown in the figure “MkLinux Architecture.”

MkLinux thus runs as a Linux server. That is, Linux runs as a Mach process that contains an orthodox Linux kernel, which is modified to use low-level Mach services. To improve performance, the Linux server can reside in the same address space as the Mach kernel.

Installing MkLinux

MkLinux runs on most Power Macs, including early NuBus-based machines (6100, 8100, and 9100), first- and second-generation PCI models (7100, 7200, 7300, 7500, 7600, 8500, 8600, 9500, and 9600), some PowerBooks (2400, 3400, 5300, and G3), and the latest G3 Power Macs. A multiprocessor kernel is available that supports Apple dual-processor machines and clones, as well as DayStar Digital’s two-way 604e CPU upgrade card.

Installing Linux on any platform is not for a novice. Much of the MkLinux installation is automated, but some knowledge of networking, SCSI, and disk partitioning is required for things to go smoothly. I installed MkLinux on an external 1-GB SCSI hard drive attached to a Power Mac 7600. It takes only two partitions to install MkLinux (one to hold the Linux file system, and the other for swap space), but four or more are commonly used because they provide better flexibility.

Although Apple provides a functional disk-partitioning program, offerings from FWB and LaCie are more sophisticated and let you resize partitions without reformatting. If you are willing to forgo a GUI, MkLinux has a serviceable, if somewhat unfriendly, character-mode disk utility called pdisk. I created a 70-MB “\ ” (root) partition, a 32-MB partition for \swap, and a 100-MB partition for \home, which leaves the remaining 798 MB to \user. Note that disk-partitioning software offers new and exciting opportunities to junk your data; backups are essential.

Setup begins by installing a MkLinux Control Panel that selects MkLinux or the Mac OS as the default OS at boot-up. The Mach kernel is put in the Extensions folder, and a folder containing the Mach server is placed in the root directory of your bootable Mac partition (you can remove it after installation). These steps were sufficient to bootstrap MkLinux.

Rebooting automatically starts the installation program. After specifying which disk partitions should hold different parts of the file system, I was presented with a list of “packages” to install. Packages are compressed binary archives that contain all the files necessary to implement a particular OS service or user application. You can install packages from a distribution CD, over the Internet from an FTP server, from an NFS mount, or from a local hard drive. Because the MkLinux distribution is nearly 300 MB in size, the CD distribution makes sense.

Packages necessary to run a basic MkLinux system (including the X11.6 windowing system) are preselected for you, so accepting the default is a wise move. Installing other packages later is easy. I installed some additional packages, including developer tools (Gnu C, C++, and FORTRAN compilers) and both HTTP and FTP servers.

The excellent RedHat Package Manager (RPM) performs the installation by expanding packages and copying the contents to their appropriate places. The RPM system maintains a database of installed packages, thereby providing a useful version and dependency control system. Supplying network information, a name for my “new” machine, and a root password completed the installation. After rebooting, I had a fully functioning MkLinux server.

Speaking AppleTalk

Getting my MkLinux server running was one thing; making it useful on an AppleTalk network was another. Mac users like to access servers via the Chooser, and this convenience can be provided easily if you install Netatalk.

Netatalk is a kernel-level implementation of the AppleTalk Protocol Suite for Unix systems running over Ethernet. It is available as either source code or the RPM package and is part of the MkLinux distribution. It includes support for routing AppleTalk, serving Unix and AFS file systems over the AFP (AppleShare), serving Unix printers, and accessing AppleTalk printers.

Once installed, Netatalk made the MkLinux server appear like any other Mac on the network. Mac users with an account on a MkLinux server running Netatalk are able to log in and mount their home directories as network drives. Clever file translation ensures that folder attributes, file icons, and their program associations are preserved on the MkLinux file system.

If you need to transfer files between HFS and MkLinux partitions, there are a series of “h” utilities to help you. These mimic their Linux counterparts but operate on a local HFS partition. If you need complementary functions, an excellent shareware utility by Michael Pollet called LinuxDisks allows file transfer to and from MkLinux partitions from within the Mac OS.