Merge pull request #505 from mwhudson/moar-wiping
always wipe a disk when clearing its partition table
This commit is contained in:
commit
89c49ddbdd
|
@ -412,6 +412,7 @@ class FilesystemController(BaseController):
|
||||||
def reformat(self, disk):
|
def reformat(self, disk):
|
||||||
if disk.type == "disk":
|
if disk.type == "disk":
|
||||||
disk.preserve = False
|
disk.preserve = False
|
||||||
|
disk.wipe = 'superblock-recursive'
|
||||||
self.clear(disk)
|
self.clear(disk)
|
||||||
for p in list(disk.partitions()):
|
for p in list(disk.partitions()):
|
||||||
self.delete(p)
|
self.delete(p)
|
||||||
|
@ -432,6 +433,7 @@ class FilesystemController(BaseController):
|
||||||
if len(disk.partitions()) == 0:
|
if len(disk.partitions()) == 0:
|
||||||
if disk.type == "disk":
|
if disk.type == "disk":
|
||||||
disk.preserve = False
|
disk.preserve = False
|
||||||
|
disk.wipe = 'superblock-recursive'
|
||||||
|
|
||||||
needs_boot = self.model.needs_bootloader_partition()
|
needs_boot = self.model.needs_bootloader_partition()
|
||||||
log.debug('model needs a bootloader partition? {}'.format(needs_boot))
|
log.debug('model needs a bootloader partition? {}'.format(needs_boot))
|
||||||
|
|
Loading…
Reference in New Issue