mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
14 lines
447 B
Python
14 lines
447 B
Python
![]() |
from common.tools import log_check_call
|
||
|
from base import BasePartition
|
||
|
|
||
|
|
||
|
class MBRPartition(BasePartition):
|
||
|
|
||
|
def _create(self, e):
|
||
|
start = self.get_start()
|
||
|
parted_command = ('mkpart primary {start}MiB {end}MiB'
|
||
|
.format(start=str(start),
|
||
|
end=str(start + self.size)))
|
||
|
log_check_call(['/sbin/parted', '--script', '--align', 'none', e.volume.device_path,
|
||
|
'--', parted_command])
|