diff --git a/archinstall/lib/disk/device_handler.py b/archinstall/lib/disk/device_handler.py index 12c8108b..35e5a174 100644 --- a/archinstall/lib/disk/device_handler.py +++ b/archinstall/lib/disk/device_handler.py @@ -599,12 +599,12 @@ class DeviceHandler: self.mount(path, self._TMP_BTRFS_MOUNT, create_target_mountpoint=True) - for sub_vol in btrfs_subvols: + for sub_vol in sorted(btrfs_subvols, key=lambda x: x.name): debug(f'Creating subvolume: {sub_vol.name}') subvol_path = self._TMP_BTRFS_MOUNT / sub_vol.name - SysCommand(f"btrfs subvolume create {subvol_path}") + SysCommand(f"btrfs subvolume create -p {subvol_path}") if BtrfsMountOption.nodatacow.value in mount_options: try: @@ -653,12 +653,12 @@ class DeviceHandler: options=part_mod.mount_options ) - for sub_vol in part_mod.btrfs_subvols: + for sub_vol in sorted(part_mod.btrfs_subvols, key=lambda x: x.name): debug(f'Creating subvolume: {sub_vol.name}') subvol_path = self._TMP_BTRFS_MOUNT / sub_vol.name - SysCommand(f"btrfs subvolume create {subvol_path}") + SysCommand(f"btrfs subvolume create -p {subvol_path}") self.umount(dev_path) diff --git a/archinstall/lib/disk/subvolume_menu.py b/archinstall/lib/disk/subvolume_menu.py index 7873e66b..4978ac91 100644 --- a/archinstall/lib/disk/subvolume_menu.py +++ b/archinstall/lib/disk/subvolume_menu.py @@ -59,7 +59,8 @@ class SubvolumeMenu(ListManager): path = prompt_dir( str(_("Subvolume mountpoint")), header=header, - allow_skip=True + allow_skip=True, + validate=False ) if not path: diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index e5e1a43a..6c4eeb2c 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -361,7 +361,7 @@ class Installer: subvolumes: list[disk.SubvolumeModification], mount_options: list[str] = [] ) -> None: - for subvol in subvolumes: + for subvol in sorted(subvolumes, key=lambda x: x.relative_mountpoint): mountpoint = self.target / subvol.relative_mountpoint mount_options = mount_options + [f'subvol={subvol.name}'] disk.device_handler.mount(dev_path, mountpoint, options=mount_options)