The GPT partition layout supports naming partitions.
The support for the partition label was added in the backend libparted
since commit 28fa6ac (Add support for GTP partition labels).
The libparted was removed later by commit 8fa1814 (Remove libparted
backend) and no backend sets the partition label.
The CLI sfdisk sets the partition label using the option --part-label.
See the examples below:
$ cat <<EOF | sfdisk disk.img
label: gpt
type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, size=64M
type=0FC63DAF-8483-4772-8E79-3D69D8477DE4
EOF
(...)
$ sfdisk --part-label disk.img 1 efi
(...)
$ sfdisk --part-label disk.img 2 rootfs
(...)
$ sfdisk --dump disk.img
(...)
disk.img1 : start= 2048, size= 131072, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=D08E5B2A-4649-9F4A-AEA3-6C3048888EAA, name="efi"
disk.img2 : start= 133120, size= 1963999, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=0BEEFE82-19EA-DC4C-BB6A-27B6DA0C3BD2, name="rootfs"
This commit introduces the new job set-partition-label that is used in
the new-operation to set the label of the partition. The job uses the
newly introduced method setPartitionLabel that is implemented by the
sfdisk and dummy backends.
The object QVariant is a native object in the Qt world that represents
any type of value: boolean, integer, string, floating point, date,
UUID...
This change updates the API to use the object QVariant and provide a
more flexible API to represent the filesystem features.
The GPT partition layout defines the type of the partition using a
UUID[1]. 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.
[1]: https://systemd.io/DISCOVERABLE_PARTITIONS/
In some cases, it may be necessary to create a filesystem with specific features
enabled/disabled.
This PR makes it possible to create filesystems this way. It does so
by introducing a new m_Features member variable and the createWithFeatures()
function to the FileSystem base class. The latter function is implemented
for the btrfs, ext2/3/4 and FAT filesystems.
Additionnally, the CreateFileSystemJob has been modified to enable
creating/formatting filesystems with specific features enabled.
Differential Revision: https://phabricator.kde.org/D21903
CCBUG: 342178
Summary: BUG: 411226
Test Plan: I couldn't test it since my device does not support SMART
Reviewers: stikonas
Reviewed By: stikonas
Subscribers: #kde_partition_manager
Tags: #kde_partition_manager
Differential Revision: https://phabricator.kde.org/D23572
Summary: BUG: 411226
Test Plan: I couldn't test it since my device does not support SMART
Reviewers: stikonas
Reviewed By: stikonas
Subscribers: #kde_partition_manager
Tags: #kde_partition_manager
Differential Revision: https://phabricator.kde.org/D23572
Summary:
kauth helpers have a qcoreapplication started which auto-terminates after
10 seconds of idle time. this would be an added time out on top of our
life time management that is not necessary. to prevent this additional
delay simply quit the qapplication directly.
this makes helper termination almost instantaneous even when the dbus
client disappears due to crash or SIGINT, and largely removes the
need to call stopHelper altogether.
BUG: 408245
Test Plan:
both partitionmanager and calamares instantly quit the helper no matter how the client process gets terminated
other than that everything seems to work as before
Reviewers: stikonas
Differential Revision: https://phabricator.kde.org/D21559
Summary:
kauth helpers have a qcoreapplication started which auto-terminates after
10 seconds of idle time. this would be an added time out on top of our
life time management that is not necessary. to prevent this additional
delay simply quit the qapplication directly.
this makes helper termination almost instantaneous even when the dbus
client disappears due to crash or SIGINT, and largely removes the
need to call stopHelper altogether.
BUG: 408245
Test Plan:
both partitionmanager and calamares instantly quit the helper no matter how the client process gets terminated
other than that everything seems to work as before
Reviewers: stikonas
Differential Revision: https://phabricator.kde.org/D21559