index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-09-18 10:37:55 +0200 |
---|---|---|
committer | Anton Hvornum <anton@hvornum.se> | 2021-09-18 10:37:55 +0200 |
commit | f6ceb8bba64db220ebfc4046bc2fd69da7185327 (patch) | |
tree | f7395ab62f447ecc76f352f997f91f75e8a6526a /archinstall/lib/disk.py | |
parent | ad534f0804b84200134ab7aa31156b5f04df8806 (diff) |
-rw-r--r-- | archinstall/lib/disk.py | 20 |
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 } }) |