From 5eab5731066846c624909f48e8629f4550173b29 Mon Sep 17 00:00:00 2001 From: Christian Rebischke Date: Sat, 6 May 2017 03:38:46 +0200 Subject: added first version of new install scripts --- http/install.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 http/install.sh (limited to 'http/install.sh') diff --git a/http/install.sh b/http/install.sh new file mode 100644 index 0000000..f1c97cc --- /dev/null +++ b/http/install.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +set -e +set -x + +if [ -e /dev/vda ]; then + device=/dev/vda +elif [ -e /dev/sda ]; then + device=/dev/sda +else + echo "ERROR: There is no disk available for installation" >&2 + exit 1 +fi +export device + +memory_size_in_kilobytes=$(free | awk '/^Mem:/ { print $2 }') +swap_size_in_kilobytes=$((memory_size_in_kilobytes * 2)) +sfdisk "$device" <> /mnt/etc/fstab +swapoff "${device}1" + +arch-chroot /mnt /bin/bash -- cgit v1.2.3