Extensible Firmware Interface Specification
130 12/12/00 Version 1.02

Table 5-22. Hard Drive Media Device Path

Mnemonic
Byte
Offset
Byte
Length Description
Type 0 1 Type 4 Media Devi ce Path
Sub-Type 1 1 Sub-Type 1 Hard Drive
Length 2 2 Length of this structure in bytes. Length is 42 bytes.
Partition Number 4 4 Partition Number of the hard drive. Partition numbers start
at one. Partition number zero represents the entire device.
Partitions are defined by entries in the master boot record in
the first sector of the hard disk device.
Partition Start 8 8 Starting LBA of the partition on the hard drive
Partition Size 16 8 Size of the partition in units of Logical Blocks
Partition Signature 24 16 Signature unique to this partition
MBR Type 40 1 MBR Type: (Unused values reserved)
0x01 PC AT compatible MBR. Partition Start and Partition
Size come from PartitionStartingLBA and
PartitionSizeInLBA for the partition.
0x02 EFI Partition Table Header.
Signature Type 41 1 Type of Disk Signature: (Unused values reserved)
0x00 No Disk Signature.
0x01 32-bit signature from address 0x1b8 of the type
0x01 MBR.
0x02 GUID signature.
The following structure defines an MBR for EFI:
Typedef struct _MBR_PARTITION {
UINT8 BootIndicator; // 0x80 for active partition
UINT8 PartitionStartCHS[3];
UINT8 OS_Indicator;
UINT8 PartitionEndCHS[3];
UINT32 PartitionStartingLBA;
UINT32 PartitionSizeInLBA;
} MBR_PARTITION;
typedef struct _PC_MBR {
UINT8 MBRCode[0x1BE];
MBR_PARTITION PartitionEntry[4];
UINT16 Signature; // Must be 0xaa55
} PC_MBR;