Commit 7963a1f7 authored by Mikhail Karpenko's avatar Mikhail Karpenko
Browse files

Fix error with 'mkfs' reporting wrong block device

parent 5e46288d
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -43,6 +43,7 @@ import sys
import stat
import stat
import argparse
import argparse
import subprocess
import subprocess
import time


# use this % of total disk space for system partition
# use this % of total disk space for system partition
SYS_PARTITION_RATIO = 5
SYS_PARTITION_RATIO = 5
@@ -202,7 +203,8 @@ def partition_disk(dev_path, sys_size, disk_size, dry_run = True, force = False)
            end = disk_size
            end = disk_size
            subprocess.check_output(['parted', '-s', dev_path, 'unit', 'GB',
            subprocess.check_output(['parted', '-s', dev_path, 'unit', 'GB',
                                     'mkpart', 'primary', str(start), str(end)], stderr = subprocess.STDOUT)
                                     'mkpart', 'primary', str(start), str(end)], stderr = subprocess.STDOUT)
            # make file system on first partition
            # make file system on first partition; delay to let the changes propagate to the system
            time.sleep(2)
            partition = dev_path + '1'
            partition = dev_path + '1'
            if force:
            if force:
                f_param = '-FF'
                f_param = '-FF'