From a2e539a2bd7da6fa7fa8502bba0178a5b69436a0 Mon Sep 17 00:00:00 2001 From: codefiles <11915375+codefiles@users.noreply.github.com> Date: Mon, 29 Jul 2024 02:24:29 -0400 Subject: [PATCH] Fix mount order (#2595) --- archinstall/lib/installer.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 74a3340a..4cab29c9 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -229,7 +229,16 @@ class Installer: if self._disk_config.lvm_config: pvs = self._disk_config.lvm_config.get_all_pvs() + sorted_device_mods = self._disk_config.device_modifications.copy() + + # move the device with the root partition to the beginning of the list for mod in self._disk_config.device_modifications: + if any(partition.is_root() for partition in mod.partitions): + sorted_device_mods.remove(mod) + sorted_device_mods.insert(0, mod) + break + + for mod in sorted_device_mods: not_pv_part_mods = list(filter(lambda x: x not in pvs, mod.partitions)) # partitions have to mounted in the right order on btrfs the mountpoint will