diff --git a/scripts/Arch/OS/setup.sh b/scripts/Arch/OS/setup.sh index dae47827..46902b73 100755 --- a/scripts/Arch/OS/setup.sh +++ b/scripts/Arch/OS/setup.sh @@ -22,6 +22,7 @@ tempDir="$tempRoot/$relativeDir"; loadkeys "$ARCH_KEYMAP"; timedatectl set-timezone "$ARCH_TIMEZONE"; +OS_MOUNT_ROOT="${ARCH_MOUNT_ROOT}"; OS_DISK="${ARCH_DISK}" \ OS_LABEL="Arch" \ . "../../Common/OS/partition.sh"; diff --git a/scripts/Common/OS/partition.sh b/scripts/Common/OS/partition.sh index 22d1c3b1..3ff89f37 100755 --- a/scripts/Common/OS/partition.sh +++ b/scripts/Common/OS/partition.sh @@ -3,6 +3,7 @@ pushd "${BASH_SOURCE%/*}" > /dev/null; source "../Scripts/is-truthy.sh"; source "../Scripts/choose-disk.sh"; +OS_MOUNT_ROOT="${OS_ROOT:-"/mnt"}"; OS_DISK="${OS_DISK}"; BOOT_LABEL="${BOOT_LABEL:-Boot}"; OS_LABEL="${OS_LABEL:-Linux}"; @@ -44,9 +45,9 @@ fi mkswap -L "$SWAP_LABEL" "$swapDisk"; mkfs.ext4 -L "$OS_LABEL" -F "$linuxDisk"; -mount "$linuxDisk" /mnt; -mount --mkdir "$bootDisk" /mnt/boot; -swapon "$swapDisk"; +mount "/dev/disk/by-label/$OS_LABEL" "$OS_MOUNT_ROOT"; +mount --mkdir "/dev/disk/by-label/$BOOT_LABEL" "$OS_MOUNT_ROOT/boot"; +swapon "/dev/disk/by-label/$SWAP_LABEL"; if command -v extraMounts then