Installing LinuxPPC 2000
A Mac OS LinuxPPC installer is provided on the CD and appears on the Mac OS desktop when you insert the LinuxPPC 2000 CD into your DVD. Do not install LinuxPPC 2000 using this installer. Finally, we are at the moment of truth. Insert your LinuxPPC 2000 Install CD into your DVD drive and once again restart your system. As the system shuts down and comes back up under a warm restart, hold down the 'c' key to boot your G4 off the DVD drive. The system will boot using the LinuxPPC installer. Please take note that for a G4, we are booting off the CD for installation.
As your system reboots, your machine will come up with a black background screen with green letters. This is okay. We are not booting Mac OS and you will not see the familiar boot screen. In green text you should see the system prompt,
boot:, and a stroke of the TAB key will generate a list of appropriate responses to this request. What you want to type in at this prompt is the command
install. The LinuxPPC graphical interface, X Linux Installer, will then execute.
X Linux Installer
Once the X Linux Installer window is visible on your screen, you may proceed with finishing the partitioning of your Linux volumes. You will see a window titled X Linux Installer. This window has the following options (buttons) available:
- Partition Drives
- Selected Partitions
- Choose Packages
- Enter Password
- Linux Configuration
The choices highlighted above in bold text are the options that are currently available to you. Always select the Instructions if you are unsure of anything. Now is a good time to thumb through the instructions and get an idea of what lies ahead in the install process. Once you have thumbed through that, go ahead and select the button labeled Partition Drives. This action will launch a window titled "PerlDisk - V1.5". This is the graphical window you will use to partition the Linux root and Linux swap components of the LinuxPPC file system.
Partitioning with the Linux PerlDisk utility
Be careful what you select from this window. You can wipe out your 20G or 40G Mac OS boot hard drive from this window with the stroke of a button click. Direct your attention to the window labeled Drive Info. The first drive that is highlighted in this window is your Mac OS boot drive. It is labeled in the window using Linux device naming schemes. Note the drive is not listed as ATA 2 0, for your Mac OS boot drive, as it was labeled in the Mac OS Drive Setup utility. It is now labeled
/dev/hda. As I warned, do not touch this drive! Select the drive
/dev/hdb from the Drive Info list. This is the second drive, or drive ATA 2 1 we partitioned earlier using the Mac OS Drive Setup utility. Select drive
/dev/hdb and the partition information we display in the view labeled "Partitions:" of the PerlDisk utility window.
Find the partition of Type Apple_UNIX_SVR2 and Size 2.0G; this is the "
/" partition we created in the Mac OS Drive Setup utility. Recall we couldn't name partitions in the Mac OS Drive Setup utility, so go ahead and name the partition now using the Change Name list box. Select the "
/" root name option for this partition. You have now named the partition "
We need to do the same for our
/swap partition. Select the partition of Type Apple_UNIX_SVR2 and Size 256.0M from the Partitions display. Now select the name "swap" from the Change Name list box.
You have now successfully named your LinuxPPC partitions. Select the Quit button from the menu to exit. You will be returned to the X Linux Installer window. This concludes our drive partitioning.
Formatting and mounting LinuxPPC partitions
The partitioning of the "
/" and "
/swap" partitions is now completed. The next objective we need to complete is formatting and mounting the partitions. From the X Linux Installer window, double-click the "Select Partitions" button so you can begin formatting your partitions for the Linux file system. A new window, titled "Mount Partitions and Set Swap," will appear. Once again, this utiltiy is also capable of wiping out your Mac OS boot disk. Do not select to format anything with the partition label of
/dev/hda. This is your Mac OS boot drive. I repeat, do not format anything on this device!
Select the partition in field Partition of ID
/dev/hdb(some number) with the partition Name "
/". This is the Linux root partition. It is a good idea to write these device numbers down somewhere. You will need to know this device ID when you configure the
yaboot.conf file for your LinuxPPC Boot Mac OS volume. Select the check box to the right of this window to format the partition. If you fail to select the check box, the Linux installer will attempt to install software on the unformatted drive. If you see a lot of installation errors on your software install, it may be because you forgot to check this simple, harmless-looking little square button labeled "Format." You will need to select the radio button labeled "mkswap" for your swap partition as well. Do not select any other format button. This utility will wipe out your drives if you don't pay attention to what format buttons you are selecting. Only format your Linux partitions, leave the free space and Mac OS partitions alone!
Once you're confident of your formatting scheme, select the button labeled "Format and Mount." You are now on your way to installing your LinuxPPC 2000 software.
LinuxPPC 2000 software installation
Once your Linux partitions have been formatted and mounted, you are now ready to install the LinuxPPC software. Select the button labeled "Choose Packages" from the X Linux Installer window. If you want, you may select to install all the packages. The only exceptions may be the language packages such as Chinese or Japanese, depending on your individual needs.
You're now on your way! The Linux package installer will copy the files onto your system. Once you set your system password, you will be prompted to reboot. Your G4 will not reboot into the LinuxPPC 2000 operating system. There are still a few things we must do under Mac OS before this can occur.
Setting up the G4 for LinuxPPC Boot
When you are prompted to reboot your system go ahead and do so. Do not hold down the 'c' key this time. Let the G4 reboot into its native Mac OS. There are some things we must do to allow the G4 to boot with LinuxPPC. We are going to set up the G4 for dual boot, a nice little thing to have when you don't exactly want to completely abandon your Mac OS operating system, as would be the case if you formatted your factory-shipped drive for LinuxPPC.
Figure 5. LinuxPPC_Boot folder.
Once the system boots up in Mac OS 9, launch your native web browser. There is a file we need to retrieve off the Internet. The files we require are the LinuxPPC boot software for the G4. In LinuxPPC-nese, the G4 and newer iMacs are referred to as New World ROM machines. You will need to download the file LinuxPPC_Boot.sit from the linuxppc.org ftp server. This is a stuffit file; it will download and unstuff to your desktop as a folder titled LinuxPPC_Boot, the contents of folder as shown in Figure 5.
Setting up the LinuxPPC boot volume
This folder contains a special System folder. Your original factory-shipped 20G hard drive will retain its original System folder. The System folder found in the LinuxPPC_Boot folder needs to be copied over to the 50M LinuxPPC Boot Mac OS volume you created earlier. Essentially, just perform a Select All operation on the contents of the LinuxPPC_Boot folder and drag them over to the LinuxPPC Boot volume. Your LinuxPPC Boot volume should resemble the contents in Figure 6.
Figure 6. LinuxPPC Boot volume.
From this figure you can see my empty LinuxPPC_Boot folder from which I dragged all the contents onto the root level of the LinuxPPC Boot volume. The two important items are the secondary System folder and the kernel "vmlinux.2.2.15pre3," which is required for New World ROM machines.
Blessing the new Finder
Once you have installed the new System folder on the LinuxPPC Boot volume, we will need to bless the Finder. Open the new System folder (the contents of this folder are shown in Figure 7), and examine the system files.
Figure 7. LinuxPPC Boot System Folder.
Four important files reside in the LinuxPPC Boot volume System folder. The first file is the new Finder, which is required for booting a G4 under Linux. The second file is the MacOS ROM folder for New World machines, the third file is the special System file, and the fourth file is the yaboot.conf configuration file.
There is a process called blessing the Finder found in the LinuxPPC Boot System folder. This involves dragging the Finder out onto your desktop and then back into the LinuxPPC Boot volume System folder. Once this is done, the new Finder is considered blessed.
Configuring the startup disk in the control panel
To boot LinuxPPC from the second ATA drive, you must configure this as the boot device. This operation can be accomplished using the Startup Disk control panel. My factory-shipped ATA drive, volume name TheMatrix, is my standard Mac OS boot device. However, for booting into LinuxPPC, I must select the LinuxPPC Boot volume as my startup device, as shown in Figure 8.
Figure 8. Configuring the LinuxPPC Boot volume as Startup Disk.
Do you Yaboot?
You will need to configure the
yaboot.conf file in your LinuxPPC Boot folder. This file contains the set of instructions the boot process and kernel required to boot your G4 using LinuxPPC 2000. For booting a G4, here is the configuration file for
init-message = "\nWelcome to LinuxPPC!\nHit <TAB> for boot options.\n\n"
timeout = 50
default = linuxppc
image = vmlinux.2.2.15pre3
label = linuxppc
root=/dev/hdbnn <put your "/" partition device id here>
image = vmlinux_ibook
label = ibook
Remember the device name I told you to write down back when you were partitioning the root partition in the X Linux Installer? That device ID needs to be inserted into the
yaboot.conf configuration file for the
root= descriptor. It would look like
/dev/hdb10, as examples.
Now you're probably wondering, how do you get back into Mac OS if you want to? When your system boots, hold down the "option" key. The screen will display your normal volume with a Mac OS boot volume on it, in my case, the volume TheMatrix. I can select to boot my G4 using this partition. In this manner, I can start up my G4 in Mac OS if I want to. The G4 under this configuration will always boot into LinuxPPC 2000 unless I intervene with the "option" key at time of startup. This gives the system a little flexibility in choosing which operating system you want to use. I usually leave my LinuxPPC workstation up for days on end, and I only reboot into Mac OS when I need to use Microsoft Office or make a new network drawing using Visio on Virtual PC Windows 2000.
Give it the boot!
By now you have worked hard setting up your LinuxPPC 2000 and you're probably anxious to boot your system. Check your yaboot.conf file once more for any obvious errors and double-check your Startup Disk control panel. If all looks well, give the system a warm restart. After rebooting, you should see the LinuxPPC 2000 logo screen with a login dialog box for user root. Go ahead and log in, you deserve it.
What could possibly go wrong?
A saying I frequently use at work that is synonymous to Murphy's Law is, "What could possibly go wrong?" I set up this guide so you could set up your LinuxPPC 2000 workstation in one afternoon or in incremental steps over a few evenings after work. If this is your first Linux installation, I recommend the incremental approach. Take it slow. The whole install may go very smoothly, or some problems may surface. Not to worry, there is an excellent e-mail support alias, email@example.com. I found this list instrumental in gathering the details I have presented here.
If this is your first install, just be patient and take it slow. Follow the steps provided here incrementally. Using Linux is a lot like building an old hot rod: The project is never really ever finished. There is always so much you want to do to enhance your workstation. The first step is to install your operating system and to acknowledge the wealth of information that is available online using the LinuxPPC mailing list. Just tell the list you're new to LinuxPPC or this is your first install on a G4. The people on this list are all very helpful.
Michael J. Norton is a software engineer at Cisco Systems.
Discuss this article in the O'Reilly Network Linux Forum.
Return to the Linux DevCenter.