Page
GPT
The OS only supports GPT formatted disks (GPT is a partitioning scheme that uses GUIDs and a fixed table of partitions to initialise the disks compared to MBR). This is the header contained within the disk's second sector (The first is still considered the MBR sector).
Then the sectors after contain this information (4 of these per sector, so about 32 sectors in total, making 128 partition entries possible)
We really have to use packed here as we rely on the bit formatting of the architecture. This is little endian and it defines the order of which bytes will be read from the disk. The packed feature allows a direct conversion from the raw data to the structured data with all values being populated correct.
When we mount the device to the file system as a volume, we detect is format and setup a volume corresponding to this (FAT32, Ext2, etc).
Last updated