Re-running the "Mount Partitions" step causes the root partition to be mis-mounted
I installed Manjaro with Architect, and second-guessed myself a couple of times on correct disk setup - but after selecting the setup I wanted, I got the error "Partition(s) must be mounted first" when trying to install the system.
It turned out that whenever I selected my root partition, it got mounted under /mnt/home
not /mnt/
. Exiting and re-entering the installer fixed this, and once I selected the right things first time, I was able to proceed.
Looking at the code, I think the problem is that the $MOUNT variable is not cleared - the first time mounting partitions it has the default empty value, so mounting root at /mnt/$MOUNT does the right thing, but the second and subsequent times, it will still have the value of whatever partition you created last (/home, in my case) and root will be mounted at the wrong place.
I don't have push access but the following commit should fix it:
diff --git a/lib/util-disk.sh b/lib/util-disk.sh
index bd8663b..9f46a27 100644
--- a/lib/util-disk.sh
+++ b/lib/util-disk.sh
@@ -1425,6 +1425,8 @@ mount_partitions() {
ROOT_PART=${PARTITION}
echo ${ROOT_PART} > /tmp/.root_partitioni
echo ${ROOT_PART} > /tmp/.root_partition
+ # Reset the mountpoint variable, in case this is the second time through this menu and old state is still around
+ MOUNT=""
# Format with FS (or skip) -> # Make the directory and mount. Also identify LUKS and/or LVM
select_filesystem && mount_current_partition || return 0