On 5/26/23 02:47, Thomas Schmitt wrote:
>>On 5/23/23 14:59, David Christensen wrote:
Your disk has 468862128 sectors. A GPT secondary partition table
  should start 33 sectors before the end of the disk:

Here i disagree. The size of the GPT partition array is adjustable.

32 blocks of 4 entries each is a usual size. But actually you have to
read from the GPT header block the 4 bytes beginning at offset 80 as
little-endian number to get the number of array blocks (by dividing by 4).
The start block of the partition array is adjustable, too: Offset 72,
8 bytes as 64-bit little-endian number.

The position of the GPT header is always 512-byte block 1 for the primary
partition table and the last valid block address of the device for the
backup table.

Specs for GPT are part of the UEFI specs. Current is:
   https://uefi.org/specs/UEFI/2.10/05_GUID_Partition_Table_Format.html
(I myself am still reading version 2.6 ...)


Thank you for the clarification and the citation.  :-)


David

Reply via email to