0
The GPT header (usually in LBA 1) has a PartitionEntryLBA
field (see 5.3.2 GPT Header in the spec). There is language in various references (such as the wikipedia GPT entry) describing that field that says it should point to LBA 2.
The spec says "The primary GPT Partition Entry Array must be located after the primary GPT Header and end before the First Usable LBA."
In that context there seems to be some wiggle room associated with "after". That doesn't necessarily mean immediately after - the first partition entry could be some number of LBAs after the header and still meet that guidance in the spec.
I am using an embedded processor that looks for a 4k vector table at the second sector of a storage card (e.g., SD). So I can't put the GPT partition entries there. So I'd like to write GPT partition entries after that table (5k byte offset assuming 512 byte sectors). I think this is reasonable, but haven't looked at any standard GPT partitioning tools (e.g., parted on linux) to see if / how that might be supported. Nor whether standard boot loaders (e.g., u-boot) will be able to find a partition entry table at such a location.
So I'm interested in hearing about practical experience with atypical GPT partition entry table locations (i.e., not at LBA 2 for the primary copy of the table) with various partitioning tools and boot loaders. Preference toward bsd/linux, but I'm interested in hearing about other environments as well (even anecdotes about certain commercial operating systems).
That's a bit of an open-ended inquiry. Worded somewhat more specifically, are there any known failure cases with atypical GPT partition entry table locations and existing partitioning tools and/or boot loaders?
You can get to the UEFI specs here: http://www.uefi.org/specifications. I was looking at the latest (revision 2.4, errata C).
I do not yet have a membership in UEFI (http://www.uefi.org/join), so I don't have access to the forum there (http://www.uefi.org/FWOSForum).
p.s. There seems to be an even stronger requirement (?) that the primary GPT header be at LBA 1 even though there's a StartingLBA
field in the PMBR (at LBA 0). The spec does specifically spell out that the StartingLBA
field there should be LBA 1. But why bother having the field if it must be at LBA 1? Why not allow the GPT header to be at LBA 10 if a situation calls for it? This isn't necessary in my current use case and the questions are somewhat rhetorical in this forum (probably better posed in the official UEFI forums).
I think I may be using a similar processor to yours. I was able to modify U-Boot to 'properly' use the partition entry offset to leave the required region unmodified. I've also not seen any tools support using this field by default, which is a pain but it does prevent users from being bitten by other tools not supporting it. – oscode – 2017-01-25T09:46:07.567