Allow customizing the OS mount root

This commit is contained in:
Manuel Thalmann 2023-11-28 01:22:48 +01:00
parent bc8903f1d9
commit 578e77235a
2 changed files with 5 additions and 3 deletions

View file

@ -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";

View file

@ -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