From bab06e4d753d2c197d4fa4d25cff0c859a23d87a Mon Sep 17 00:00:00 2001 From: Daniel Girtler Date: Wed, 15 May 2024 20:47:20 +1000 Subject: [PATCH] Fix 2496 - umounting all partitions (#2498) * Fix 2496 - umounting all partitions * Update --- archinstall/lib/disk/device_handler.py | 3 --- archinstall/lib/disk/filesystem.py | 10 ++++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/archinstall/lib/disk/device_handler.py b/archinstall/lib/disk/device_handler.py index e006e765..53fc6b9e 100644 --- a/archinstall/lib/disk/device_handler.py +++ b/archinstall/lib/disk/device_handler.py @@ -650,9 +650,6 @@ class DeviceHandler(object): if partition_table.MBR and len(modification.partitions) > 3: 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 if modification.wipe: self.wipe_dev(modification.device) diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py index 5c11896e..a4db1d4d 100644 --- a/archinstall/lib/disk/filesystem.py +++ b/archinstall/lib/disk/filesystem.py @@ -58,6 +58,10 @@ class FilesystemHandler: if SysInfo.has_uefi() is False: 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: device_handler.partition(mod, partition_table=partition_table) @@ -97,9 +101,6 @@ class FilesystemHandler: 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: # partition will be encrypted 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) - # make sure all devices are unmounted - device_handler.umount_all_existing(mod.device_path) - enc_mods = {} for part_mod in filtered_part: