archlinux / archinstall

Arch Linux installer - guided, templates etc.
GNU General Public License v3.0
5.95k stars 514 forks source link

Invalid home partition start and length #2377

Closed codefiles closed 5 months ago

codefiles commented 5 months ago

The start and length of the home partition takes into account the length of the root partition but not its start.

https://github.com/archlinux/archinstall/blob/f107104103b74ac065a56bd94a0878f0d263e177/archinstall/lib/interactions/disk_conf.py#L309-L317

Here is a possible fix.

diff --git a/archinstall/lib/interactions/disk_conf.py b/archinstall/lib/interactions/disk_conf.py
index 85b377b7..e5904a3c 100644
--- a/archinstall/lib/interactions/disk_conf.py
+++ b/archinstall/lib/interactions/disk_conf.py
@@ -310,8 +310,8 @@ def suggest_single_disk_layout(
                # If we don't want to use subvolumes,
                # But we want to be able to re-use data between re-installs..
                # A second partition for /home would be nice if we have the space for it
-               home_start = root_partition.length
-               home_length = device.device_info.total_size - root_partition.length
+               home_start = root_partition.start + root_partition.length
+               home_length = device.device_info.total_size - home_start

                if using_gpt:
                        home_length -= align_buffer