From f6ceb8bba64db220ebfc4046bc2fd69da7185327 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sat, 18 Sep 2021 10:37:55 +0200 Subject: Removing hardcoded btrfs for suggested partition layouts. --- archinstall/lib/disk.py | 20 ++++++++++++++------ 1 file 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 } }) -- cgit v1.2.3-70-g09d2