[parted-devel] [PATCH 0/2] gpt: Preserve relocated primary partition table
Pascal Hambourg
pascal at plouf.fr.eu.org
Sat Oct 17 22:48:51 BST 2026
On 09/10/2026 at 21:09, Phillip Susi wrote:
> Pascal Hambourg <pascal at plouf.fr.eu.org> writes:
>
>> As I wrote, however I am uncomfortable with showing the gap as free
>> space because of possible side effects (same with the current behaviour
>> of showing the gap between the primary PEA and the first usable LBA as
>> free space, leading to new partitions being smaller than expected). Any
>> opinion about the proposal to hide this unusable space I posted on
>> 14/12/2025 ?
>
> Wasn't there a system reserved type of partition that isn't shown as
> free space that is used to hide the EBR in MBR? Seems like that would
> be good for this.
Available partition types are defined in include/parted/disk.in.h:
- PED_PARTITION_NORMAL
- PED_PARTITION_LOGICAL
- PED_PARTITION_EXTENDED
- PED_PARTITION_FREESPACE
- PED_PARTITION_METADATA
- PED_PARTITION_PROTECTED
Most types are self-explanatory, except PED_PARTITION_PROTECTED; it does
not seem to be used anywhere in parted, so I wonder what it is intended for.
AFAICS, EBRs in extended partitions have the PED_PARTITION_METADATA type
as expected, just like the MBR or GPT headers and partition table arrays.
GPT gaps do not contain any metadata so I would be reluctant to assign
them the PED_PARTITION_METADATA type. Also that would break the ability
to use libparted to detect such space as available for a boot loader,
which is one of my goals (see my previous posts in this thread).
More information about the parted-devel
mailing list