10.3. Emulators on Mac OS X

 < Day Day Up > 

10.2. Linux on Mac Hardware

Linux will run on Apple hardware based on the Motorola 68020 (and higher) as well as PowerPC-based Macs. However, this section talks only about what you need to do to get it running on a Mac OS X-capable Mac.

You can learn how to get Linux running on that old Centris you're using as a doorstop at the Linux/mac68k Project (http://www.linux-m68k.org), or the Debian on Motorola 680x0 pages (http://www.debian.org/ports/m68k).

There are several distributions of Linux you can choose for your PowerPC Macintosh. Speaking of an old Centris, if you want to see something really wild, how about a 25 MHz Centris running Linux running PearPC running Mac OS X Panther? See all the gory details at http://www.appletalk.com.au/articles/68kpanther.

10.2.1. Picking a Linux Distribution

Of course, if you're going to run Linux on your Mac, you'll need to know which brand will work with your hardware, and there are a few to choose from. This list should give you an idea of what's available for your Linux hacking needs:

Yellow Dog Linux

Based on Red Hat's Fedora Core, Yellow Dog Linux (http://www.yellowdoglinux.com) is one of the most popular Mac-based Linux distributions, and it runs on Macintoshes based on the G3 (with built-in USB), G4, and G5. If your Mac can run Mac OS X, then it will probably run YDL.

Gentoo Linux

Gentoo Linux (http://www.gentoo.org) is a hacker's dream. Although you can install it using pre-built binaries, the preferred method is to bootstrap a minimal system and compile the bulk of it by source. Gentoo is one of the few Linux distributions where you need to run chroot as a standard part of the installation process. Install it sometime, and you may learn a lot about Linux. Gentoo will run on the PowerPC chipset, as well as pre-G3, G3, G4, and G5 Macs.

Debian GNU/Linux

Debian (http://www.debian.org/ports/powerpc) runs on a lot of different hardware, including PowerPC (including pre-G3 all the way up to G5s) Macs. Debian is known for its wide selection of packages, hacker-friendly configuration, and bleeding-edge releases that are hard to resist even when you know better.


If you like Debian, there's a very good chance you'll adore Ubuntu (http://www.ubuntulinux.org), a Debian-based Linux distro that is an excellent desktop Linux but it's not dumbed-down. Ubuntu detects and configures your oddball hardware and launches X11 with a very pretty face, but still lets you take control. You can find Ubuntu Linux for Power PC Macs (pre-G3 through G4s).

10.2.2. Compatibility Details

Although Linux for PowerPC is generally compatible with Macintosh hardware, there are a few areas that you need to watch out for: hardware on newer Macs, AirPort Extreme, Bluetooth, and power management.

The newest-generation Macs are likely to be untested with the most current release of Linux for the PowerPC, and also may have glitches that won't be fixed until a new version of the Linux kernel is released. For example, at the time of this writing, the Yellow Dog Linux hardware compatibility pages (http://www.yellowdoglinux.com/support/hardware/breakdown/index.php) indicates that the 17-inch PowerBook does not support sleep, external video, and the built-in modem, audio is iffy, and Bluetooth is untested (and therefore not supported). However, the older Titanium PowerBooks get better scores with iffy audio and no external video.

It's quite likely that AirPort Extreme won't work either, since the chipset maker (Broadcom) has not released the information necessary for Linux developers to support their product. So, if you want to run PowerPC Linux on a Macintosh with AirPort Extreme, you'll need to use either a supported PC card or a USB Wi-Fi adapter.

10.2.3. Partitioning for Linux

If you have the benefit of planning ahead, partitioning for Linux is a piece of cake. That is, if you are installing Mac OS X from scratch, you may as well partition your drive and leave some space for Linux. If you aren't installing Mac OS X from scratch, you really should consider reinstalling. If you don't want to reinstall, use Carbon Copy Cloner (www.bombich.com/software/ccc.html) to clone your Mac OS X install to an external drive, then reformat your internal drive to accommodate Linux, and finally clone Mac OS X back to your internal drive.

When you (re-) partition your hard drive, take the following steps:

  1. Create one extra partition of at least 4 GB (enough room to run Linux comfortably).

  2. Set its format to Free Space as shown in Figure 10-2.

  3. Use the rest of the space for any Macintosh partitions you need.

When you install Linux, tell it to use that free space. The distribution you're installing creates the Linux and swap partitions in that space. Some Linux distributions may offer to use the entire disk by default, so you'll need to override this. For example, in Ubuntu 4.10 (Warty), select "Manually Edit Partition Table," scroll down to the partition marked FREE SPACE, press Enter, and then select "Automatically partition the free space" from the menu that appears.

Figure 10-2. Partitioning your hard drive for Linux

If you don't want to repartition, you could install Linux on a separate drive. Given that storage is cheap (as little as 50 cents a GB if you find the right deal), it shouldn't be hard for you to put a second drive in your Mac. If you're running Linux on a PowerBook, some intrepid souls have managed to boot Linux on an external drive, but it is notoriously difficult. For some details, see the discussion thread at http://www.ubuntuforums.org/showthread.php?t=3952. As of this writing, Terra Soft Solutions, the developers of Yellow Dog Linux, have just announced support for external FireWire drives, and have begun selling FireWire drives preloaded with Yellow Dog Linux. For more information, see http://www.terrasoftsolutions.com.

10.2.4. Booting into Linux

Linux installs a bootloader, such as Yaboot (http://penguinppc.org/bootloaders/yaboot/), which the distribution uses to boot the Linux distribution, much in the same way Mac OS X boots with help from BootX (see Chapter 3). If the bootloader is installed on the Linux partition, you'll only see the bootloader if your Linux partition remains selected as your Startup Disk. If you switch the Startup Disk settings (System Preferences Startup Disk), you can easily boot into Linux by holding down the Option key when you boot your Mac. Choose the disk with the Linux penguin (Tux) logo to boot into Linux. Figure 10-3 shows three bootable disk options.

Figure 10-3. From left to right: partitions for Mac OS X Panther, Linux, and Mac OS X Tiger

If you place the Free Space partition at the beginning of the hard disk, Yaboot will be the first bootable partition, and your Mac hardware will boot that partition by default if you reset Open Firmware to factory defaults.

For more information, see the Yaboot HOWTO at http://penguinppc.org/bootloaders/yaboot/doc/yaboot-howto.shtml/.

10.2.5. Mac-on-Linux

Mac-on-Linux (http://www.maconlinux.org) is a hardware "virtualizer" that provides a virtual machine environment that is Mac-compatible enough for you to run Linux, Mac OS (7.5.2 through 9.2.2), and Mac OS X (10.1 through 10.3.3 as of this writing). Mac-on-Linux emulates the bits that it needs to, but when the operating system running in the virtual machine accesses the hardware of the virtual environment, Mac-on-Linux virtualizes the call and passes it right on down to the real hardware.

     < Day Day Up > 

    Mac OS X Tiger for Unix Geeks
    Mac OS X Tiger for Unix Geeks
    ISBN: 0596009127
    EAN: 2147483647
    Year: 2006
    Pages: 176

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net