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"; loadkeys "$ARCH_KEYMAP";
timedatectl set-timezone "$ARCH_TIMEZONE"; timedatectl set-timezone "$ARCH_TIMEZONE";
OS_MOUNT_ROOT="${ARCH_MOUNT_ROOT}";
OS_DISK="${ARCH_DISK}" \ OS_DISK="${ARCH_DISK}" \
OS_LABEL="Arch" \ OS_LABEL="Arch" \
. "../../Common/OS/partition.sh"; . "../../Common/OS/partition.sh";

View file

@ -3,6 +3,7 @@ pushd "${BASH_SOURCE%/*}" > /dev/null;
source "../Scripts/is-truthy.sh"; source "../Scripts/is-truthy.sh";
source "../Scripts/choose-disk.sh"; source "../Scripts/choose-disk.sh";
OS_MOUNT_ROOT="${OS_ROOT:-"/mnt"}";
OS_DISK="${OS_DISK}"; OS_DISK="${OS_DISK}";
BOOT_LABEL="${BOOT_LABEL:-Boot}"; BOOT_LABEL="${BOOT_LABEL:-Boot}";
OS_LABEL="${OS_LABEL:-Linux}"; OS_LABEL="${OS_LABEL:-Linux}";
@ -44,9 +45,9 @@ fi
mkswap -L "$SWAP_LABEL" "$swapDisk"; mkswap -L "$SWAP_LABEL" "$swapDisk";
mkfs.ext4 -L "$OS_LABEL" -F "$linuxDisk"; mkfs.ext4 -L "$OS_LABEL" -F "$linuxDisk";
mount "$linuxDisk" /mnt; mount "/dev/disk/by-label/$OS_LABEL" "$OS_MOUNT_ROOT";
mount --mkdir "$bootDisk" /mnt/boot; mount --mkdir "/dev/disk/by-label/$BOOT_LABEL" "$OS_MOUNT_ROOT/boot";
swapon "$swapDisk"; swapon "/dev/disk/by-label/$SWAP_LABEL";
if command -v extraMounts if command -v extraMounts
then then