Next Up Previous Contents
Pdisk: Viewing the current Partition Map

4.3 Viewing the current Partition Map

Pdisk has two commands to view the partition map, lowercase p and uppercase P. They provide the same information, but sorted in a different way. The lowercase p shows exactly what the partition map is on the disk. (Sorted by partition entry.) The uppercase P shows the partitions listed in the order they appear on the disk. (Sorted by base address)

The following is an example partition map with a swap partition, a / and /usr partition:

Partition map (with 512 byte blocks) on '/dev/sda'
 #:                type name             length   base    ( size )
 1: Apple_partition_map Apple                63 @ 1      
 2:      Apple_Driver43*Macintosh            54 @ 64     
 3:      Apple_Driver43*Macintosh            74 @ 118    
 4:       Apple_Patches Patch Partition     512 @ 192    
 5:           Apple_HFS Macintosh HD    1572864 @ 704     (768.0M)
 6:     Apple_UNIX_SVR2 swap             258048 @ 1573568 (126.0M)
 7:     Apple_UNIX_SVR2 root             262144 @ 1831616 (128.0M)
 8:     Apple_UNIX_SVR2 usr             6325056 @ 2093760 (  3.0G)

Device block size=512, Number of Blocks=8418815 (4.0G)
DeviceType=0x0, DeviceId=0x0
Drivers-
1: @ 64 for 21, type=0x1
2: @ 118 for 32, type=0xffff

Partition Listing Format

The format of this output is the partition number, the type of the partition, the name of the partition, length of the partition, start address of the partition and the size of the partition.

There are many different types and case is important. The ones that you will want to know are: Apple_HFS and Apple_UNIX_SVR2.

Apple_HFS is used to specify an HFS partition (MacOS native partition). However, there is no way to know if the partition is HFS standard or HFS extended.

Apple_UNIX_SVR2 is used to specify a unix partition. Linux uses this type to indicate its partitions.

Next is the name of the partition. This can be anything. However, the name "swap" is a reserved name for swap partitions. If the type is "Apple_UNIX_SVR2" and "swap" the installer will assume that the partition is a swap partition.

The sample partition map:

The partition map shows that partition 1 is the Apple partition map. This partition will be on all disks and is usually partition 1.

Partitions 2 and 3 are both Apple Driver partitions. These partitions are used by MacOS as SCSI drivers. These partitions are only needed by MacOS. The Apple Driver partitions are usually immediatly following the partition map.

Partition 4 is the Apple Patches partition. This partition is similar to the Apple Driver partitions. It is only needed for MacOS. The Apple Patches usually follow the Drivers.

Partition 5 is an HFS partition.

Partition 6 is a unix partition, with the name swap. This means that it is to be a swap partition.

Partitions 7 and 8 are both unix partitions. They are labeled as root and usr for easy identification.


Next Up Previous Contents