embdgen.core.label

A label object is a description of a partition table (e.g. MBR or GPT).

class embdgen.core.label.Factory.Factory[source]

Bases: FactoryBase[BaseLabel]

Factory class for label classes

classmethod load() Dict[str, Type[BaseLabel]][source]
class embdgen.core.label.BaseLabel.PartedInterface(filename: Path, label_type: str)[source]

Bases: object

Contextmanager interface to parted label creation.

When used as a context manager, the class will automatically commit the changes to the disk.

add_extended_partition(start: int, length: int)[source]

Create an extended partition

add_partition(part: PartitionRegion, logical: bool = False, boot_partition: bool = False)[source]

Create a normal logical partition

class embdgen.core.label.BaseLabel.BaseLabel[source]

Bases: ABC

Base class for labels (i.e. partition types, e.g. MBR or GPT)

boot_partition: str | None = None

Name of the partitions marked as ‘bootable’

parts: List[BaseRegion]

List of regions to be included in the image

prepare() None[source]
create(filename: Path) None[source]
abstract create_partition_table(filename: Path) None[source]