index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-11-23 23:09:33 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 00:09:33 +0100 |
commit | e729457b6c12a00b17207254ee72e98b78912f8d (patch) | |
tree | 554c13c7a363ccc5ef2c25873af15598df9a2ba3 /archinstall/lib/user_interaction.py | |
parent | 29736c4a051d2c72bcbf0b20abdebc6992a92e4b (diff) |
-rw-r--r-- | archinstall/lib/user_interaction.py | 22 |
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 39e87c02..7d90915f 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -9,7 +9,7 @@ import signal import sys import time -from .disk import BlockDevice, valid_fs_type, find_partition_by_mountpoint, suggest_single_disk_layout, suggest_multi_disk_layout, valid_parted_position +from .disk import BlockDevice, valid_fs_type, suggest_single_disk_layout, suggest_multi_disk_layout, valid_parted_position from .exceptions import RequirementError, UserError, DiskError from .hardware import AVAILABLE_GFX_DRIVERS, has_uefi, has_amd_graphics, has_intel_graphics, has_nvidia_graphics from .locale_helpers import list_keyboard_languages, verify_keyboard_layout, search_keyboard_layout @@ -193,18 +193,20 @@ def generic_multi_select(options, text="Select one or more of the options above return selected_options def select_encrypted_partitions(block_devices :dict, password :str) -> dict: - root = find_partition_by_mountpoint(block_devices, '/') - root['encrypted'] = True - root['!password'] = password + for device in block_devices: + for partition in block_devices[device]['partitions']: + if partition.get('mountpoint', None) != '/boot': + partition['encrypted'] = True + partition['!password'] = password - return block_devices + if partition['mountpoint'] != '/': + # Tell the upcoming steps to generate a key-file for non root mounts. + partition['generate-encryption-key-file'] = True - # TODO: Next version perhaps we can support multiple encrypted partitions - # options = [] - # for partition in block_devices.values(): - # options.append({key: val for key, val in partition.items() if val}) + return block_devices - # print(generic_multi_select(options, f"Choose which partitions to encrypt (leave blank when done): ")) + # TODO: Next version perhaps we can support mixed multiple encrypted partitions + # Users might want to single out a partition for non-encryption to share between dualboot etc. class MiniCurses: def __init__(self, width, height): |