diff --git a/install.sh b/install.sh index 7784a80..12f97fc 100755 --- a/install.sh +++ b/install.sh @@ -2,34 +2,34 @@ source install.conf + # make command silent s() { $* >/dev/null 2>&1 } -# check for internet + +echo "checking internet connection" s ping -c1 archlinux.org if [[ "$?" -ne 0 ]]; then echo "internet connection needed" exit 1 fi -# determine efi or bios boot mode +echo "determining boot mode" if [[ ! "$boot_mode" ]]; then s ls /sys/firmware/efi/efivars if [[ "$?" -eq 0 ]]; then - echo "selected efi boot mode" boot_mode='efi' else - echo "selected bios boot mode" boot_mode='bios' fi fi -echo "update system clock" +echo "updating system clock" s timedatectl set-ntp true -echo "create partitions" +echo "creating partitions" s wipefs -af "$storage_device" if [[ "$boot_mode" == "efi" ]]; then sgdisk -n "1:2048:+1G" -t "1:EF00" "$storage_device" @@ -37,8 +37,6 @@ else sgdisk -n "1:2048:+1G" -t "1:EF02" "$storage_device" fi sgdisk -n "2:0:0" -t "2:8309" "$storage_device" - -echo "creating luks partition" echo "$encryption_password" | cryptsetup -q luksFormat --type luks1 "${storage_device}2" echo "$encryption_password" | cryptsetup -q open "${storage_device}2" lvm