[Parted-maintainers] Bug#1025223: parted: limited to 128 GPT partitions
Pascal Hambourg
pascal at plouf.fr.eu.org
Sat Apr 11 11:55:57 BST 2026
On Thu, 01 Dec 2022 18:58:08 +1100 Trent W. Buck wrote:
>
> But parted seems to be limited to 128 GPT partitions (test transcript below).
> Is this a fundamental limitation of GPT?
No. AFAIK the GPT specification only says that a minimum of 16384 bytes
of space must be reserved for the GPT partition entry array and the
minimum partition entry size is 128 bytes. These minimum sizes allow
16384 / 128 = 128 partition entries, which is considered a safe default
and should be supported by any software or device.
Other tools such as gdisk allow to change the partition table size.
Parted creates GPT partition tables with 128 entries but can read and
write existing partition tables with less or more entries.
> If not, can parted be changed to allow 256 partitions?
I can think of three options:
- Set the new partition table size at build time.
IMO neither parted nor Debian maintainers would accept to change the new
partition table size in order to preserve compatibility. But of course
you can rebuild your own parted flavour with a custom size.
- Set the new partition table size at run time.
This could be implemented with an environment variable, like
PARTED_SECTOR_SIZE which defines the sector size when working on disk
image files.
- Implement a partition table size change feature.
Parted uses the same generic API for all partition table types, and
AFAIK the currently only available interface for partition table
settings is disk flags (e.g. pmbr_boot which reflects the state of the
boot flag in the protective MBR). But even if they are internally stored
as integers, disk flags are managed as on/off boolean values, not
numbers. A new disk flag could reflect that the partition table has 128
or 256 entries, but how to reflect all other values ?
Anyway feature requests should be asked to parted upstream, not Debian.
More information about the Parted-maintainers
mailing list