Skip to content

Add support for setting the specific GPT type

Gaël PORTAY requested to merge gportay/kpmcore:partition-type into master

Hello,

The GPT partition layout defines the type of the partition using a UUID. The type of the partition is not related to the underlying filesystem but to its functionality: rootfs, home, var, swap, esp...

The UUID 4f68bce3-e8cd-4db1-96e7-fbcaf984b709 defines the root partition (/), the UUID 933ac7e1-2eb4-4f13-b844-0e14e2aef915 defines the home partition (/home), the UUID 4d21b016-b534-45c2-a9fb-5c16e091fd2d defines the variable partition (/var)... Also, the UUIDs may vary depending on the architecture (x86, x86_64, arm or aarch64).

KPMcore guesses the type depending on the underlying filesystem.

This commit enables the setting of a more specific GPT type if it is specified through the method Partition::setType(). It falls back to the previous guess type if the type is left unset.

Regards, Gaël

Merge request reports