From e532b7615813e72fe576c20eaf4cd988e9ef8729 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Mon, 22 Nov 2021 15:08:41 -0500 Subject: Make NTFS an advanced option (#753) * Make NTFS an advanced option --- archinstall/lib/user_interaction.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'archinstall/lib/user_interaction.py') 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) -- cgit v1.2.3-54-g00ecf