The bareon.utils.partition
Module¶
-
bareon.utils.partition.
get_uuid
(device)¶
-
bareon.utils.partition.
info
(dev)¶
-
bareon.utils.partition.
make_label
(dev, label='gpt')¶ Creates partition label on a device.
Parameters: - dev – A device file, e.g. /dev/sda.
- label – Partition label type ‘gpt’ or ‘msdos’. Optional.
Returns: None
-
bareon.utils.partition.
make_partition
(dev, begin, end, ptype)¶
-
bareon.utils.partition.
parse_partition_info
(parted_output)¶
-
bareon.utils.partition.
remove_partition
(dev, num)¶
-
bareon.utils.partition.
reread_partitions
(dev, out='Device or resource busy', timeout=60)¶
-
bareon.utils.partition.
set_gpt_type
(dev, num, type_guid)¶ Sets guid on a partition.
Parameters: - dev – A device file, e.g. /dev/sda.
- num – Partition number
- type_guid – Partition type guid. Must be one of those listed
on this page http://en.wikipedia.org/wiki/GUID_Partition_Table. This method does not check whether type_guid is valid or not.
Returns: None
-
bareon.utils.partition.
set_partition_flag
(dev, num, flag, state='on')¶ Sets flag on a partition
Parameters: - dev – A device file, e.g. /dev/sda.
- num – Partition number
- flag – Flag name. Must be one of ‘bios_grub’, ‘legacy_boot’,
‘boot’, ‘raid’, ‘lvm’ :param state: Desiable flag state. ‘on’ or ‘off’. Default is ‘on’.
Returns: None
-
bareon.utils.partition.
wipe
(dev)¶