Package: openstack-cluster-installer
Version: 42.2.1~bpo11+1

(Using osbpo.debian.net archive on bullseye)

When booting the live image built using
openstack-cluster-installer-build-live-image, agetty fails to autologin
and does not present any login prompt at all.

Checking the service status shows it's trying to autlogin as 'user',
which I believe is the default set by live-build:

root@Not Specified>_ ~ # systemctl status getty@tty1.service
● getty@tty1.service - Getty on tty1
     Loaded: loaded (/lib/systemd/system/getty@.service; enabled; vendor 
preset: enabled)
    Drop-In: /run/systemd/generator/getty@tty1.service.d
             └─live-config_autologin.conf
             /etc/systemd/system/getty@.service.d
             └─root-autologin.conf
     Active: failed (Result: start-limit-hit) since Tue 2023-01-03 14:07:00 
UTC; 2min 39s ago
       Docs: man:agetty(8)
             man:systemd-getty-generator(8)
             http://0pointer.de/blog/projects/serial-console.html
    Process: 4915 ExecStart=/sbin/agetty --autologin user --noclear tty1 $TERM 
(code=exited, status=1/FAILURE)
   Main PID: 4915 (code=exited, status=1/FAILURE)
        CPU: 12ms

Jan 03 14:07:00 debian systemd[1]: getty@tty1.service: Scheduled restart job, 
restart counter is at 183.
Jan 03 14:07:00 debian systemd[1]: Stopped Getty on tty1.
Jan 03 14:07:00 debian systemd[1]: getty@tty1.service: Start request repeated 
too quickly.
Jan 03 14:07:00 debian systemd[1]: getty@tty1.service: Failed with result 
'start-limit-hit'.
Jan 03 14:07:00 debian systemd[1]: Failed to start Getty on tty1.
Jan 03 14:09:40 debian systemd[1]: 
/etc/systemd/system/getty@.service.d/root-autologin.conf:1: Assignment outside 
of section. Ignoring.

The logs above also indicate systemd is unhappy with the format of 
root-autologin.conf

I haven't tested against any versions of Debian except bullseye, however
the attached patch fixes the problem for me and looks correct as per
systemd documentation.

Cheers
Jim
diff --git a/bin/openstack-cluster-installer-build-live-image b/bin/openstack-cluster-installer-build-live-image
index 3d41596a..12987332 100755
--- a/bin/openstack-cluster-installer-build-live-image
+++ b/bin/openstack-cluster-installer-build-live-image
@@ -850,7 +850,7 @@ ln -s ../serial-getty@ttyS0.service config/includes.chroot/etc/systemd/system/ge
 
 # Configure autologin for tty0
 mkdir -p config/includes.chroot/etc/systemd/system/getty@.service.d
-echo "ExecStart=-/sbin/agetty --autologin root --noclear %I \$TERM" >config/includes.chroot/etc/systemd/system/getty@.service.d/root-autologin.conf
+echo "[Service]\nExecStart=\nExecStart=-/sbin/agetty --autologin root --noclear %I \$TERM" >config/includes.chroot/etc/systemd/system/getty@.service.d/root-autologin.conf
 
 # Copy the customization by the user
 if [ -d /etc/openstack-cluster-installer/live-image-additions ] ; then

Reply via email to