Repository: archlinux/archinstall

Issue:
Premounted partitions systemd-boot issue
so this is in connection to my previous issue
https://github.com/archlinux/archinstall/issues/2054

Anyway, the v2.6.3 have fix the grub issue. However the systemd-boot remains.

![Screenshot_2023-10-02-00-59-47_18238](https://github.com/archlinux/archinstall/assets/85185940/71513ed1-a3bd-4832-80fc-e6303f81171a)

It seems that the UUID was not filled up.

Like I said above, I have tested grub and it was fixed. I have not tried other other bootloaders

here is the install log

[install-systemd.log](https://github.com/archlinux/archinstall/files/12777578/install-systemd.log)


It install just fine but it just does not boot since no UUID in the loader


Discussion:
I tested my last fix with GRUB and it worked so I submitted a pull request for it. After, I figured I had not done enough testing and tried with BTRFS subvolumes and systemd-boot and that did not work as I stated at the end here https://github.com/archlinux/archinstall/pull/2113#discussion_r1336510577. I then switched the pr to a draft and was going to come back to it. I saw the next day it had been marked as ready, approved, and merged. I thought maybe I did something wrong in my test and it worked.

I now see that the `PartitionModification` returned by `PartitionModification.from_existing_partition()` does not contain the partuuid. There also is a problem where the mount point for BTRFS subvolumes is not updated in `DeviceHandler.detect_pre_mounted_mods()` like it was for partitions with the last fix.

I will submit a fix shortly. Please test and report back. Thanks.

Resolving patch:
diff --git a/archinstall/lib/disk/device_handler.py b/archinstall/lib/disk/device_handler.py
--- a/archinstall/lib/disk/device_handler.py
+++ b/archinstall/lib/disk/device_handler.py
@@ -83,7 +83,9 @@ def load_devices(self):
 					_PartitionInfo.from_partition(
 						partition,
 						fs_type,
+						lsblk_info.partn,
 						lsblk_info.partuuid,
+						lsblk_info.uuid,
 						lsblk_info.mountpoints,
 						subvol_infos
 					)
@@ -598,7 +600,12 @@ def detect_pre_mounted_mods(self, base_mountpoint: Path) -> List[DeviceModificat
 						path = Path(part_info.disk.device.path)
 						part_mods.setdefault(path, [])
 						part_mod = PartitionModification.from_existing_partition(part_info)
-						part_mod.mountpoint = mountpoint.root / mountpoint.relative_to(base_mountpoint)
+						if part_mod.mountpoint:
+							part_mod.mountpoint = mountpoint.root / mountpoint.relative_to(base_mountpoint)
+						else:
+							for subvol in part_mod.btrfs_subvols:
+								if sm := subvol.mountpoint:
+									subvol.mountpoint = sm.root / sm.relative_to(base_mountpoint)
 						part_mods[path].append(part_mod)
 						break
 
diff --git a/archinstall/lib/disk/device_model.py b/archinstall/lib/disk/device_model.py
--- a/archinstall/lib/disk/device_model.py
+++ b/archinstall/lib/disk/device_model.py
@@ -308,7 +308,9 @@ class _PartitionInfo:
 	start: Size
 	length: Size
 	flags: List[PartitionFlag]
+	partn: int
 	partuuid: str
+	uuid: str
 	disk: Disk
 	mountpoints: List[Path]
 	btrfs_subvol_infos: List[_BtrfsSubvolumeInfo] = field(default_factory=list)
@@ -342,7 +344,9 @@ def from_partition(
 		cls,
 		partition: Partition,
 		fs_type: Optional[FilesystemType],
+		partn: int,
 		partuuid: str,
+		uuid: str,
 		mountpoints: List[Path],
 		btrfs_subvol_infos: List[_BtrfsSubvolumeInfo] = []
 	) -> _PartitionInfo:
@@ -370,7 +374,9 @@ def from_partition(
 			start=start,
 			length=length,
 			flags=flags,
+			partn=partn,
 			partuuid=partuuid,
+			uuid=uuid,
 			disk=partition.disk,
 			mountpoints=mountpoints,
 			btrfs_subvol_infos=btrfs_subvol_infos
@@ -713,6 +719,9 @@ def from_existing_partition(cls, partition_info: _PartitionInfo) -> PartitionMod
 			length=partition_info.length,
 			fs_type=partition_info.fs_type,
 			dev_path=partition_info.path,
+			partn=partition_info.partn,
+			partuuid=partition_info.partuuid,
+			uuid=partition_info.uuid,
 			flags=partition_info.flags,
 			mountpoint=mountpoint,
 			btrfs_subvols=subvol_mods


Test patch: