diff --git a/image/base/mkosi.skeleton/usr/lib/systemd/system/export_constellation_debug.service b/image/base/mkosi.skeleton/usr/lib/systemd/system/export_constellation_debug.service index 6858dab9b..9b0fccabe 100644 --- a/image/base/mkosi.skeleton/usr/lib/systemd/system/export_constellation_debug.service +++ b/image/base/mkosi.skeleton/usr/lib/systemd/system/export_constellation_debug.service @@ -3,7 +3,7 @@ Description=Export Constellation Debug Level to Environment [Service] Type=oneshot -ExecStart=/bin/bash -c "tr ' ' '\n' < /proc/cmdline | grep -q 'constellation.debug' && echo CONSTELLATION_DEBUG_FLAGS=--debug >> /run/constellation.env" +ExecStart=/bin/bash -c "tr ' ' '\n' < /proc/cmdline | grep -q 'constel.debug' && echo CONSTELLATION_DEBUG_FLAGS=--debug >> /run/constellation.env" RemainAfterExit=yes [Install] diff --git a/image/sysroot-tree/usr/lib/systemd/system-preset/20-constellation-base.preset b/image/sysroot-tree/usr/lib/systemd/system-preset/20-constellation-base.preset index f74d34ec8..b213385af 100644 --- a/image/sysroot-tree/usr/lib/systemd/system-preset/20-constellation-base.preset +++ b/image/sysroot-tree/usr/lib/systemd/system-preset/20-constellation-base.preset @@ -2,7 +2,6 @@ enable systemd-timesyncd.service enable systemd-networkd.service enable systemd-networkd-wait-online.service enable configure-constel-csp.service -enable serial-getty@tty0.service enable dbus.service enable dbus-broker.service enable dbus-daemon.service diff --git a/image/sysroot-tree/usr/lib/systemd/system/getty@tty1.service.d/autologin.conf b/image/sysroot-tree/usr/lib/systemd/system/getty@tty1.service.d/autologin.conf new file mode 100644 index 000000000..ec52d1369 --- /dev/null +++ b/image/sysroot-tree/usr/lib/systemd/system/getty@tty1.service.d/autologin.conf @@ -0,0 +1,11 @@ +[Unit] +Description=autologin +ConditionPathExists=/proc/cmdline +ConditionKernelCommandLine=|constel.console +ConditionKernelCommandLine=|constel.debug + +[Service] +ExecStart= +ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin root %I $TERM +[Install] +WantedBy=multi-user.target diff --git a/image/sysroot-tree/usr/lib/systemd/system/serial-getty@ttyS0.service.d/autologin.conf b/image/sysroot-tree/usr/lib/systemd/system/serial-getty@ttyS0.service.d/autologin.conf index 77db15a0a..24fe28a99 100644 --- a/image/sysroot-tree/usr/lib/systemd/system/serial-getty@ttyS0.service.d/autologin.conf +++ b/image/sysroot-tree/usr/lib/systemd/system/serial-getty@ttyS0.service.d/autologin.conf @@ -1,8 +1,8 @@ [Unit] Description=autologin ConditionPathExists=/proc/cmdline -ConditionKernelCommandLine=|constellation.console -ConditionKernelCommandLine=|constellation.debug +ConditionKernelCommandLine=|constel.console +ConditionKernelCommandLine=|constel.debug [Service] ExecStart= diff --git a/image/system/variants.bzl b/image/system/variants.bzl index 4b9044383..b9b1c6bd8 100644 --- a/image/system/variants.bzl +++ b/image/system/variants.bzl @@ -50,7 +50,7 @@ CSPS = [ "qemu", ] -base_cmdline = "selinux=1 enforcing=0 audit=0" +base_cmdline = "selinux=1 enforcing=0 audit=0 console=tty1 console=ttyS0" csp_settings = { "aws": { @@ -62,20 +62,17 @@ csp_settings = { }, "azure": { "kernel_command_line_dict": { - "console": "ttyS0", "constel.csp": "azure", "mitigations": "auto,nosmt", }, }, "gcp": { "kernel_command_line_dict": { - "console": "ttyS0", "constel.csp": "gcp", "mitigations": "auto,nosmt", }, }, "openstack": { - "kernel_command_line": "console=tty0 console=ttyS0 console=ttyS1", "kernel_command_line_dict": { "constel.csp": "openstack", "kvm_amd.sev": "1", @@ -85,9 +82,8 @@ csp_settings = { }, }, "qemu": { - "kernel_command_line": "constellation.console", # All qemu images have console enabled independent of stream + "kernel_command_line": "constel.console", # All qemu images have console enabled independent of stream "kernel_command_line_dict": { - "console": "ttyS0", "constel.csp": "qemu", "mitigations": "auto,nosmt", }, @@ -135,10 +131,10 @@ attestation_variant_settings = { stream_settings = { "console": { - "kernel_command_line": "constellation.console", + "kernel_command_line": "constel.console", }, "debug": { - "kernel_command_line": "constellation.debug", + "kernel_command_line": "constel.debug", }, "nightly": {}, "stable": {},