Handbook:PPC/Blocks/Disks

Partitions
Although it is theoretically possible to use a full disk to house a Linux system, this is almost never done in practice. Instead, full disk block devices are split up in smaller, more manageable block devices. On most systems, these are called partitions.

Apple New World
Apple New World machines are fairly straightforward to configure. The first partition is always an Apple Partition Map. This partition keeps track of the layout of the disk. It is not possible to remove this partition. The next partition should always be a bootstrap partition. This partition contains a small (800k) HFS filesystem that holds a copy of the bootloader Yaboot and its configuration file. This partition is not the same as a partition as found on other architectures. After the boot partition, the usual Linux filesystems are placed, according to the scheme below. The swap partition is a temporary storage place for when the system runs out of physical memory. The root partition will contain the filesystem that Gentoo is installed on. To dual boot, the OSX partition can go anywhere after the bootstrap partition to insure that yaboot starts first.

Example partition structure for Apple New World

Apple Old World
Apple Old World machines are a bit more complicated to configure. The first partition is always an Apple Partition Map. This partition keeps track of the layout of the disk. It is not possible to remove this partition. When using BootX, the configuration below assumes that MacOS is installed on a seperate disk. If this is not the case, there will be additional partitions for "Apple Disk Drivers" such as Apple_Driver63, Apple_Driver_ATA, Apple_FWDriver, Apple_Driver_IOKit, Apple_Patches and the MacOS install. When using Quik, it is necessary to create a boot partition to hold the kernel, unlike other Apple boot methods. After the boot partition, the usual Linux filesystems are placed, according to the scheme below. The swap partition is a temporary storage place for when the system runs out of physical memory. The root partition will contain the filesystem that Gentoo is installed on.

Example partition layout for Old World

Pegasos
The Pegasos partition layout is quite simple compared to the Apple layouts. The first partition is a Boot Partition, which contains kernels to be booted, along with an Open Firmware script that presents a menu on boot. After the boot partition, the usual Linux filesystems are placed, according to the scheme below. The swap partition is a temporary storage place for when the system runs out of physical memory. The root partition will contain the filesystem that Gentoo is installed on.

Example partition layout for Pegasos systems

IBM PReP (RS/6000)
The IBM PowerPC Reference Platform (PReP) requires a small PReP boot partition on the disk's first partition, followed by the swap and root partitions.

Example partition layout for the IBM PReP

Using mac-fdisk (Apple)
At this point, create the partitions using mac-fdisk:

If Apple's Disk Utility was used prior to leave space for Linux, first delete the partitions that might have been created previously to make room for the new install. Use in mac-fdisk to delete those partition(s). It will ask for the partition number to delete. Usually the first partition on NewWorld machines (Apple_partition_map) cannot be deleted. To start with a clean disk, simply initialize the disk by pressing. This will completely erase the disk, so use this with caution.

Second, create an Apple_Bootstrap partition by using. It will ask for what block to start. Enter the number of the first free partition, followed by a. For instance this is 2p.

Now create a swap partition by pressing. Again mac-fdisk will ask for what block to start this partition from. As we used 2 before to create the Apple_Bootstrap partition, now enter 3p. When sked for the size, enter 512M (or whatever size needed -- a minimum of 512MB is recommended, but 2 times the physical memory is the generally accepted size). When asked for a name, enter swap.

To create the root partition, enter, followed by 4p to select from what block the root partition should start. When asked for the size, enter 4p again. mac-fdisk will interpret this as "Use all available space". When asked for the name, enter root.

To finish up, write the partition to the disk using and  to quit mac-fdisk.