Move prepare mount steps to beginning

This commit is contained in:
Tobias Strobel 2022-09-11 20:22:01 +02:00
parent 86da245a12
commit bffea892e6

View file

@ -31,6 +31,11 @@ exec 2> >(tee "stderr.log" >&2)
export SNAP_PAC_SKIP=y
umount -R /mnt 2> /dev/null || true
swapoff --all
cryptsetup close swap 2> /dev/null || true
cryptsetup luksClose system 2> /dev/null || true
# Dialog
BACKTITLE="Arch Linux installation"
@ -114,11 +119,6 @@ echo -e "\n### Setting up fastest mirrors"
reflector --country 'Germany,France' --protocol https --sort rate --latest 5 --save /etc/pacman.d/mirrorlist
echo -e "\n### Setting up partitions"
umount -R /mnt 2> /dev/null || true
swapoff --all
cryptsetup close swap 2> /dev/null || true
cryptsetup luksClose luks 2> /dev/null || true
sgdisk --zap-all "${device}"
sgdisk --clear \
--new=1:0:+550MiB --typecode=1:ef00 --change-name=1:EFI \