I recently embarked on a quest to get LinuxPPC installed on my Powermac G4/500 at work. Below is a record of my travails, in the hope that others may avoid some of the same pitfalls I ran into. This is an alternative guide to those found on the LinuxPPC site at http://www.linuxppc.com in the support section. Note: The Powermac G4 is a 'New World ROM' machine, so when looking for linuxppc info on it make sure to follow New World ROM directions.

Open Firmware

Repeat after me: Open Firmware (OF hereafter) is a gooood thing. Open Firmware is essentially the hardware-based bootstrap shell that resides in all CHRP/PReP machines' (remember them?) firmware. It is, for our purposes, also the best way to recover from a startup drive oops on a Powermac G4. Remember this now, so as not to panic later. If you reset a G4 using the front NMI button (the convex one), and as soon as you hear the startup chord hold down the programmer's switch (the convex button below the power switch) for five seconds and release it, you will get a white screen with black text on it and a fairly cryptic prompt. Don't panic. This is Open Firmware, a FORTH-like interpreter shell. All you need to do is type the following:


...and OF will find the hard drive with a valid MacOS startup block and boot from it. This is true even if you set the other drive to be the 'startup disk' in the MacOS. This is important. Trust me. Remember this. Okay? Here we go.


This writeup applies to LinuxPPC 2000 only, and everything you do is at your own risk! Beware! Okay, that out of the way, I'll assume you have the following:

  • Powermac G4
  • LinuxPPC distro, preferably on the bootable CD
  • The file 'New_World_Boot.sit.bin' from LinuxPPC.org; check in the 'support' area.
  • USB keyboard/mouse, such as the Apple Pro Mouse or what-have-you
  • A new IDE 3.5" hard drive (well, erasable at least)
  • 4 drive mounting screws (Philips)
  • Philips head screwdriver (you don't? And you call yourself a geek. Go get one. Hurry.)

First things first. BACK UP YOUR MAC. Really. Not kidding. Okay? Good. Now, shut down the G4. Open up the case. Marvel at the industrial design. Locate the IDE drive, which is on the base of the unit near the rear. Remove the cables from it to expose the locking screw for the drive carrier (Philips). Remove the screw. Aren't you glad you listened and got a driver? Okay, now, the drive carrier has two tabs on the end opposite the locking screw that hold it in, so if you lift on the end where the screw was, it should slide right out. Got it? Good.

Preferably on a static-free surface, place the drive carrier with the drive side up. Before mounting the second drive, make sure the jumpers on it are set to 'SLAVE.' Most drives have a sticker near the jumpers or on the edge of the cable connector showing what configuration of jumpers you'll need. Now, mount the drive in the carrier. Note that the edges of the carrier are slightly wider than some drives in order to accomodate oversized units; if you have a smaller drive, don't worry, just don't tighten the screws up so far that the carrier is against the drive edge.

When you have that all set, remount the drive carrier. Plug in the cables, IDE with the end connector on the original (lower) drive and the middle connector on the new (upper) drive. Make sure the power connectors are plugged in. Close the G4, marveling again at the smooth action and neato shape.

Boot the Mac.

When the Mac boots up, if there was no Mac or PC partition on the drive you just installed, it won't show up on the desktop. That's fine. Find the 'Drive Setup' utility. The MacOS leaves it in a folder marked 'Utilities' after an install, but if you can't find it anywhere else, it's on the MacOS CD that came with your Mac. Run it. You should see a listing of all drives attached to the Mac (including the new drive and the CD/DVD). Select the second drive and then select 'Initialize.' Select the 'Custom...' button in order to select your new volume preferences. When the volume window comes up, tell it you want a four-partition setup. Make the first partition 50 MB, and MacOS. The second should be 1.5-2x your RAM in size, and of type 'A/UX swap' (this will be your swap partition). Third should be a 100MB 'A/UX User' type partition, and the fourth (same type) should contain the rest of the drive's free space. You need a MacOS partition on the drive so that Open Firmware finds and boots the partition; don't worry.

Tell it OK, and wince as it nukes the drive. Check that you didn't nuke your MacOS drive, again, just to be sure. If you did, see single malt scotch and crying. If not, rejoice and continue.

yaboot, the LinuxPPC boot loader. It's quite similar to LILO for you Linux hackers. Hitting 'tab' will list the available boot images; you want the one labelled 'Install'. Type 'install' and hit return. You should get a friendly Tux the Penguin logo and then see the linux bootscroll, lots and lots of obscure hackerese as your machine talks to itself about what's in there. Eventually, if all goes well, your machine should start the X Window System, and give you a dialog reassuring you that it's loading the installer.

When the X desktop comes up, there will be one window open, which contains a number of buttons. This is the installer window. The first thing you want to do is to select the 'Partition Drives' button, because we need to modify the partitioning scheme a tad. This will run a utility named perldisk, a

workalike. When this comes up, you'll be able to look at the partition structure on both your IDE drives. Make SURE you select the second, or new drive; if it's the slave, it wil be labeled either '/dev/hdb' - this is linuxese - or 'ultra1:' - this is its Open Firmware designation.

Now, you'll see a bunch of partitions that you won't remember putting there. That's OK. Make sure this is your Linux disk by finding your 50 MB MacOS partition (it'll probably be listed as partition 8 in this window, or /dev/hdb8). Now, select and delete all the partitions before it - you don't need them, they're just Apple MacOS drivers which we won't need. Leave the MacOS partition. Then, select the next (swap) partition. If the partition type is not 'APPLE_UNIX_SVR2' or 'APPLE_FREE', then simply delete the partition and all others after the MacOS partition and recreate them (three partitions, one is 1.5X your RAM, one is 100MB, the other is the rest). Now, quit and save (perldisk calls this a 'destructive quit). The Mac should warn you that it will reboot; let it. Hold down the 'c' again to boot off the LinuxPPC installer, and once more select the 'install' image.

