From 8fae958571c88fa5722d50fcba333ebe19542dc2 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Fri, 14 Jan 2022 11:17:38 +0100 Subject: Unified filesystem names by using get_mount_fs_type() function before .format() is called --- archinstall/lib/disk/partition.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/disk/partition.py b/archinstall/lib/disk/partition.py index 56ead68c..3117a42c 100644 --- a/archinstall/lib/disk/partition.py +++ b/archinstall/lib/disk/partition.py @@ -281,6 +281,9 @@ class Partition: if path is None: path = self.path + # This converts from fat32 -> vfat to unify filesystem names + filesystem = get_mount_fs_type(filesystem) + # To avoid "unable to open /dev/x: No such file or directory" start_wait = time.time() while pathlib.Path(path).exists() is False and time.time() - start_wait < 10: @@ -296,7 +299,7 @@ class Partition: raise DiskError(f'Could not format {path} with {filesystem} because: {mkfs}') self.filesystem = filesystem - elif filesystem == 'fat32': + elif filesystem == 'vfat': options = ['-F32'] + options if (handle := SysCommand(f"/usr/bin/mkfs.vfat {' '.join(options)} {path}")).exit_code != 0: @@ -331,7 +334,7 @@ class Partition: raise DiskError(f"Could not format {path} with {filesystem} because: {handle.decode('UTF-8')}") self.filesystem = filesystem - elif filesystem == 'ntfs': + elif filesystem == 'ntfs3': options = ['-f'] + options if (handle := SysCommand(f"/usr/bin/mkfs.ntfs -Q {' '.join(options)} {path}")).exit_code != 0: -- cgit v1.2.3-70-g09d2