OCE and GPT

Andrey V. Elsukov bu7cher at yandex.ru
Wed Apr 21 18:15:44 UTC 2010


21.04.10, 10:59, "Marcel Moolenaar" <xcllnt at mac.com>:
>  UEFI version 2.3, page 99 (paragraph 5.3.1):
>  "Two GPT Header structures are stored on the device: the primary and the
>   backup. The primary GPT Header must be located in LBA 1 (i.e., the second
>   logical block), and the backup GPT Header must be located in the last LBA
>   of the device."

Hi, Marcel

Ok, you are right, but:

GPT Header, page 102 (paragraph 5.3.2):
The following test must be performed to determine if a GPT is valid:
•  Check the Signature
•  Check the Header CRC
•  Check that the MyLBA entry points to the LBA that contains the GUID Partition Table
•  Check the CRC of the GUID Partition Entry Array
If the GPT is the primary table, stored at LBA 1:
•  Check the AlternateLBA to see if it is a valid GPT

So, in our case (when resizing is allowed) it can be more usable to check AlternateLBA (it
can be not equal to last LBA) for correct primary header. IMHO. 

Marcel, what you think about recover and reinit verbs?

-- 
WBR, Andrey V. Elsukov


More information about the freebsd-geom mailing list