dissect.volume.disk.schemes.gpt

Module Contents

Classes

GPT

GUID Partition Table.

Attributes

dissect.volume.disk.schemes.gpt.gpt_def = Multiline-String
Show Value
"""
// http://en.wikipedia.org/wiki/GUID_Partition_Table
struct GPT_HEADER {
    char        signature[8];
    uint32      revision;
    uint32      header_size;
    uint32      crc32;
    uint32      reserved;
    uint64      current_lba;
    uint64      backup_lba;
    uint64      first_usable_lba;
    uint64      last_usable_lba;
    char        guid[16];
    uint64      lba_partition_array;
    uint32      partition_table_count;
    uint32      partition_entry_size;
    uint32      partition_table_crc;
    char        _[420];
};

struct GPT_PARTITION {
    char        type_guid[16];
    char        partition_guid[16];
    uint64      first_lba;
    uint64      last_lba;
    uint64      attribute_flags;
    char        name[72];   // UTF16 encoded
};

// 0 (0x00)     16 bytes     Partition type GUID
// 16 (0x10)    16 bytes     Unique partition GUID
// 32 (0x20)    8 bytes      First LBA (little endian)
// 40 (0x28)    8 bytes      Last LBA (inclusive, usually odd)
// 48 (0x30)    8 bytes      Attribute flags (e.g. bit 60 denotes read-only)
// 56 (0x38)    72 bytes     Partition name (36 UTF-16LE code units)
"""
dissect.volume.disk.schemes.gpt.c_gpt
class dissect.volume.disk.schemes.gpt.GPT(fh: BinaryIO, sector_size: int = 512)

GUID Partition Table.

fh
sector_size
mbr
gpt_parts
gpt_part
gpt
partitions: list[dissect.volume.disk.partition.Partition]