From 4e9b1c163574b44517c6e09de4c91c4ef5995969 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Thu, 10 Jun 2021 20:38:35 +0200 Subject: Renamed vfat -> fat32 for the purpose of consistency. Most actions are referring to fat32, it's only mkfs that has the notion vfat and then -F32 for format 32. And I think vfat confuses more people than it does good, so sticking with fat32 which works better with parted as well. Also added the partitioning logic, started on the mounting logic --- archinstall/lib/user_interaction.py | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'archinstall/lib/user_interaction.py') diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 2c333d3a..6860f00b 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -9,7 +9,7 @@ import signal import sys import time -from .disk import BlockDevice +from .disk import BlockDevice, valid_fs_type from .exceptions import * from .general import SysCommand from .hardware import AVAILABLE_GFX_DRIVERS, has_uefi @@ -580,20 +580,6 @@ def select_partition_layout(block_device): } } -def valid_fs_type(fstype :str) -> bool: - # https://www.gnu.org/software/parted/manual/html_node/mkpart.html - - return fstype in [ - "ext2", - "fat16", "fat32", - "hfs", "hfs+", "hfsx", - "linux-swap", - "NTFS", - "reiserfs", - "ufs", - "btrfs", - ] - def valid_parted_position(pos :str): if not len(pos): return False @@ -630,6 +616,7 @@ def get_default_partition_layout(block_devices): "start" : "1MiB", "size" : "513MiB", "boot" : True, + "format" : True, "mountpoint" : "/boot", "filesystem" : { "format" : "fat32" @@ -640,6 +627,7 @@ def get_default_partition_layout(block_devices): "type" : "primary", "start" : "513MiB", "encrypted" : True, + "format" : True, "size" : "100%" if block_devices[0].size < MIN_SIZE_TO_ALLOW_HOME_PART else f"{min(block_devices[0].size, 20)*1024}MiB", "mountpoint" : "/", "filesystem" : { @@ -652,6 +640,7 @@ def get_default_partition_layout(block_devices): # Home "type" : "primary", "encrypted" : True, + "format" : True, "start" : f"{min(block_devices[0].size*0.2, 20)*1024}MiB", "size" : "100%", "mountpoint" : "/home", -- cgit v1.2.3-70-g09d2