You now have your second hard drive installed and your system boots normally. We need to go in and format the new drive for installation of LinuxPPC. My intentions for installing a secondary drive, as I stated, are for using operating systems other than Mac OS. This may be your first Linux installation or it may be your hundredth. If this is your first time for installing Linux, let's take a look at what needs to be done to your new hard drive.
The first thing we need to do is format your new hard drive. Before you can proceed, you must consider how you want to partition your new hard drive. My new ATA drive has a capacity of 10G. I wish to install two operating systems on this drive, LinuxPPC and Connectix Virtual PC Windows 2000. Having two operating systems means that my hard drive requires at least two different file systems. I must partition my hard drive to handle these two distinct file systems. Fortunately, for the sake of this example, Connectix Virtual PC Windows 2000 resides on the Mac OS file system. This means I can partition one big contiguous chunk of the hard drive to a capacity of 7G (an arbitrary value I choose for holding AutoCAD and Visio files) under the Mac OS HFS (hierarchy file system).
Linux requires a different file system and we must make some considerations in advance for these partitions. If you are just experimenting with a LinuxPPC installation, you will need to create a LinuxPPC boot partition, a "/" (root) partition, and a "/swap" (swap) partition. Lastly, you will need to allocate at least a 150M free-space partition. To sum up, you will need a bare minimum of four partitions for a LinuxPPC installation.
LinuxPPC boot -- Mac OS partition
Now let's take a look at partition size considerations for a LinuxPPC install. I mentioned you would need four partitions, bare minimum. These are the LinuxPPC boot, root, swap, and free space. The LinuxPPC boot partition is required for booting your Macintosh. Please take note that this is a standard Mac OS partition. The size of this partition, which we will use later in the install process as a special Mac OS system folder partition, is 50M .
Root and swap - A/UX partitions
Our next two partitions are "/" (root) and "/swap". These partitions require the A/UX (Apple Unix) file system partitioning schemes. Your "/" partition should be no greater than 2G. Although it can be larger, a good rule of thumb is to keep partition sizes for Linux no greater than 2G each. I allocated 2G to my "/" partition and I still have plenty of room to spare on my LinuxPPC file system for playing around with software downloads. This partition is of type A/UX root. More on this when we partition our hard drive with the drive setup utility.
We now need to partition a "/swap" (swap space) partition on our drive. This partition will be used by the LinuxPPC 2000 operating system. It is needed when you run memory intensive applications, such as X-Windows and GNOME. The operating system uses this partition to swap items between RAM and disk for optimizing memory utilization. A rule of thumb is to allocate a swap space of two times your system's total memory. My G4 was shipped to my doorstep with a memory capacity of 128M. I therefore allocated a swap space partition of 256M. This partition scheme is of type A/UX swap.
Apple free space
The Macintosh operating system, like the LinuxPPC operating system, requires that you leave a partition of free space on your hard drive. This space will be used by the operating system as it accesses files in the file system. For my 10G drive, I reserved less than 150M for free space.
In a nutshell, we will require at least four partitions for our LinuxPPC installation. Again, these are the Linux boot partition (50M Mac OS), Linux Root partition (~2G A/UX root), a swap partition (256M A/UX swap), and the free space partition (~150M Apple Extra Space). If you are going to experiment with this partition scheme on your system, you could set up three partitions using Apple's drive setup. The last partition, Apple Extra Space, isn't actually a partition we'll be setting up. I just want you be aware that at least 150M of free space needs to exist if you choose to carve up a lot of partitions on your new hard drive.
Formatting the hard drive
Partitioning and formatting your new hard drive for LinuxPPC is fairly simple. The LinuxPPC 2000 CD comes with a drive formatting utility called pdisk. I recommend using the Mac OS 9 drive setup utility. Since we are partitioning and formatting a secondary drive on our Macintosh G4, we can go ahead and use the drive setup utility found on your Mac OS boot drive under the Macintosh HD:Utilities:Drive Setup folder. Figure 1 shows the Drive Setup utility icon and its folder in the utilities folder location.
Figure 1. Drive Setup utility icon.
Double-click the Drive Setup utility icon and launch the application. I have included a screen-capture of my Drive Setup utility in Figure 2. The information displayed in the initial window is a list of drives the utility discovered on my system. My Mac OS native hard drive, volume name, TheMatrix, is listed as type ATA, its bus ID is 2, and the ID of the device in the bus is 0. This shows the volumes on my 20G hard drive as it comes factory equipped in my G4. The second listing shows multiple volume names, untitled, LinuxPPC Boot, and so forth. The bus ID is still 2 and this device ID for bus 2 is 1. This is my second drive, which I installed and already partitioned for LinuxPPC. You'll notice that both hard drives share the same bus, since they are sharing the same drive cable. The first device on the cable is ID 0 and the second device, which is the new drive, is ID 1.
Figure 2. Drive Setup volume names and bus IDs.
Your drive will probably show up with a volume name of untitled. If you installed the drive on the same drive cable as the first factory-shipped drive, your drive may also be set to bus 2 and ID 1 for this particular drive. Select this drive and then press the Initialize button as shown in Figure 2. You will see Drive Setup layer a new window over the previous Drive Setup window, titled Initialize, as seen in Figure 3.
Figure 3. Initialize the Drive Alert window.
From this alert window, select the Custom Setup button. We need to divvy up the drive into its new partitions. My second drive has more partitions on it than is necessary for a basic LinuxPPC installation. I do have a 50M Mac OS LinuxPPC boot partition, a 2G A/UX root partition, a 256M A/UX swap partition, and a 150M Apple Extra space partition, as well as a spare 50M Mac OS partition and a 7G Mac OS partition for Connectix Virtual PC Windows 2000. The accounting on my system works out to 5 partitions. Recall that the Apple Free Space isn't necessarily counted as a partition. I just mention this to keep you aware of its requirement to exist on your drive.
Once you have selected the Custom Setup button, as shown in Figure 3, a new window, titled Custom Setup, will appear. See Figure 4. This is the Mac OS 9 graphical interface for partitioning your hard drive. The interface is pretty flexible, and you can play around with setting up partitions. The Partitioning Scheme list box allows you to select the number of partitions you want for your new hard drive. If you don't know how many partitions you want, you can also experiment by typing in new partitions in the Volume Info field of the Custom Setup window. You can also start inserting partitions by selecting Mac OS Standard from the partition Type list box. You will not be able to insert the Name of the partition until after the drive is formatted. Enter a partition size of 50M in the partition Size field and create your LinuxPPC Boot volume as depicted in Figure 4. You can then select another contiguous chunk of your drive from the Volumes graphical partition display in the Custom Setup window and set up a new partition, such as your Linux root (partition type A/UX Root in the partition Type list box).
Figure 4. Custom Setup window to create a LinuxPPC Boot Mac OS partition.
Once you're satisfied with the partitioning scheme you have laid out, go ahead and format your new ATA drive. As a word of caution, make sure you aren't partitioning your Mac OS boot partition ATA 2 0. In theory, there should be a fail safe that the OS won't let you format the boot hard drive. But one can never be too careful. The drive you want to partition and format is ATA 2 1.
You can name your Mac OS volumes after the partition formatting is completed. Once the LinuxPPC Boot volume mounts, most likely it will be labeled Untitled, go ahead and rename the volume. Your A/UX partitions will not mount at this time, so don't get flustered if you don't see these volumes appear on your desktop. Please remember that A/UX and Linux are different file systems, and Mac OS doesn't understand these natively. When we install the LinuxPPC, we will format the "/" and "/swap" partitions as well as name them.
At this point in the venture, let's check our volumes and make sure all is well with our system. The Mac OS volumes you created should appear on the desktop. Try a warm restart on your system and make sure the system reboots properly. We want to make sure the Mac OS portion of our G4 is stable and operating properly.