From 359a0d8544427f4870dc3830646dde89ae336b52 Mon Sep 17 00:00:00 2001 From: haouarihk Date: Fri, 27 Jun 2025 13:18:25 +0000 Subject: [PATCH 01/13] Added User Interface to change iteration time for LUKS encryption --- archinstall/lib/disk/device_handler.py | 6 ++- archinstall/lib/disk/encryption_menu.py | 70 ++++++++++++++++++++++++- archinstall/lib/disk/filesystem.py | 2 + archinstall/lib/models/device_model.py | 10 +++- archinstall/locales/base.pot | 27 ++++++++++ 5 files changed, 111 insertions(+), 4 deletions(-) diff --git a/archinstall/lib/disk/device_handler.py b/archinstall/lib/disk/device_handler.py index cee5b9bf78..836c64a1f4 100644 --- a/archinstall/lib/disk/device_handler.py +++ b/archinstall/lib/disk/device_handler.py @@ -14,6 +14,7 @@ from ..general import SysCommand, SysCommandWorker from ..luks import Luks2 from ..models.device_model import ( + DEFAULT_ITER_TIME, BDevice, BtrfsMountOption, DeviceModification, @@ -308,6 +309,7 @@ def encrypt( mapper_name: str | None, enc_password: Password | None, lock_after_create: bool = True, + iter_time: int = DEFAULT_ITER_TIME, ) -> Luks2: luks_handler = Luks2( dev_path, @@ -315,7 +317,7 @@ def encrypt( password=enc_password, ) - key_file = luks_handler.encrypt() + key_file = luks_handler.encrypt(iter_time=iter_time) self.udev_sync() @@ -346,7 +348,7 @@ def format_encrypted( password=enc_conf.encryption_password, ) - key_file = luks_handler.encrypt() + key_file = luks_handler.encrypt(iter_time=enc_conf.iter_time) self.udev_sync() diff --git a/archinstall/lib/disk/encryption_menu.py b/archinstall/lib/disk/encryption_menu.py index 738fc019a6..1cb3aa99dc 100644 --- a/archinstall/lib/disk/encryption_menu.py +++ b/archinstall/lib/disk/encryption_menu.py @@ -17,7 +17,7 @@ from archinstall.tui.types import Alignment, FrameProperties from ..menu.abstract_menu import AbstractSubMenu -from ..models.device_model import Fido2Device +from ..models.device_model import DEFAULT_ITER_TIME, Fido2Device from ..models.users import Password from ..output import FormattedOutput from ..utils.util import get_password @@ -65,6 +65,14 @@ def _define_menu_options(self) -> list[MenuItem]: preview_action=self._preview, key='encryption_password', ), + MenuItem( + text=tr('Iteration time'), + action=lambda x: select_iteration_time(x), + value=self._enc_config.iter_time, + dependencies=[self._check_dep_enc_type], + preview_action=self._preview, + key='iter_time', + ), MenuItem( text=tr('Partitions'), action=lambda x: select_partitions_to_encrypt(self._device_modifications, x), @@ -120,6 +128,7 @@ def run(self, additional_title: str | None = None) -> DiskEncryption | None: enc_type: EncryptionType | None = self._item_group.find_by_key('encryption_type').value enc_password: Password | None = self._item_group.find_by_key('encryption_password').value + iter_time: int | None = self._item_group.find_by_key('iter_time').value enc_partitions = self._item_group.find_by_key('partitions').value enc_lvm_vols = self._item_group.find_by_key('lvm_volumes').value @@ -140,6 +149,7 @@ def run(self, additional_title: str | None = None) -> DiskEncryption | None: partitions=enc_partitions, lvm_volumes=enc_lvm_vols, hsm_device=self._enc_config.hsm_device, + iter_time=iter_time or DEFAULT_ITER_TIME, ) return None @@ -153,6 +163,9 @@ def _preview(self, item: MenuItem) -> str | None: if (enc_pwd := self._prev_password()) is not None: output += f'\n{enc_pwd}' + if (iter_time := self._prev_iter_time()) is not None: + output += f'\n{iter_time}' + if (fido_device := self._prev_hsm()) is not None: output += f'\n{fido_device}' @@ -214,6 +227,14 @@ def _prev_hsm(self) -> str | None: output += f' ({fido_device.manufacturer}, {fido_device.product})' return f'{tr("HSM device")}: {output}' + def _prev_iter_time(self) -> str | None: + iter_time = self._item_group.find_by_key('iter_time').value + + if iter_time and iter_time != DEFAULT_ITER_TIME: + return f'{tr("Iteration time")}: {iter_time}ms' + + return None + def select_encryption_type( device_modifications: list[DeviceModification], @@ -354,3 +375,50 @@ def select_lvm_vols_to_encrypt( return volumes return [] + + +def select_iteration_time(preset: int | None = None) -> int | None: + header = tr('Enter iteration time for LUKS encryption (in milliseconds)') + '\n' + header += tr('Higher values increase security but slow down boot time') + '\n' + header += tr(f'Default: {DEFAULT_ITER_TIME}ms, Recommended range: 1000-60000') + '\n' + + def validate_iter_time(value: str | None) -> str | None: + if not value: + return tr('Iteration time cannot be empty') + + try: + iter_time = int(value) + if iter_time < 100: + return tr('Iteration time must be at least 100ms') + if iter_time > 120000: + return tr('Iteration time must be at most 120000ms') + return None + except ValueError: + return tr('Please enter a valid number') + + try: + from archinstall.tui.curses_menu import EditMenu + from archinstall.tui.result import ResultType + from archinstall.tui.types import Alignment + + result = EditMenu( + tr('Iteration time (ms)'), + header=header, + alignment=Alignment.CENTER, + allow_skip=True, + default_text=str(preset) if preset else str(DEFAULT_ITER_TIME), + validator=validate_iter_time, + ).input() + + match result.type_: + case ResultType.Skip: + return preset + case ResultType.Selection: + if not result.text(): + return preset + return int(result.text()) + case ResultType.Reset: + return None + except ImportError: + # Fallback for non-interactive mode + return preset or DEFAULT_ITER_TIME diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py index 94e5b627af..e1f9504302 100644 --- a/archinstall/lib/disk/filesystem.py +++ b/archinstall/lib/disk/filesystem.py @@ -287,6 +287,7 @@ def _encrypt_lvm_vols( vol.mapper_name, enc_config.encryption_password, lock_after_create, + iter_time=enc_config.iter_time, ) enc_vols[vol] = luks_handler @@ -317,6 +318,7 @@ def _encrypt_partitions( part_mod.mapper_name, enc_config.encryption_password, lock_after_create=lock_after_create, + iter_time=enc_config.iter_time, ) enc_mods[part_mod] = luks_handler diff --git a/archinstall/lib/models/device_model.py b/archinstall/lib/models/device_model.py index d459a699ef..6fd0205879 100644 --- a/archinstall/lib/models/device_model.py +++ b/archinstall/lib/models/device_model.py @@ -19,7 +19,7 @@ from ..output import debug ENC_IDENTIFIER = 'ainst' - +DEFAULT_ITER_TIME = 10000 class DiskLayoutType(Enum): Default = 'default_layout' @@ -1471,6 +1471,7 @@ class _DiskEncryptionSerialization(TypedDict): partitions: list[str] lvm_volumes: list[str] hsm_device: NotRequired[_Fido2DeviceSerialization] + iter_time: NotRequired[int] @dataclass @@ -1480,6 +1481,7 @@ class DiskEncryption: partitions: list[PartitionModification] = field(default_factory=list) lvm_volumes: list[LvmVolume] = field(default_factory=list) hsm_device: Fido2Device | None = None + iter_time: int = DEFAULT_ITER_TIME def __post_init__(self) -> None: if self.encryption_type in [EncryptionType.Luks, EncryptionType.LvmOnLuks] and not self.partitions: @@ -1504,6 +1506,9 @@ def json(self) -> _DiskEncryptionSerialization: if self.hsm_device: obj['hsm_device'] = self.hsm_device.json() + if self.iter_time != DEFAULT_ITER_TIME: # Only include if not default + obj['iter_time'] = self.iter_time + return obj @classmethod @@ -1559,6 +1564,9 @@ def parse_arg( if hsm := disk_encryption.get('hsm_device', None): enc.hsm_device = Fido2Device.parse_arg(hsm) + if iter_time := disk_encryption.get('iter_time', None): + enc.iter_time = iter_time + return enc diff --git a/archinstall/locales/base.pot b/archinstall/locales/base.pot index 223dd96977..86b6d72ca4 100644 --- a/archinstall/locales/base.pot +++ b/archinstall/locales/base.pot @@ -959,6 +959,33 @@ msgstr "" msgid "Encryption type" msgstr "" +msgid "Iteration time" +msgstr "" + +msgid "Enter iteration time for LUKS encryption (in milliseconds)" +msgstr "" + +msgid "Higher values increase security but slow down boot time" +msgstr "" + +msgid "Default: 10000ms, Recommended range: 1000-60000" +msgstr "" + +msgid "Iteration time (ms)" +msgstr "" + +msgid "Iteration time cannot be empty" +msgstr "" + +msgid "Iteration time must be at least 100ms" +msgstr "" + +msgid "Iteration time must be at most 120000ms" +msgstr "" + +msgid "Please enter a valid number" +msgstr "" + msgid "Partitions" msgstr "" From 5cc6b20f970f0a00b8b8e134f44a26e507fcbbb6 Mon Sep 17 00:00:00 2001 From: haouarihk Date: Fri, 27 Jun 2025 14:34:04 +0000 Subject: [PATCH 02/13] removing unneessary try catch and imports --- archinstall/lib/disk/encryption_menu.py | 44 ++++++++++--------------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/archinstall/lib/disk/encryption_menu.py b/archinstall/lib/disk/encryption_menu.py index 1cb3aa99dc..b2cddea39d 100644 --- a/archinstall/lib/disk/encryption_menu.py +++ b/archinstall/lib/disk/encryption_menu.py @@ -11,7 +11,7 @@ PartitionModification, ) from archinstall.lib.translationhandler import tr -from archinstall.tui.curses_menu import SelectMenu +from archinstall.tui.curses_menu import EditMenu, SelectMenu from archinstall.tui.menu_item import MenuItem, MenuItemGroup from archinstall.tui.result import ResultType from archinstall.tui.types import Alignment, FrameProperties @@ -396,29 +396,21 @@ def validate_iter_time(value: str | None) -> str | None: except ValueError: return tr('Please enter a valid number') - try: - from archinstall.tui.curses_menu import EditMenu - from archinstall.tui.result import ResultType - from archinstall.tui.types import Alignment - - result = EditMenu( - tr('Iteration time (ms)'), - header=header, - alignment=Alignment.CENTER, - allow_skip=True, - default_text=str(preset) if preset else str(DEFAULT_ITER_TIME), - validator=validate_iter_time, - ).input() - - match result.type_: - case ResultType.Skip: + result = EditMenu( + tr('Iteration time (ms)'), + header=header, + alignment=Alignment.CENTER, + allow_skip=True, + default_text=str(preset) if preset else str(DEFAULT_ITER_TIME), + validator=validate_iter_time, + ).input() + + match result.type_: + case ResultType.Skip: + return preset + case ResultType.Selection: + if not result.text(): return preset - case ResultType.Selection: - if not result.text(): - return preset - return int(result.text()) - case ResultType.Reset: - return None - except ImportError: - # Fallback for non-interactive mode - return preset or DEFAULT_ITER_TIME + return int(result.text()) + case ResultType.Reset: + return None From c4860170fb95a133234e77f3152a51418f055d62 Mon Sep 17 00:00:00 2001 From: haouarihk Date: Fri, 27 Jun 2025 15:51:56 +0000 Subject: [PATCH 03/13] used the same constant in luks.py file --- archinstall/lib/luks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/archinstall/lib/luks.py b/archinstall/lib/luks.py index e31c361b54..5845f84330 100644 --- a/archinstall/lib/luks.py +++ b/archinstall/lib/luks.py @@ -7,6 +7,7 @@ from types import TracebackType from archinstall.lib.disk.utils import get_lsblk_info, umount +from archinstall.lib.models.device_model import DEFAULT_ITER_TIME from .exceptions import DiskError, SysCallError from .general import SysCommand, SysCommandWorker, generate_password, run @@ -76,7 +77,7 @@ def encrypt( self, key_size: int = 512, hash_type: str = 'sha512', - iter_time: int = 10000, + iter_time: int = DEFAULT_ITER_TIME, key_file: Path | None = None, ) -> Path | None: debug(f'Luks2 encrypting: {self.luks_dev_path}') From 425ca5f319ced659c364ea8d6e1f7973c91a234f Mon Sep 17 00:00:00 2001 From: haouarihk Date: Fri, 27 Jun 2025 15:53:27 +0000 Subject: [PATCH 04/13] fixed issue with error firing in default value --- archinstall/lib/disk/encryption_menu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/archinstall/lib/disk/encryption_menu.py b/archinstall/lib/disk/encryption_menu.py index b2cddea39d..46520275fe 100644 --- a/archinstall/lib/disk/encryption_menu.py +++ b/archinstall/lib/disk/encryption_menu.py @@ -384,8 +384,8 @@ def select_iteration_time(preset: int | None = None) -> int | None: def validate_iter_time(value: str | None) -> str | None: if not value: - return tr('Iteration time cannot be empty') - + return None + try: iter_time = int(value) if iter_time < 100: @@ -404,7 +404,7 @@ def validate_iter_time(value: str | None) -> str | None: default_text=str(preset) if preset else str(DEFAULT_ITER_TIME), validator=validate_iter_time, ).input() - + match result.type_: case ResultType.Skip: return preset From ab2e9ab80d8ffb120f04841df3e49e370a2782d9 Mon Sep 17 00:00:00 2001 From: haouarihk Date: Fri, 27 Jun 2025 19:50:16 +0000 Subject: [PATCH 05/13] fixed ruf preview warnings --- archinstall/lib/disk/encryption_menu.py | 2 +- archinstall/lib/models/device_model.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/archinstall/lib/disk/encryption_menu.py b/archinstall/lib/disk/encryption_menu.py index 46520275fe..5d6ec359a8 100644 --- a/archinstall/lib/disk/encryption_menu.py +++ b/archinstall/lib/disk/encryption_menu.py @@ -67,7 +67,7 @@ def _define_menu_options(self) -> list[MenuItem]: ), MenuItem( text=tr('Iteration time'), - action=lambda x: select_iteration_time(x), + action=select_iteration_time, value=self._enc_config.iter_time, dependencies=[self._check_dep_enc_type], preview_action=self._preview, diff --git a/archinstall/lib/models/device_model.py b/archinstall/lib/models/device_model.py index 6fd0205879..ef1b88dbc2 100644 --- a/archinstall/lib/models/device_model.py +++ b/archinstall/lib/models/device_model.py @@ -21,6 +21,7 @@ ENC_IDENTIFIER = 'ainst' DEFAULT_ITER_TIME = 10000 + class DiskLayoutType(Enum): Default = 'default_layout' Manual = 'manual_partitioning' From e0e4b45a1bb8fbcfe9723ae31e59f1f6eb53c1e2 Mon Sep 17 00:00:00 2001 From: haouarihk Date: Fri, 27 Jun 2025 19:59:10 +0000 Subject: [PATCH 06/13] preview even if its default value. (iter_time) --- archinstall/lib/disk/encryption_menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archinstall/lib/disk/encryption_menu.py b/archinstall/lib/disk/encryption_menu.py index 5d6ec359a8..a735dafdcd 100644 --- a/archinstall/lib/disk/encryption_menu.py +++ b/archinstall/lib/disk/encryption_menu.py @@ -230,7 +230,7 @@ def _prev_hsm(self) -> str | None: def _prev_iter_time(self) -> str | None: iter_time = self._item_group.find_by_key('iter_time').value - if iter_time and iter_time != DEFAULT_ITER_TIME: + if iter_time: return f'{tr("Iteration time")}: {iter_time}ms' return None From 5f11476ab90b84d6f152f3b2d5df93a0e7ee2cdf Mon Sep 17 00:00:00 2001 From: haouarihk Date: Fri, 27 Jun 2025 20:05:55 +0000 Subject: [PATCH 07/13] check encryption type is not non before showing iter_time --- archinstall/lib/disk/encryption_menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archinstall/lib/disk/encryption_menu.py b/archinstall/lib/disk/encryption_menu.py index a735dafdcd..393aab47dd 100644 --- a/archinstall/lib/disk/encryption_menu.py +++ b/archinstall/lib/disk/encryption_menu.py @@ -163,7 +163,7 @@ def _preview(self, item: MenuItem) -> str | None: if (enc_pwd := self._prev_password()) is not None: output += f'\n{enc_pwd}' - if (iter_time := self._prev_iter_time()) is not None: + if (enc_type := self._prev_type()) is not None and enc_type != EncryptionType.NoEncryption and (iter_time := self._prev_iter_time()) is not None: output += f'\n{iter_time}' if (fido_device := self._prev_hsm()) is not None: From c7c838eed1117f2bcb7182c2aa1863fcd11f9bcc Mon Sep 17 00:00:00 2001 From: haouarihk Date: Fri, 27 Jun 2025 21:52:09 +0000 Subject: [PATCH 08/13] using _real_input with input_vp instead of _current_text --- archinstall/tui/curses_menu.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/archinstall/tui/curses_menu.py b/archinstall/tui/curses_menu.py index 32da868248..d1ab11e188 100644 --- a/archinstall/tui/curses_menu.py +++ b/archinstall/tui/curses_menu.py @@ -566,7 +566,10 @@ def _get_input_text(self) -> str | None: entry = ViewportEntry(err, 0, 0, STYLE.ERROR) self._info_vp.update([entry], 0) self._set_default_info = False - self._real_input = '' + + if self._hide_input: + self._real_input = '' + return None return text @@ -586,7 +589,7 @@ def _draw(self) -> None: if self._set_default_info and self._info_vp: self._info_vp.update([self._only_ascii_text], 0) - self._input_vp.edit(default_text=self._current_text) + self._input_vp.edit(default_text=self._real_input) @override def kickoff(self, win: curses.window) -> Result[str]: From 23f0c8ccf746266a54221c004914397c2e52ff79 Mon Sep 17 00:00:00 2001 From: haouarihk Date: Fri, 27 Jun 2025 22:03:23 +0000 Subject: [PATCH 09/13] proper check for enc_type --- archinstall/lib/disk/encryption_menu.py | 5 +++-- archinstall/lib/interactions/general_conf.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/disk/encryption_menu.py b/archinstall/lib/disk/encryption_menu.py index 393aab47dd..902ba82d75 100644 --- a/archinstall/lib/disk/encryption_menu.py +++ b/archinstall/lib/disk/encryption_menu.py @@ -163,7 +163,7 @@ def _preview(self, item: MenuItem) -> str | None: if (enc_pwd := self._prev_password()) is not None: output += f'\n{enc_pwd}' - if (enc_type := self._prev_type()) is not None and enc_type != EncryptionType.NoEncryption and (iter_time := self._prev_iter_time()) is not None: + if (iter_time := self._prev_iter_time()) is not None: output += f'\n{iter_time}' if (fido_device := self._prev_hsm()) is not None: @@ -229,8 +229,9 @@ def _prev_hsm(self) -> str | None: def _prev_iter_time(self) -> str | None: iter_time = self._item_group.find_by_key('iter_time').value + enc_type = self._item_group.find_by_key('encryption_type').value - if iter_time: + if iter_time and enc_type != EncryptionType.NoEncryption: return f'{tr("Iteration time")}: {iter_time}ms' return None diff --git a/archinstall/lib/interactions/general_conf.py b/archinstall/lib/interactions/general_conf.py index fed77b5e93..38af432a5c 100644 --- a/archinstall/lib/interactions/general_conf.py +++ b/archinstall/lib/interactions/general_conf.py @@ -61,6 +61,7 @@ def ask_hostname(preset: str | None = None) -> str | None: alignment=Alignment.CENTER, allow_skip=True, default_text=preset, + validator=lambda x: x if len(x) > 0 else tr('Hostname cannot be empty'), ).input() match result.type_: From ae280bba2321969d56211b8ea3d4effa8c1dd644 Mon Sep 17 00:00:00 2001 From: haouarihk Date: Sat, 28 Jun 2025 03:45:31 +0000 Subject: [PATCH 10/13] added Interation time to outer menu preview --- archinstall/lib/disk/disk_menu.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/archinstall/lib/disk/disk_menu.py b/archinstall/lib/disk/disk_menu.py index 09dcd55e89..d9e9aa4682 100644 --- a/archinstall/lib/disk/disk_menu.py +++ b/archinstall/lib/disk/disk_menu.py @@ -3,6 +3,7 @@ from archinstall.lib.disk.encryption_menu import DiskEncryptionMenu from archinstall.lib.models.device_model import ( + DEFAULT_ITER_TIME, BtrfsOptions, DiskEncryption, DiskLayoutConfiguration, @@ -261,6 +262,9 @@ def _prev_disk_encryption(self, item: MenuItem) -> str | None: if enc_config.encryption_password: output += tr('Password') + f': {enc_config.encryption_password.hidden()}\n' + if enc_type != EncryptionType.NoEncryption: + output += tr('Iteration time') + f': {enc_config.iter_time or DEFAULT_ITER_TIME}ms\n' + if enc_config.partitions: output += f'Partitions: {len(enc_config.partitions)} selected\n' elif enc_config.lvm_volumes: From 14d2bad528f86117aa9119855c25ceb17008cfc1 Mon Sep 17 00:00:00 2001 From: haouarihk Date: Sat, 28 Jun 2025 03:46:30 +0000 Subject: [PATCH 11/13] removed (ms) from title. so that we don't need to translate "Iteration time" and "iteration time (ms)". --- archinstall/lib/disk/encryption_menu.py | 2 +- archinstall/locales/base.pot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/disk/encryption_menu.py b/archinstall/lib/disk/encryption_menu.py index 902ba82d75..dbbaf73c8d 100644 --- a/archinstall/lib/disk/encryption_menu.py +++ b/archinstall/lib/disk/encryption_menu.py @@ -398,7 +398,7 @@ def validate_iter_time(value: str | None) -> str | None: return tr('Please enter a valid number') result = EditMenu( - tr('Iteration time (ms)'), + tr('Iteration time'), header=header, alignment=Alignment.CENTER, allow_skip=True, diff --git a/archinstall/locales/base.pot b/archinstall/locales/base.pot index 86b6d72ca4..2b5602aef8 100644 --- a/archinstall/locales/base.pot +++ b/archinstall/locales/base.pot @@ -971,7 +971,7 @@ msgstr "" msgid "Default: 10000ms, Recommended range: 1000-60000" msgstr "" -msgid "Iteration time (ms)" +msgid "Iteration time" msgstr "" msgid "Iteration time cannot be empty" From cb7492e11b40617b8e7cb26015717928d987df93 Mon Sep 17 00:00:00 2001 From: haouarihk Date: Sat, 28 Jun 2025 13:03:27 +0000 Subject: [PATCH 12/13] a comment slipped in. this was not supposed to be in this pull --- archinstall/lib/interactions/general_conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/archinstall/lib/interactions/general_conf.py b/archinstall/lib/interactions/general_conf.py index 38af432a5c..fed77b5e93 100644 --- a/archinstall/lib/interactions/general_conf.py +++ b/archinstall/lib/interactions/general_conf.py @@ -61,7 +61,6 @@ def ask_hostname(preset: str | None = None) -> str | None: alignment=Alignment.CENTER, allow_skip=True, default_text=preset, - validator=lambda x: x if len(x) > 0 else tr('Hostname cannot be empty'), ).input() match result.type_: From ce00acd3ee65074c622acd8bf537e212302a30de Mon Sep 17 00:00:00 2001 From: haouarihk Date: Sat, 28 Jun 2025 13:16:54 +0000 Subject: [PATCH 13/13] fixed comparison str with EncryptionType --- archinstall/lib/disk/disk_menu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/disk/disk_menu.py b/archinstall/lib/disk/disk_menu.py index d9e9aa4682..ddbaf047e6 100644 --- a/archinstall/lib/disk/disk_menu.py +++ b/archinstall/lib/disk/disk_menu.py @@ -256,8 +256,8 @@ def _prev_disk_encryption(self, item: MenuItem) -> str | None: return tr('LVM disk encryption with more than 2 partitions is currently not supported') if enc_config: - enc_type = EncryptionType.type_to_text(enc_config.encryption_type) - output = tr('Encryption type') + f': {enc_type}\n' + enc_type = enc_config.encryption_type + output = tr('Encryption type') + f': {EncryptionType.type_to_text(enc_type)}\n' if enc_config.encryption_password: output += tr('Password') + f': {enc_config.encryption_password.hidden()}\n'