index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archinstall/lib/disk.py | 1 | ||||
-rw-r--r-- | archinstall/lib/user_interaction.py | 18 |
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py index d6f6ebde..99e6da19 100644 --- a/archinstall/lib/disk.py +++ b/archinstall/lib/disk.py @@ -395,6 +395,7 @@ class BlockDevice: for partition in self: if partition.uuid == uuid: return partition + print('Returning False on get_partition()') class Partition: 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": |