[parted-devel] [PATCH 0/2] gpt: Preserve relocated primary partition table

Pascal Hambourg pascal at plouf.fr.eu.org
Wed Nov 19 18:42:57 GMT 2025


The primary GPT partition entry array may start at a LBA other than the
default in order to not interfere with the boot loader for some ARM SoC
E.g.:
- The boot loader for Freescale/NXP i.MX < 8 family must start at LBA 2.
- The boot loader for older Allwinner sunxi family must start at LBA 16.

This patchset also splits the metadata at the beginning of the disk in
two:
- protective MBR + primary GPT header
- primary GPT partition entry array

This makes it possible to see the gap between them and check if the
metadata layout may interfere with the boot loader. However it would be
better if the gap was not reported as free space. Is there a way to
avoid this ?

Pascal Hambourg (2):
  gpt: Preserve primary partition entry array location
  gpt: Recalculate PrimaryPartitionEntryLBA when primary partition table
    is invalid

 libparted/labels/gpt.c | 27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)

-- 
2.39.5




More information about the parted-devel mailing list