Installing LinuxPPC 2000

2000: Since I have been banging away at LinuxPPC like a madman day and night for the last few weeks, I thought it would be nice to share how to actually get a LinuxPPC system up and running. It is unclear how many articles I am going to do in this series, but there are too many topics to cover that will not fit into one article.

Mac Metamorphosis

My original goal was to just build a LinuxPPC-based router, but as usual, I also found a bunch of side projects to embark on.

The system I used for the installation covered in this article is my Umax SuperMac S900 with dual 200 MHz 604e CPUs. It can’t run Mac OS very fast these days, and it makes an even worse Mac OS-based file server. Sure, I could spend some money on a G3 upgrade, but I think it will be more cost effective to run Linux until it finally decides to die on me.

I said before (in Linux for PowerPC) that LinuxPPC 2000 is my distribution of choice, and I still stand by that. You can grab the CD image from www.linuxiso.org, which is by far the fastest place to download Linux CD images. After downloading, use Toast or another CD burning program that is capable writing ISO format images.

That said, let’s get started.

Before getting to the actual installation of LinuxPPC, the first thing to think about is how the hard drive is going to be partitioned. This is very important if you are using one hard drive because if you don’t do it right and want to increase or decrease a partition, you have to start from scratch. LinuxPPC has issues with resizing drive partitions that have HFS (that’s the Mac’s Hierarchical File System) on them; it will not allow you to do so. I don’t recommend installing to your Mac OS hard drive, because you may back yourself into a corner later on. For my installation, I am using one drive.

Preparing to Install Linux

Using Drive Setup, I created four partitions on my 2.1 GB hard drive, and this is the sizes and types of partitions I created.

  • 400 MB HFS for Mac OS
  • 50 MB HFS
  • 1.5 GB A/UX Root
  • 125 MB A/UX Swap

There are many ways to get around having to use the Mac OS, but I have found that it is very useful to keep a copy on the hard drive just in case I need to get to it. 400 MB is more than enough to keep Mac OS happy and be able to store a few files here and there should I need to move any to that system. I am not using HFS Extended (HFS+) because stock LinuxPPC 2000 does not allow me to write to HFS Extended partitions.

The 50 MB HFS partition is used for booting. LinuxPPC includes BootX, which allows you to boot into Linux from the Mac OS, and if you are using a single-processor system I recommend that you use BootX. For those of you who may use multiprocessor systems like mine, you will want to put a program called miBoot on the 50 MB partition. This program allows you to boot directly into Linux from the Mac OS. I will cover the specifics in my next article, but multiprocessor users want to use miBoot and not BootX so you have the use of both processors.

The 1.5 GB A/UX root partition is going to be my root (/) drive in Linux. I am using an A/UX partition because Drive Setup cannot create Linux partitions, and the LinuxPPC 2000 partitioning utility cannot modify HFS partitions. Using A/UX I can change the type of partition it is during the LinuxPPC install to a native Linux file system, format it, and install to that.

The same thing goes for the A/UX swap partition, which is the equivalent of Mac OS virtual memory. Despite how fast your system is, always use swap because you will run into performance issues down the line when running Linux.

Once all that is done, you can move onto doing the Mac OS 9 installation. You may also use Mac OS 8.5, so long as Drive Setup supports creating A/UX partitions. I do not own a copy of 8.5, so I am not sure. Being that the Mac OS is more of a backup system, I moved straight onto the LinuxPPC installation after the Mac OS installation was done.

Installing LinuxPPC

All that needs to be done is drop in the LinuxPPC 2000 CD, run the installer, and double-click the “Boot LinuxPPC” Icon that gets put on your desktop.

When BootX starts after double-clicking “Boot LinuxPPC”, you have a choice of kernels. On my FireWire PowerBook, this would be important, because the stock kernel doesn’t work. Since this is a very generic system in the eyes of LinuxPPC, just clicking the “Linux” button and leaving everything else alone will do just fine for now.

LinuxPPC will attempt to load a graphical installation program that makes life a lot easier. The only reason the graphical install won’t load is if you are using some weird video card that hasn’t had a driver written for it.

Once the X Linux Installer GUI loads, you are presented with these options: Instructions, Partition Drives, and Select Partitions. The first step is to partition the drives, which you already did using Drive Setup. You are not really partitioning at all – you are just changing the type of the A/UX Root & A/UX Swap partitions. The partition utility will identify the type of those partitions as Apple_UNIX_SVR2. Clicking the “Convert Type” button once will change the type to Linux_PPC, which is what you want. A window will pop up after clicking Quit displaying a warning. Two options are then given “Destructive Save” and “Safely Exit”. Destructive Save is the option that will make the changes to the disk’s partition table. Safely Exit will make no changes.

A reboot is required to save the changes, and the LinuxPPC installer will load again. It is now time to move onto “Select Partitions”, where the partitions will be formatted and be given mount points. The root (/) drive’s name will be A/UX Root, and its mount point will be “/”. Since this is a brand new file system, the format button needs to be checked.

Before proceeding, what partition the root drive needs to be remembered for BootX after the installation is complete. BootX needs to be told what the root partition is in order to boot LinuxPPC. SCSI devices will always be /dev/sda*, and IDE will be /dev/had*. For me, my root partition is going to be /dev/sda9.

I do wish to have my other HFS partitions mounted, which show up as untitled and untitled 2. I can tell the difference between the partitions by their reported size. The 400 MB HFS partition will be given a mount point of /macos. The 50 MB HFS partition will be given a mount point of /boot for use with miBoot later on.

All that is left to finish the installation is to click “Format & Mount” and select the packages you want to have installed. There is nothing that really needs to be removed from the default selections, but a few things need to be added for my purposes.

For routing, I require the package “ipchains”” which is in the Network Applications & Utilities category. Another package is “netatalk”, which allows Linux to act as an AppleShare file server – that can come in quite handy. Finally, I need a portion of the Development category for compiling and such.

After all, packages are selected, just click “Install” and kick back. Once the packages are done installing, a root password window will appear for you to pick what the root password is going to be.

The last thing that needs to be done after rebooting is to tell BootX not to use a RAM drive, which is located under the “Options” button. The RAM drive actually contains the LinuxPPC installer, which you no longer have a use for. After unchecking and exiting, there will be a line that says “Root device : /dev/” and a blank space. Since my root drive is /dev/sda9 that is what I will put in, then click “Save to prefs”, and finally click the “Linux” button.

You should now have a working LinuxPPC 2000 system. In upcoming articles, I will cover multiprocessing, Xwindows, routing, firewalls, kernel hacking, and a few other things.

If you’re interested in running Linux or BSD on PowerPC Macs, consider joining our Linux on PowerPC Macs group on Facebook.

keywords: #linuxppc #ppclinux