Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archinstall/lib/disk.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index 3628a4b0..872d9bfc 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -110,7 +110,11 @@ def select_disk_larger_than_or_close_to(devices, gigabytes, filter_out=None):
return min(copy_devices, key=(lambda device : abs(device.size - gigabytes)))
-def suggest_single_disk_layout(block_device):
+def suggest_single_disk_layout(block_device, default_filesystem=None):
+ if not default_filesystem:
+ from .user_interaction import ask_for_main_filesystem_format
+ default_filesystem = ask_for_main_filesystem_format()
+
MIN_SIZE_TO_ALLOW_HOME_PART = 40 # Gb
layout = {
@@ -142,7 +146,7 @@ def suggest_single_disk_layout(block_device):
"size" : "100%" if block_device.size < MIN_SIZE_TO_ALLOW_HOME_PART else f"{min(block_device.size, 20)*1024}MiB",
"mountpoint" : "/",
"filesystem" : {
- "format" : "btrfs"
+ "format" : default_filesystem
}
})
@@ -156,14 +160,18 @@ def suggest_single_disk_layout(block_device):
"size" : "100%",
"mountpoint" : "/home",
"filesystem" : {
- "format" : "btrfs"
+ "format" : default_filesystem
}
})
return layout
-def suggest_multi_disk_layout(block_devices):
+def suggest_multi_disk_layout(block_devices, default_filesystem=None):
+ if not default_filesystem:
+ from .user_interaction import ask_for_main_filesystem_format
+ default_filesystem = ask_for_main_filesystem_format()
+
MIN_SIZE_TO_ALLOW_HOME_PART = 40 # Gb
ARCH_LINUX_INSTALLED_SIZE = 20 # Gb, rough estimate taking in to account user desktops etc. TODO: Catch user packages to detect size?
@@ -207,7 +215,7 @@ def suggest_multi_disk_layout(block_devices):
"size" : "100%",
"mountpoint" : "/",
"filesystem" : {
- "format" : "btrfs"
+ "format" : default_filesystem
}
})
@@ -220,7 +228,7 @@ def suggest_multi_disk_layout(block_devices):
"size" : "100%",
"mountpoint" : "/home",
"filesystem" : {
- "format" : "btrfs"
+ "format" : default_filesystem
}
})