Fix 2496 - umounting all partitions (#2498)
* Fix 2496 - umounting all partitions * Update
This commit is contained in:
parent
06baa08750
commit
bab06e4d75
|
|
@ -650,9 +650,6 @@ class DeviceHandler(object):
|
||||||
if partition_table.MBR and len(modification.partitions) > 3:
|
if partition_table.MBR and len(modification.partitions) > 3:
|
||||||
raise DiskError('Too many partitions on disk, MBR disks can only have 3 primary partitions')
|
raise DiskError('Too many partitions on disk, MBR disks can only have 3 primary partitions')
|
||||||
|
|
||||||
# make sure all devices are unmounted
|
|
||||||
self.umount_all_existing(modification.device_path)
|
|
||||||
|
|
||||||
# WARNING: the entire device will be wiped and all data lost
|
# WARNING: the entire device will be wiped and all data lost
|
||||||
if modification.wipe:
|
if modification.wipe:
|
||||||
self.wipe_dev(modification.device)
|
self.wipe_dev(modification.device)
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,10 @@ class FilesystemHandler:
|
||||||
if SysInfo.has_uefi() is False:
|
if SysInfo.has_uefi() is False:
|
||||||
partition_table = PartitionTable.MBR
|
partition_table = PartitionTable.MBR
|
||||||
|
|
||||||
|
# make sure all devices are unmounted
|
||||||
|
for mod in device_mods:
|
||||||
|
device_handler.umount_all_existing(mod.device_path)
|
||||||
|
|
||||||
for mod in device_mods:
|
for mod in device_mods:
|
||||||
device_handler.partition(mod, partition_table=partition_table)
|
device_handler.partition(mod, partition_table=partition_table)
|
||||||
|
|
||||||
|
|
@ -97,9 +101,6 @@ class FilesystemHandler:
|
||||||
|
|
||||||
self._validate_partitions(create_or_modify_parts)
|
self._validate_partitions(create_or_modify_parts)
|
||||||
|
|
||||||
# make sure all devices are unmounted
|
|
||||||
device_handler.umount_all_existing(device_path)
|
|
||||||
|
|
||||||
for part_mod in create_or_modify_parts:
|
for part_mod in create_or_modify_parts:
|
||||||
# partition will be encrypted
|
# partition will be encrypted
|
||||||
if self._enc_config is not None and part_mod in self._enc_config.partitions:
|
if self._enc_config is not None and part_mod in self._enc_config.partitions:
|
||||||
|
|
@ -312,9 +313,6 @@ class FilesystemHandler:
|
||||||
|
|
||||||
self._validate_partitions(filtered_part)
|
self._validate_partitions(filtered_part)
|
||||||
|
|
||||||
# make sure all devices are unmounted
|
|
||||||
device_handler.umount_all_existing(mod.device_path)
|
|
||||||
|
|
||||||
enc_mods = {}
|
enc_mods = {}
|
||||||
|
|
||||||
for part_mod in filtered_part:
|
for part_mod in filtered_part:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue