Allow setting custom labels for partitions
This commit is contained in:
parent
2cd0affda6
commit
bc8903f1d9
2 changed files with 7 additions and 3 deletions
|
@ -23,6 +23,7 @@ tempDir="$tempRoot/$relativeDir";
|
||||||
loadkeys "$ARCH_KEYMAP";
|
loadkeys "$ARCH_KEYMAP";
|
||||||
timedatectl set-timezone "$ARCH_TIMEZONE";
|
timedatectl set-timezone "$ARCH_TIMEZONE";
|
||||||
OS_DISK="${ARCH_DISK}" \
|
OS_DISK="${ARCH_DISK}" \
|
||||||
|
OS_LABEL="Arch" \
|
||||||
. "../../Common/OS/partition.sh";
|
. "../../Common/OS/partition.sh";
|
||||||
|
|
||||||
pacman-key --init;
|
pacman-key --init;
|
||||||
|
|
|
@ -4,6 +4,9 @@ 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_DISK="${OS_DISK}";
|
OS_DISK="${OS_DISK}";
|
||||||
|
BOOT_LABEL="${BOOT_LABEL:-Boot}";
|
||||||
|
OS_LABEL="${OS_LABEL:-Linux}";
|
||||||
|
SWAP_LABEL="${SWAP_LABEL:-Swap}";
|
||||||
SKIP_FORMAT_EFI="${SKIP_FORMAT_EFI}";
|
SKIP_FORMAT_EFI="${SKIP_FORMAT_EFI}";
|
||||||
PARTITION_SCRIPT="${PARTITION_SCRIPT:-"./default-partition.sh"}";
|
PARTITION_SCRIPT="${PARTITION_SCRIPT:-"./default-partition.sh"}";
|
||||||
memory="$(cat /proc/meminfo | awk -F " " '/^MemTotal/ { print $2 }')";
|
memory="$(cat /proc/meminfo | awk -F " " '/^MemTotal/ { print $2 }')";
|
||||||
|
@ -35,11 +38,11 @@ linuxDisk="${LINUX_DISK:-"${disks[3]}"}";
|
||||||
|
|
||||||
if ! isTruthy "$SKIP_FORMAT_EFI"
|
if ! isTruthy "$SKIP_FORMAT_EFI"
|
||||||
then
|
then
|
||||||
mkfs.fat -F 32 "$bootDisk";
|
mkfs.fat -F 32 -n "$BOOT_LABEL" "$bootDisk";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkswap "$swapDisk";
|
mkswap -L "$SWAP_LABEL" "$swapDisk";
|
||||||
mkfs.ext4 -F "$linuxDisk";
|
mkfs.ext4 -L "$OS_LABEL" -F "$linuxDisk";
|
||||||
|
|
||||||
mount "$linuxDisk" /mnt;
|
mount "$linuxDisk" /mnt;
|
||||||
mount --mkdir "$bootDisk" /mnt/boot;
|
mount --mkdir "$bootDisk" /mnt/boot;
|
||||||
|
|
Loading…
Reference in a new issue