@@ -128,6 +128,7 @@ def parse_arg(cls, disk_config: _DiskLayoutConfigurationSerialization) -> DiskLa
128128 device_partition = PartitionModification (
129129 status = ModificationStatus (partition ['status' ]),
130130 fs_type = FilesystemType (partition ['fs_type' ]) if partition .get ('fs_type' ) else None ,
131+ type_uuid = partition ['type_uuid' ] if partition ['type_uuid' ] else None ,
131132 start = Size .parse_args (partition ['start' ]),
132133 length = Size .parse_args (partition ['size' ]),
133134 mount_options = partition ['mount_options' ],
@@ -480,6 +481,7 @@ class _PartitionInfo:
480481 name : str
481482 type : PartitionType
482483 fs_type : FilesystemType | None
484+ type_uuid : str | None
483485 path : Path
484486 start : Size
485487 length : Size
@@ -543,6 +545,7 @@ def from_partition(
543545 name = partition .get_name (),
544546 type = partition_type ,
545547 fs_type = fs_type ,
548+ type_uuid = lsblk_info .parttype ,
546549 path = Path (partition .path ),
547550 start = start ,
548551 length = length ,
@@ -755,6 +758,7 @@ class PartitionGUID(Enum):
755758 A list of Partition type GUIDs (lsblk -o+PARTTYPE) can be found here: https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs
756759 """
757760 LINUX_ROOT_X86_64 = "4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709"
761+ ESP = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B"
758762
759763 @property
760764 def bytes (self ) -> bytes :
@@ -846,6 +850,7 @@ class _PartitionModificationSerialization(TypedDict):
846850 start : _SizeSerialization
847851 size : _SizeSerialization
848852 fs_type : str | None
853+ type_uuid : str | None
849854 mountpoint : str | None
850855 mount_options : list [str ]
851856 flags : list [str ]
@@ -860,6 +865,7 @@ class PartitionModification:
860865 start : Size
861866 length : Size
862867 fs_type : FilesystemType | None = None
868+ type_uuid : str | None = None
863869 mountpoint : Path | None = None
864870 mount_options : list [str ] = field (default_factory = list )
865871 flags : list [PartitionFlag ] = field (default_factory = list )
@@ -930,6 +936,7 @@ def from_existing_partition(cls, partition_info: _PartitionInfo) -> PartitionMod
930936 start = partition_info .start ,
931937 length = partition_info .length ,
932938 fs_type = partition_info .fs_type ,
939+ type_uuid = partition_info .type_uuid ,
933940 dev_path = partition_info .path ,
934941 partn = partition_info .partn ,
935942 partuuid = partition_info .partuuid ,
@@ -1032,6 +1039,7 @@ def json(self) -> _PartitionModificationSerialization:
10321039 'start' : self .start .json (),
10331040 'size' : self .length .json (),
10341041 'fs_type' : self .fs_type .value if self .fs_type else None ,
1042+ 'type_uuid' : str (self .type_uuid ) if self .type_uuid else None ,
10351043 'mountpoint' : str (self .mountpoint ) if self .mountpoint else None ,
10361044 'mount_options' : self .mount_options ,
10371045 'flags' : [f .description for f in self .flags ],
0 commit comments