Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Apple Partition Map (APM) format

The Apple Partition Map (APM) format is used on Motorola based Macintosh computers. On Intel based Macintosh computers the GUID Partition Table (GPT) format is used.

Overview

An Apple Partition Map (APM) consists of:

  • a drive descriptor
  • partition map entry of type “Apple_partition_map”
  • zero or more partition map entries

Characteristics

CharacteristicsDescription
Byte orderbig-endian
Date and time valuesN/A
Character stringsASCII

Terminology

TermDescription
Physical blockA fixed location on the storage media defined by the storage media
Logical blockAn abstract location on the storage media defined by software

The drive descriptor

The driver descriptor identifies the device drivers installed on a storage medium. The driver descriptor can contain refer to multiple device drivers. Every device driver is stored in a separate partition.

The drive descriptor is situated in the first block of the storage medium. This block is referred to as the device driver block. The driver descriptor block is not considered part of any partition.

The drive descriptor is 512 bytes in size and consists of:

OffsetSizeValueDescription
02"\x45\x52" or "ER"Signature
22The block size of the device in bytes
44The number of blocks on the device
82Device type (Reserved)
102Device identifier (Reserved)
124Device data (Reserved)
162The number of driver descriptors
188The first device driver descriptor
26484Additional driver descriptors, where unused entries are 16-bit integer values filled with 0

The device driver descriptor

The device driver descriptor is 8 bytes in size and consists of:

OffsetSizeValueDescription
04Start block of the device driver
42Device driver number of blocks
62Operating system type, where is 1 represents "Mac OS"

The partition map

The partition map is stored after the drive descriptor. The partition map consists of multiple entries that must be stored continuously. The partition map itself is considered a partition therefore the first entry in the partition map describes the partition map itself.

The partition map entry

A partition map entry is 512 bytes in size and consists of:

OffsetSizeValueDescription
02"\x50\x4d" or "PM"Signature
220x00Unknown (Reserved)
44Total number of entries in the partition map
84Partition start sector
124Partition number of sectors
1632Partition name, which contains an ASCII string
4832Partition type, which contains an ASCII string
804Data area start sector
844Data area number of sectors
884Status flags
924Boot code start sector
964Boot code number of sectors
1004Boot code address
1044Unknown (Reserved)
1084Boot code entry point
1124Unknown (Reserved)
1164Boot code checksum
12016Processor type
136188 x 2 = 3760x00Unknown (Reserved)

Note that the partition name can be empty.

Partition types

The partition types consist of the following values:

ValueIdentifierDescription
"Apple_Boot"
"Apple_Boot_RAID"
"Apple_Bootstrap"
"Apple_Driver"
"Apple_Driver43"
"Apple_Driver43_CD"
"Apple_Driver_ATA"
"Apple_Driver_ATAPI"
"Apple_Driver_IOKit"
"Apple_Driver_OpenFirmware"
"Apple_Extra"
"Apple_Free"
"Apple_FWDriver"
"Apple_HFS"
"Apple_HFSX"
"Apple_Loader"
"Apple_MDFW"
"Apple_MFS"
"Apple_partition_map"
"Apple_Patches"
"Apple_PRODOS"
"Apple_RAID"
"Apple_Rhapsody_UFS"
"Apple_Scratch"
"Apple_Second"
"Apple_UFS"
"Apple_UNIX_SVR2"
"Apple_Void"
"Be_BFS"
"MFS"

Status flags

The partition status flags consist of the following values:

ValueIdentifierDescription
0x00000001Is valid
0x00000002Is allocated
0x00000004Is in use
0x00000008Contains boot information
0x00000010Is readable
0x00000020Is writable
0x00000040Boot code is position independent
0x00000100Contains a chain-compatible driver
0x00000200Contains a real driver
0x00000400Contains a chain driver
0x40000000Automatic mount at startup
0x80000000Is startup partition

Note that the “is in use” status flags does not appear to be used consistently.