Now, once you're back in the installer, select the 'Select Partitions' button. This will allow you to assign mount points to each of your partitions. The mount point is the last column in the window. Make sure the MacOS volume does not have a mount point. The swap partition should have the 'swap' button next to it checked; if not, select the button and remove any mount point. The third (100MB) partition should be mounted at '/boot', and the fourth at '/'. Don't put the quotes in the window. NOTE CAREFULLY which partition is the 'root' partition ('/'); in this scheme it should be the fifth partion (/dev/hdb5) because there will be a partition of free space before the MacOS partition where all those mac drivers were. Whatever it is, though, remember this. In fact, write down where all your partitions are. Once that's done, say OK. When this has been completed, you should be able to click the 'Install' button to copy LinuxPPC onto your computer! It's safe to say 'Install everything,' which is a button at the top of the window; however, be sure to open up the menu section labeled 'Languages' (or perhaps 'Localization') and DESELECT the package named 'locale-ja' or something like that. Otherwise, everything will come up in Japanese. Very disconcerting if you don't read it. Actually, it's safe to just disable the entire 'Language' section. If you change your mind later, it's easy to install.

Now have a Mountain Dew or something while it installs, 'cuz it'll take around ten or twenty minutes. Don't worry if at times it looks like it's stalled; it'll keep going. Don't panic and reboot unless it has been sitting there fifteen minutes without any sign of life; it'll normally be changing the name of the current package at the bottom of the window every few seconds. Sometimes the line will go blank for up to a minute; don't panic.

Okay. It'll ask you for a root password. Give it one and don't forget it, or you'll feel silly. Now let it reboot your machine, and remove the LinuxPPC CDROM. If it boots into yaboot, great; but it probably won't. It'll probably boot into the MacOS off your primary drive. That's good. When it does so, make sure that you can see the MacOS partition on your new drive on your Mac desktop. If you can, great; now you need that pesky mac file named 'New_World_Boot.sit.bin'. If you already downloaded it from LinuxPPC.org, it should have unstuffed into a folder. Take everything in the folder (a System folder and two or three individual files) and copy it to the new MacOS volume. Open the system folder there, and edit the file named 'yaboot.conf.' In it, you'll see a list of all the possible boot images which this installation of yaboot thinks it can execute. Some will be wrong. The one you're primarily concerned with is the one labeled 'linuxppc.' It's usually first. Make sure to add the following line to that section:

root = /dev/hdb5

Wait a minute! I hear you scream. How do I get back the MacOS? Well, there's a couple of ways. The easiest (I've found) is to simply hit the programmer's switch during boot, and type 'mac-boot' into the Open Firmware prompt. This is of course kind of cumbersome. If you check out the web, especially the LinuxPPC site, there is a HOWTO on how to write your own Open Firmware boot script that will let you select which bootable partition you'd like to start from at power-up. This will make your machine a true dual-boot computer, MacOS and Linux. Now that you've got Linux running, I strongly recommend you check out mac-on-linux, which will let you run the MacOS in a window or fullscreen while you're running Linux! Truly, the best of both worlds.

Hope this helps.

Log in or registerto write something here or to contact authors.