From 7326d51161bf6fd7f1c683cf1d7ce09338efe4b7 Mon Sep 17 00:00:00 2001 From: codefiles <11915375+codefiles@users.noreply.github.com> Date: Wed, 26 Jul 2023 09:22:01 -0400 Subject: Fix boot loader disk encryption conditional (#1950) --- archinstall/lib/installer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'archinstall/lib') diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index f5999002..48177013 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -797,7 +797,7 @@ class Installer: options_entry = [] - if root_partition.safe_fs_type.is_crypto(): + if root_partition in self._disk_encryption.partitions: # TODO: We need to detect if the encrypted device is a whole disk encryption, # or simply a partition encryption. Right now we assume it's a partition (and we always have) debug('Root partition is an encrypted device, identifying by PARTUUID: {root_partition.partuuid}') @@ -858,7 +858,7 @@ class Installer: _file = "/etc/default/grub" - if root_partition.safe_fs_type.is_crypto(): + if root_partition in self._disk_encryption.partitions: debug(f"Using UUID {root_partition.uuid} as encrypted root identifier") cmd_line_linux = f"sed -i 's/GRUB_CMDLINE_LINUX=\"\"/GRUB_CMDLINE_LINUX=\"cryptdevice=UUID={root_partition.uuid}:cryptlvm rootfstype={root_partition.safe_fs_type.value}\"/'" @@ -1049,7 +1049,7 @@ TIMEOUT=5 # blkid doesn't trigger on loopback devices really well, # so we'll use the old manual method until we get that sorted out. - if root_partition.safe_fs_type.is_crypto(): + if root_partition in self._disk_encryption.partitions: # TODO: We need to detect if the encrypted device is a whole disk encryption, # or simply a partition encryption. Right now we assume it's a partition (and we always have) debug(f'Identifying root partition by PARTUUID: {root_partition.partuuid}') -- cgit v1.2.3-54-g00ecf