+
+
+# this is usefull. Only thing reason I see this being disabled by default is
+# that a normal user can disrupt the system, eg cause a reboot.
+sed -i '$a kernel.sysrq=1
+/^kernel.sysrq=/d' /etc/sysctl.conf
+EOF
+
+
+if [[ $FAI_ACTION != dirinstall ]]; then
+
+
+ if ifclass BUSTER_LINODE; then
+ speed=19200
+ # luks.crypttab=no see man systemd-cryptsetup-generator
+ cmdline="luks.crypttab=no console=ttyS0,${speed}n8"
+ else
+ speed=115200
+ cmdline="luks.crypttab=no console=ttyS0,${speed} console=tty0"
+ fi
+
+ cat >$FAI_ROOT/etc/grub.d/40_custom <<EOF
+#!/bin/sh
+exec tail -n +3 \$0
+# This file provides an easy way to add custom menu entries. Simply type the
+# menu entries you want to add after this comment. Be careful not to change
+# the 'exec tail' line above.
+
+# https://www.coreboot.org/Serial_console # tty
+# but removed unneeded stuff
+
+serial --speed=$speed
+terminal_input --append serial
+terminal_output --append serial
+EOF
+
+
+
+ chroot $FAI_ROOT bash <<EOF
+set -eE -o pipefail