polish
This commit is contained in:
parent
f5b68b8441
commit
a6e57f95b4
14
install.sh
14
install.sh
@ -2,34 +2,34 @@
|
|||||||
|
|
||||||
source install.conf
|
source install.conf
|
||||||
|
|
||||||
|
|
||||||
# make command silent
|
# make command silent
|
||||||
s() {
|
s() {
|
||||||
$* >/dev/null 2>&1
|
$* >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
# check for internet
|
|
||||||
|
echo "checking internet connection"
|
||||||
s ping -c1 archlinux.org
|
s ping -c1 archlinux.org
|
||||||
if [[ "$?" -ne 0 ]]; then
|
if [[ "$?" -ne 0 ]]; then
|
||||||
echo "internet connection needed"
|
echo "internet connection needed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# determine efi or bios boot mode
|
echo "determining boot mode"
|
||||||
if [[ ! "$boot_mode" ]]; then
|
if [[ ! "$boot_mode" ]]; then
|
||||||
s ls /sys/firmware/efi/efivars
|
s ls /sys/firmware/efi/efivars
|
||||||
if [[ "$?" -eq 0 ]]; then
|
if [[ "$?" -eq 0 ]]; then
|
||||||
echo "selected efi boot mode"
|
|
||||||
boot_mode='efi'
|
boot_mode='efi'
|
||||||
else
|
else
|
||||||
echo "selected bios boot mode"
|
|
||||||
boot_mode='bios'
|
boot_mode='bios'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "update system clock"
|
echo "updating system clock"
|
||||||
s timedatectl set-ntp true
|
s timedatectl set-ntp true
|
||||||
|
|
||||||
echo "create partitions"
|
echo "creating partitions"
|
||||||
s wipefs -af "$storage_device"
|
s wipefs -af "$storage_device"
|
||||||
if [[ "$boot_mode" == "efi" ]]; then
|
if [[ "$boot_mode" == "efi" ]]; then
|
||||||
sgdisk -n "1:2048:+1G" -t "1:EF00" "$storage_device"
|
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"
|
sgdisk -n "1:2048:+1G" -t "1:EF02" "$storage_device"
|
||||||
fi
|
fi
|
||||||
sgdisk -n "2:0:0" -t "2:8309" "$storage_device"
|
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 luksFormat --type luks1 "${storage_device}2"
|
||||||
echo "$encryption_password" | cryptsetup -q open "${storage_device}2" lvm
|
echo "$encryption_password" | cryptsetup -q open "${storage_device}2" lvm
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user