Skip to content

Commit c75e6a1

Browse files
authored
Made sure generate-encryption-key-file is set for supplementary partitions to / (#1281)
1 parent 7dbea73 commit c75e6a1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

archinstall/lib/installer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ def mount_ordered_layout(self, layouts: Dict[str, Any]) -> None:
253253

254254
# note that we DON'T auto_unmount (i.e. close the encrypted device so it can be used
255255
with (luks_handle := luks2(partition['device_instance'], loopdev, password, auto_unmount=False)) as unlocked_device:
256-
if partition.get('generate-encryption-key-file',False) and not self._has_root(partition):
257-
list_luks_handles.append([luks_handle,partition,password])
256+
if partition.get('generate-encryption-key-file', False) and not self._has_root(partition):
257+
list_luks_handles.append([luks_handle, partition, password])
258258
# this way all the requesrs will be to the dm_crypt device and not to the physical partition
259259
partition['device_instance'] = unlocked_device
260260

archinstall/lib/menu/global_menu.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,11 @@ def exit_callback(self):
215215
partition['encrypted'] = True
216216
partition['!password'] = storage['arguments']['!encryption-password']
217217

218+
# We make sure generate-encryption-key-file is set on additional partitions
219+
# other than the root partition. Otherwise they won't unlock properly #1279
220+
if partition['mountpoint'] != '/':
221+
partition['generate-encryption-key-file'] = True
222+
218223
def _install_text(self):
219224
missing = len(self._missing_configs())
220225
if missing > 0:

0 commit comments

Comments
 (0)