kiwi.partitioner Package
Submodules
kiwi.partitioner.base
Module
- class kiwi.partitioner.base.PartitionerBase(disk_provider: DeviceProvider, start_sector: int | None = None, extended_layout: bool = False)[source]
Bases:
object
Base class for partitioners
- create(name: str, mbsize: int, type_name: str, flags: List[str] = [])[source]
Create partition
Implementation in specialized partitioner class
- Parameters:
name (string) – unused
mbsize (int) – unused
type_name (string) – unused
flags (list) – unused
- get_id() int [source]
Current partition number
Zero indicates no partition has been created so far
- Returns:
partition number
- Return type:
int
- post_init() None [source]
Post initialization method
Implementation in specialized partitioner class
- set_flag(partition_id: int, flag_name: str)[source]
Set partition flag
Implementation in specialized partitioner class
- Parameters:
partition_id (int) – unused
flag_name (string) – unused
- set_hybrid_mbr()[source]
Turn partition table into hybrid table if supported
Implementation in specialized partitioner class
- set_mbr()[source]
Turn partition table into MBR (msdos table)
Implementation in specialized partitioner class
kiwi.partitioner.dasd
Module
- class kiwi.partitioner.dasd.PartitionerDasd(disk_provider: DeviceProvider, start_sector: int | None = None, extended_layout: bool = False)[source]
Bases:
PartitionerBase
Implements DASD partition setup
- create(name: str, mbsize: int, type_name: str, flags: List[str] | None = None) None [source]
Create DASD partition
- Parameters:
name (string) – partition name
mbsize (int) – partition size
type_name (string) – unused
flags (list) – unused
kiwi.partitioner.gpt
Module
- class kiwi.partitioner.gpt.PartitionerGpt(disk_provider: DeviceProvider, start_sector: int | None = None, extended_layout: bool = False)[source]
Bases:
PartitionerBase
Implements GPT partition setup
- create(name: str, mbsize: int, type_name: str, flags: List[str] | None = None) None [source]
Create GPT partition
- Parameters:
name (string) – partition name
mbsize (int) – partition size
type_name (string) – partition type
flags (list) – additional flags
- resize_table(entries: int = 128) None [source]
Resize partition table
- Parameters:
entries (int) – number of default entries
kiwi.partitioner.msdos
Module
- class kiwi.partitioner.msdos.PartitionerMsDos(disk_provider: DeviceProvider, start_sector: int | None = None, extended_layout: bool = False)[source]
Bases:
PartitionerBase
Implement old style msdos partition setup
- create(name: str, mbsize: int, type_name: str, flags: List[str] = []) None [source]
Create msdos partition
- Parameters:
name (string) – partition name
mbsize (int) – partition size
type_name (string) – partition type
flags (list) – additional flags
- resize_table(entries: int | None = None) None [source]
Resize partition table
Nothing to be done here for msdos table
- Parameters:
entries (int) – unused
- set_flag(partition_id: int, flag_name: str) None [source]
Set msdos partition flag
- Parameters:
partition_id (int) – partition number
flag_name (string) – name from flag map