aboutsummaryrefslogtreecommitdiffstats
path: root/stage1/01-sys-tweaks/00-run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'stage1/01-sys-tweaks/00-run.sh')
-rwxr-xr-xstage1/01-sys-tweaks/00-run.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/stage1/01-sys-tweaks/00-run.sh b/stage1/01-sys-tweaks/00-run.sh
index 41985f4..174b98f 100755
--- a/stage1/01-sys-tweaks/00-run.sh
+++ b/stage1/01-sys-tweaks/00-run.sh
@@ -15,6 +15,14 @@ mkdir -p /data/tmp/upper
mkdir -p /data/tmp/work
mkdir -p /data/var/upper
mkdir -p /data/var/work
+
+# Memory ~1G -> Swap 2G; BUT slow and small sd-card
+# Use 200MB (Raspberry comes with 100MB default)
+rm -f /data/swapfile
+dd if=/dev/zero of=/data/swapfile bs=1M count=200
+mkswap /data/swapfile
+chmod 600 /data/swapfile
+
if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then
adduser --disabled-password --gecos "" ${FIRST_USER_NAME}
fi