various fixes
[automated-distro-installer] / live-kexec
diff --git a/live-kexec b/live-kexec
new file mode 100644 (file)
index 0000000..10975a8
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# You can copy this to a http server, then wget -O- url|sudo bash
+# or curl|bash, if curl is installed.
+#
+# This has been tested on trisquel belanos and ubuntu xenial.
+#
+# If the screen just sits in a weird color inverted, corrupted looking state,
+# it's probably nothing wrong with the computer, but a problem
+# with the fai server. If you can do this from a virtual terminal,
+# it will print out more info (I know from running it on a vm).
+
+set -ex
+if grep -q ID=ubuntu /etc/os-release; then
+    sed -ri '/^\s*deb/{/universe/!s/$/ universe/}' /etc/apt/sources.list
+fi
+apt-get update
+apt-get install -y debconf
+debconf-set-selections <<EOF
+kexec-tools kexec-tools/load_kexec boolean false
+EOF
+apt-get install -y pxe-kexec
+# at least on belanos, apt-get goes into the background,
+# and we need to wait for it to finish.
+sleep 5
+pxe-kexec -n --ignore-whitelist -l fai-generated faiserver