diff --git a/image/mkosi.files/mkosi.qemu.conf b/image/mkosi.files/mkosi.qemu.conf index e11730abc..15b14a433 100644 --- a/image/mkosi.files/mkosi.qemu.conf +++ b/image/mkosi.files/mkosi.qemu.conf @@ -1,3 +1,7 @@ [Output] KernelCommandLine=constel.csp=qemu OutputDirectory=mkosi.output.qemu + +[Content] +Autologin=yes +Environment=CONSOLE_MOTD=true diff --git a/image/mkosi.postinst b/image/mkosi.postinst index 5e75fb669..f8c802b00 100755 --- a/image/mkosi.postinst +++ b/image/mkosi.postinst @@ -21,6 +21,17 @@ mv /etc/issue.d /usr/lib/issue.d || true rm -f /etc/issue rm -f /etc/issue.net +# add motd for constellation console access +if [[ "${CONSOLE_MOTD:-false}" == "true" ]]; then +cat < /usr/lib/motd.d/10-constellation-console-access.motd +~ Welcome to Constellation! ~ +Usually, on release versions of Constellation running in the cloud, you are not able to login through the serial console. +This shell access is specifically granted for debug images and MiniConstellation to allow users to research the environment Constellation runs in. +Have fun! Feel free to report any issues to GitHub or security@edgeless.systems (for security vulnerabilities only). +EOF +fi + + # update /etc/os-release echo "IMAGE_ID=\"${IMAGE_ID}\"" >> /etc/os-release echo "IMAGE_VERSION=\"${IMAGE_VERSION}\"" >> /etc/os-release diff --git a/image/mkosi.skeleton/usr/lib/tmpfiles.d/constellation.conf b/image/mkosi.skeleton/usr/lib/tmpfiles.d/constellation.conf index 474387816..41024bb0b 100644 --- a/image/mkosi.skeleton/usr/lib/tmpfiles.d/constellation.conf +++ b/image/mkosi.skeleton/usr/lib/tmpfiles.d/constellation.conf @@ -4,5 +4,7 @@ d /var/log/kubernetes/audit/ 0700 0 0 - d /run/state/bin 0755 0 0 - - C /run/issue.d - - - - /usr/lib/issue.d/ C /run/issue - - - - /usr/lib/issue +C /run/motd.d - - - - /usr/lib/motd.d/ +C /run/motd - - - - /usr/lib/motd # merge all CNI binaries in writable folder until containerd can use multiple CNI bins: https://github.com/containerd/containerd/issues/6600 C /opt/cni/bin - - - - /usr/libexec/cni/