index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archinstall/lib/disk/user_guides.py | 10 | ||||
-rw-r--r-- | archinstall/lib/user_interaction.py | 20 |
diff --git a/archinstall/lib/disk/user_guides.py b/archinstall/lib/disk/user_guides.py index a7d9a6e5..b1a81ded 100644 --- a/archinstall/lib/disk/user_guides.py +++ b/archinstall/lib/disk/user_guides.py @@ -2,11 +2,11 @@ import logging from .helpers import sort_block_devices_based_on_performance, select_largest_device, select_disk_larger_than_or_close_to from ..output import log -def suggest_single_disk_layout(block_device, default_filesystem=None): +def suggest_single_disk_layout(block_device, default_filesystem=None, advanced_options=False): if not default_filesystem: from ..user_interaction import ask_for_main_filesystem_format - default_filesystem = ask_for_main_filesystem_format() - + default_filesystem = ask_for_main_filesystem_format(advanced_options) + MIN_SIZE_TO_ALLOW_HOME_PART = 40 # Gb using_subvolumes = False @@ -89,10 +89,10 @@ def suggest_single_disk_layout(block_device, default_filesystem=None): return layout -def suggest_multi_disk_layout(block_devices, default_filesystem=None): +def suggest_multi_disk_layout(block_devices, default_filesystem=None, advanced_options=False): if not default_filesystem: from ..user_interaction import ask_for_main_filesystem_format - default_filesystem = ask_for_main_filesystem_format() + default_filesystem = ask_for_main_filesystem_format(advanced_options) # Not really a rock solid foundation of information to stand on, but it's a start: # https://www.reddit.com/r/btrfs/comments/m287gp/partition_strategy_for_two_physical_disks/ diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 82113ba0..844f40a4 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -481,15 +481,21 @@ def ask_for_disk_layout(): return next((key for key, val in options.items() if val == value), None) -def ask_for_main_filesystem_format(): +def ask_for_main_filesystem_format(advanced_options=False): options = { 'btrfs': 'btrfs', 'ext4': 'ext4', 'xfs': 'xfs', - 'f2fs': 'f2fs', + 'f2fs': 'f2fs' + } + + advanced = { 'ntfs': 'ntfs' } + if advanced_options: + options.update(advanced) + value = generic_select(options, "Select which filesystem your main partition should use (by number or name): ", allow_empty_input=False) return next((key for key, val in options.items() if val == value), None) @@ -562,11 +568,11 @@ def partition_overlap(partitions :list, start :str, end :str) -> bool: # TODO: Implement sanity check return False -def get_default_partition_layout(block_devices): +def get_default_partition_layout(block_devices, advanced_options=False): if len(block_devices) == 1: - return suggest_single_disk_layout(block_devices[0]) + return suggest_single_disk_layout(block_devices[0], advanced_options=advanced_options) else: - return suggest_multi_disk_layout(block_devices) + return suggest_multi_disk_layout(block_devices, advanced_options=advanced_options) # TODO: Implement sane generic layout for 2+ drives @@ -762,7 +768,7 @@ def select_individual_blockdevice_usage(block_devices :list): return result -def select_disk_layout(block_devices :list): +def select_disk_layout(block_devices :list, advanced_options=False): modes = [ "Wipe all selected drives and use a best-effort default partition layout", "Select what to do with each individual drive (followed by partition usage)" @@ -771,7 +777,7 @@ def select_disk_layout(block_devices :list): mode = generic_select(modes, input_text=f"Select what you wish to do with the selected block devices: ") if mode == 'Wipe all selected drives and use a best-effort default partition layout': - return get_default_partition_layout(block_devices) + return get_default_partition_layout(block_devices, advanced_options) else: return select_individual_blockdevice_usage(block_devices) |