From 68e2d8c3faa61df498338081c49baee785e2fedd Mon Sep 17 00:00:00 2001 From: codefiles <11915375+codefiles@users.noreply.github.com> Date: Sun, 17 Nov 2024 03:40:52 -0500 Subject: [PATCH] Fix _mount_luks_partition() (#2838) --- archinstall/lib/installer.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index b8ac1e1942..3f7793ea44 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -337,13 +337,14 @@ def _mount_lvm_vol(self, volume: disk.LvmVolume) -> None: self._mount_btrfs_subvol(volume.dev_path, volume.btrfs_subvols, volume.mount_options) def _mount_luks_partition(self, part_mod: disk.PartitionModification, luks_handler: Luks2) -> None: - if part_mod.fs_type != disk.FilesystemType.Btrfs: - if part_mod.mountpoint and luks_handler.mapper_dev: - target = self.target / part_mod.relative_mountpoint - disk.device_handler.mount(luks_handler.mapper_dev, target, options=part_mod.mount_options) + if not luks_handler.mapper_dev: + return None - if part_mod.fs_type == disk.FilesystemType.Btrfs and luks_handler.mapper_dev: + if part_mod.fs_type == disk.FilesystemType.Btrfs and part_mod.btrfs_subvols: self._mount_btrfs_subvol(luks_handler.mapper_dev, part_mod.btrfs_subvols, part_mod.mount_options) + elif part_mod.mountpoint: + target = self.target / part_mod.relative_mountpoint + disk.device_handler.mount(luks_handler.mapper_dev, target, options=part_mod.mount_options) def _mount_luks_volume(self, volume: disk.LvmVolume, luks_handler: Luks2) -> None: if volume.fs_type != disk.FilesystemType.Btrfs: