Apple Partition Map


Apple Partition Map is a partition scheme used to define the low-level organization of data on disks formatted for use with 68k and PowerPC Macintosh computers. It was introduced with the Macintosh II.
Disks using the Apple Partition Map are divided into logical blocks, with 512 bytes usually belonging to each block. The first block, Block 0, contains an Apple-specific data structure called “Driver Descriptor Map” for the Macintosh Toolbox ROM to load driver updates and patches before loading from a MFS or HFS partition. Because APM allows 32 bits worth of logical blocks, the historical size of an APM formatted disk using small blocks is limited to 2 TiB.
The Apple Partition Map maps out all space used and unused on disk, unlike the minimal x86 master boot record that only accounts for used non-map partitions. This means that every block on the disk belongs to a partition.
Some hybrid disks contain both an ISO 9660 primary volume descriptor and an Apple Partition Map, thus allowing the disc to work on different types of computers, including Apple systems.

Intel-based Macs

For accessing volumes, both APM and GUID partitions can be used in a standard manner with Mac OS X Tiger and higher. For starting an operating system, PowerPC-based systems can only boot from APM disks whereas Intel-based systems generally boot from GUID disks. Nevertheless, Intel-based Macs are able to boot from APM, GPT and MBR.
Intel-based models that came with Mac OS X Tiger or Leopard preinstalled had to be able to boot from both APM and GUID disks due to the installation media for these universal versions of Mac OS X, which are APM partitioned in order to remain compatible with PowerPC-based systems. However, the installation of OS X on an Intel-based Mac demands a GUID partitioned disk or will refuse to continue, the same way installation on a PowerPC-based system will demand an APM partitioned destination volume. Cloning an already installed OS X to an APM partition on Intel systems will remain bootable even on 2011 Intel-based Macs. Despite this apparent APM support, Apple never officially supported booting from an internal APM disk on an Intel-based system. The one exception for a universal version of Mac OS X is an official Apple document describing how to set up a dual bootable external APM disk for use with PowerPC and Intel.

Layout

Each entry of the partition table is the size of one data block, which is normally 512 bytes. Each partition entry on the table is the size of one block or sector of data. Because the partition table itself is also a partition, the size of this first partition limits the number of entries to the partition table itself.
The normal case is that 64 sectors are used by the Apple Partition Map: one block for the Driver Descriptor Map as Block 0, one block for the partition table itself and 62 blocks for a maximum of 62 data partitions.
Each partition entry includes the starting sector and the size, but also a name, a type, a position of the data area and possible boot code. It also includes the total number of partitions in that partition table. This ensures that, after reading the first partition table entry, the firmware is aware of how many blocks more to read from the media in order to have processed every partition table entry. All entries are in big-endian byte-order.

Partition identifiers

Types beginning with "Apple_" are reserved for assignment by Apple, all other custom defined types are free to use. However registration
with Apple is encouraged.
Identifier / typeContents / file systemName Remarks
Apple_BootbootloaderMOSX_OF3_Booter, eXternal booterThis boot partition is used by Mac OS X on New World Macs when the file system on the main partition is not supported by Open Firmware, like in a software RAID configuration or when using a HFS+ case-sensitive or a UFS file system. It contains BootX on an HFS filesystem.
Apple_Boot_RAIDbootloaderRaid Partition
Apple_BootstrapNewWorld bootblockAlthough it is a general Open Firmware boot partition, it is specifically used by yaboot. It must be HFS formatted, so that it can be accessed by Open Firmware.
Apple_Driverdevice driverMacintoshMac OS classic drivers partition
Apple_Driver43SCSI Manager 4.3 device driverMacintoshMac OS classic drivers partition
Apple_Driver43_CDSCSI CD-ROM device driverMacintoshMac OS classic drivers partition
Apple_Driver_ATAATA device driverMacintoshMac OS classic drivers partition
Apple_Driver_ATAPIATAPI device driverMacintoshMac OS classic drivers partition
Apple_Driver_IOKitI/O Kit driverMacintoshMac OS classic drivers partition
Apple_Driver_OpenFirmwareMacintosh
Apple_ExtraunusedThis identifier masks an unused partition map entry.
Apple_Freefree spaceExtraThis identifier masks free space as a partition map entry.
Apple_FWDriverFireWire device driverMacintoshMac OS classic drivers partition
Apple_HFSHierarchical File SystemApple_HFSWhile normally a HFS or HFS+ volume for Mac OS and Mac OS X, it can also contain an MS-DOS formatted file system.
Apple_HFSXHFS PlusThis partition contains a HFS+ volume without a HFS wrapper. HFSX was introduced with Mac OS X 10.3 and is only used in special cases, like case sensitive HFS+. HFSX is the standard partition type on Intel-based Macs.
Apple_LoaderSecondaryLoaderLike Apple_Boot but on Old World Macs, it is used when Mac OS X is installed on a file system not readable by Open Firmware. This partition does not contain a filesystem—instead it contains the BootX machine code in XCOFF format. This partition type was discontinued with Mac OS X 10.3.
Apple_MDFWfirmwarefirmwareThis partition is used by iPod to load the firmware/OS.
Apple_MFSMacintosh File SystemThis partition is used by Mac OS for the Macintosh File System, which was introduced with the Macintosh 128K in 1984.
Apple_partition_mappartition mapAppleThe partition map is also a partition of its own. It can vary in size depending on how many partitions it may contain.
Apple_PatchespatchesPatch PartitionMac OS classic patch partition
Apple_PRODOSProDOSProDOS file system
Apple_RAIDRAIDApple_RAID_OfflineV2This identifier marks a Mac OS X partition used in a software RAID configuration. It normally contains the same filesystems a regular Mac OS X installation would have, like HFS/HFS+ or UFS. The separate boot partition Apple_Boot is mandatory.
Apple_Rhapsody_UFS Unix File SystemMac OS X ServerThis partition contains a Unix File System used by the Apple Rhapsody operating system and is also used by Mac OS X Server 1.0 through 1.2 v3.
Apple_Scratch emptyThis identifier marks an empty partition.
Apple_SecondSecond stage bootloader
Apple_UFSUnix File SystemMac OS XThis partition contains a Unix File System and is used by Mac OS X, Mac OS X Server and various Unix-like operating systems.
Apple_UNIX_SVR2A/UX, UnixOriginally introduced for A/UX on the 68k, it was later reused for MkLinux which used the Extended file system. It is the standard partition identifier for many Unix-like operating systems, including Linux and NetBSD. It may contain any file system suitable for the installed operating system. If bootable, a file system that can be read by the Open Firmware bootloader from Apple_Bootstrap must be used.
Apple_Void ISO9660 paddingA dummy partition map entry to ensure correct partition alignment on bootable media.
Be_BFSBe File SystemThis partition contains a Be File System and is normally used by BeOS.
MFSTiVo Media File SystemMFS application region, MFS media regionUsed to hold the proprietary Media File System on TiVo hard drives formatted using Apple Partition Map.

Partition status

Partition status is a bit field composed of the flags:
ValueDescriptionSystem
0x00000001entry is validA/UX
0x00000002entry is allocatedA/UX
0x00000004entry in useA/UX
0x00000008entry contains boot informationA/UX
0x00000010partition is readableA/UX
0x00000020partition is writableA/UX, Macintosh
0x00000040boot code is position independentA/UX
0x00000100partition contains chain-compatible driverMacintosh
0x00000200partition contains a real driverMacintosh
0x00000400partition contains a chain driverMacintosh
0x40000000automatically mount at startupMacintosh
0x80000000the startup partitionMacintosh