diff options
-rw-r--r-- | curtin/block/__init__.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/curtin/block/__init__.py b/curtin/block/__init__.py index 2e19467a..921e1929 100644 --- a/curtin/block/__init__.py +++ b/curtin/block/__init__.py @@ -1227,11 +1227,10 @@ def wipe_file(path, reader=None, buflen=4 * 1024 * 1024, exclusive=True): def quick_zero(path, partitions=True, exclusive=True): """ - call wipefs -a -f on path, then zero 1M at front, 1M at end - if this is a block device and partitions is true, then - zero 1M at front and end of each partition. + Call wipefs -a -f on path, then zero 1M at front, 1M at end. + If this is a block device and partitions is true, then + zero 1M at front and end of each partition before zeroing path. """ - util.subp(['wipefs', '--all', '--force', path]) buflen = 1024 count = 1024 zero_size = buflen * count @@ -1252,6 +1251,8 @@ def quick_zero(path, partitions=True, exclusive=True): pt, kname, ptnum) quick_zero(pt, partitions=False) + util.subp(['wipefs', '--all', '--force', path]) + LOG.debug("wiping 1M on %s at offsets %s", path, offsets) util.not_exclusive_retry( zero_file_at_offsets, |