Prevent EFI formatting for dual boot

This commit is contained in:
Manuel Thalmann 2023-07-12 23:30:00 +02:00
parent 6f16eb75e6
commit e08c4546a4
2 changed files with 8 additions and 1 deletions

View file

@ -2,6 +2,7 @@
pushd "${BASH_SOURCE%/*}" > /dev/null;
PARTITION_SCRIPT="$(realpath ./partition.sh)" \
SKIP_FORMAT_EFI=1 \
ARCH_MOUNT_ROOT="/mnt" \
ARCH_DISK=nvme0n1 \
ARCH_HOSTNAME="der-geret" \

View file

@ -1,8 +1,10 @@
#!/bin/bash
pushd "${BASH_SOURCE%/*}" > /dev/null;
source "../../Common/Scripts/is-truthy.sh";
source "../../Common/Scripts/choose-disk.sh";
ARCH_DISK="${ARCH_DISK}";
SKIP_FORMAT_EFI="${SKIP_FORMAT_EFI}";
PARTITION_SCRIPT="${PARTITION_SCRIPT:-"./default-partition.sh"}";
memory="$(cat /proc/meminfo | awk -F " " '/^MemTotal/ { print $2 }')";
swapSize="$(echo "$memory" | awk '{ print int(($1 / 1024 / 1024 4) + 0.5)}')";
@ -31,7 +33,11 @@ bootDisk="${BOOT_DISK:-"${disks[1]}"}";
swapDisk="${SWAP_DISK:-"${disks[2]}"}";
linuxDisk="${LINUX_DISK:-"${disks[3]}"}";
if ! isTruthy "$SKIP_FORMAT_EFI"
then
mkfs.fat -F 32 "$bootDisk";
fi
mkswap "$swapDisk";
mkfs.ext4 -F "$linuxDisk";