Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/user_interaction.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-06-10 20:38:35 +0200
committerAnton Hvornum <anton@hvornum.se>2021-06-10 20:38:35 +0200
commit4e9b1c163574b44517c6e09de4c91c4ef5995969 (patch)
tree8916cff57309f986047e4be9d5276e0014e65a3e /archinstall/lib/user_interaction.py
parent4691bad46b0cc7c4a04ce401ff2c7de93128d717 (diff)
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
Diffstat (limited to 'archinstall/lib/user_interaction.py')
-rw-r--r--archinstall/lib/user_interaction.py19
1 files changed, 4 insertions, 15 deletions
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",