Skip to content

Commit

Permalink
Made sure generate-encryption-key-file is set for supplementary parti…
Browse files Browse the repository at this point in the history
…tions to / (#1281)
  • Loading branch information
Torxed committed May 29, 2022
1 parent 7dbea73 commit c75e6a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ def mount_ordered_layout(self, layouts: Dict[str, Any]) -> None:

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

Expand Down
5 changes: 5 additions & 0 deletions archinstall/lib/menu/global_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ def exit_callback(self):
partition['encrypted'] = True
partition['!password'] = storage['arguments']['!encryption-password']

# We make sure generate-encryption-key-file is set on additional partitions
# other than the root partition. Otherwise they won't unlock properly #1279
if partition['mountpoint'] != '/':
partition['generate-encryption-key-file'] = True

def _install_text(self):
missing = len(self._missing_configs())
if missing > 0:
Expand Down

0 comments on commit c75e6a1

Please sign in to comment.