bootstrap-vz/base/fs/partitions/mbr.py
Anders Ingemann d6502089e2 Implemented both MBR and GPT partitioning.
VirtualBox seems to not like GPT
2013-10-27 18:11:14 +01:00

13 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])