index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-07-04 15:15:07 +0200 |
---|---|---|
committer | Anton Hvornum <anton@hvornum.se> | 2021-07-04 15:15:07 +0200 |
commit | f2b0fcc6524226c99e38edd3fa03a3a68af33738 (patch) | |
tree | e767632447d5b868610a4aa0df1e793503e9cfeb /archinstall/lib/user_interaction.py | |
parent | 57bad26553166d6c1bfa81576089a29d56c970a7 (diff) |
-rw-r--r-- | archinstall/lib/user_interaction.py | 18 |
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 9f4ddc6d..197666a4 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -701,7 +701,23 @@ def manage_new_and_existing_partitions(block_device :BlockDevice) -> dict: elif task == "Mark/Unmark a partition to be formatted (wipes data)": if (partition := generic_select(block_device_struct["partitions"], 'Select which partition to mask for formatting: ', options_output=False)): - # Negate the current encryption marking + # If we mark a partition for formatting, but the format is CRYPTO LUKS, there's no point in formatting it really + # without asking the user which inner-filesystem they want to use. Since the flag 'encrypted' = True is already set, + # it's safe to change the filesystem for this partition. + if block_device_struct["partitions"][block_device_struct["partitions"].index(partition)].get('filesystem', {}).get('format', 'crypto_LUKS') == 'crypto_LUKS': + if not block_device_struct["partitions"][block_device_struct["partitions"].index(partition)].get('filesystem', None): + block_device_struct["partitions"][block_device_struct["partitions"].index(partition)]['filesystem'] = {} + + while True: + fstype = input("Enter a desired filesystem type for the partition: ").strip() + if not valid_fs_type(fstype): + log(f"Desired filesystem {fstype} is not a valid filesystem.", level=logging.ERROR, fg="red") + continue + break + + block_device_struct["partitions"][block_device_struct["partitions"].index(partition)]['filesystem']['format'] = fstype + + # Negate the current wipe marking block_device_struct["partitions"][block_device_struct["partitions"].index(partition)]['format'] = not block_device_struct["partitions"][block_device_struct["partitions"].index(partition)].get('format', False) elif task == "Mark/Unmark a partition as encrypted": |