build icon indicating copy to clipboard operation
build copied to clipboard

[Bug]: Race condition in armbian-firstlogin

Open schavkin opened this issue 3 weeks ago • 3 comments

What happened?

armbian-firstlogin sometimes stucks without creating PRESET_USER_NAME due to ps|awk|kill race between multiple root sessions

How to reproduce?

I'm using BTT Pi board with the latest trixie minimal image Armbian_25.11.1_Bigtreetech-cb1_trixie_current_6.12.58_minimal.img

/root/.not_logged_in_yet

#/root/.not_logged_in_yet
#PRESET_CONFIGURATION="http://path/to/config/file"
# Network Settings
PRESET_NET_CHANGE_DEFAULTS="1"
## Ethernet
PRESET_NET_ETHERNET_ENABLED="1"     #   Ignored due to WiFi
## WiFi
PRESET_NET_WIFI_ENABLED="1"
PRESET_NET_WIFI_SSID="Cisco_1234"
PRESET_NET_WIFI_KEY="12345678"
PRESET_NET_WIFI_COUNTRYCODE="SK"
PRESET_CONNECT_WIRELESS="n"
## Static IP
PRESET_NET_USE_STATIC="0"
#PRESET_NET_STATIC_IP="192.168.1.100"
#PRESET_NET_STATIC_MASK="255.255.255.0"
#PRESET_NET_STATIC_GATEWAY="192.168.1.1"
#PRESET_NET_STATIC_DNS="192.168.1.1"
 
# System
SET_LANG_BASED_ON_LOCATION="y"
PRESET_LOCALE="en_US.UTF-8"
PRESET_TIMEZONE="Etc/UTC"
 
# Root
PRESET_ROOT_PASSWORD="1"
PRESET_ROOT_KEY=""
 
# User
PRESET_USER_NAME="armbian"
PRESET_USER_PASSWORD="1"
PRESET_USER_KEY=""
PRESET_DEFAULT_REALNAME="Armbian user"
PRESET_USER_SHELL="bash"

Branch

main (main development branch)

On which host OS are you running the build script and observing this problem?

Debian 13 Trixie

Are you building on Windows WSL2?

  • [ ] Yes, my Ubuntu/Debian/OtherOS is running on WSL2

Relevant log URL

No response

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

schavkin avatar Dec 05 '25 21:12 schavkin

Jira ticket: AR-2794

github-actions[bot] avatar Dec 05 '25 21:12 github-actions[bot]

Maybe we should use flock binary from util-linux package to prevent these race conditions?

@schavkin Can you point to the racing executions?

leggewie avatar Dec 05 '25 23:12 leggewie

I saved log for two cases: Successful case:

2025-11-22T14:36:58+01:00 bigtreetech-cb1 systemd[1]: Startup finished in 5.032s (kernel) + 12.018s (userspace) = 17.050s.
2025-11-22T14:36:59+01:00 bigtreetech-cb1 login[1261]: pam_unix(login:session): session opened for user root(uid=0) by root(uid=0)
2025-11-22T14:36:59+01:00 bigtreetech-cb1 systemd[1]: Created slice user-0.slice - User Slice of UID 0.
2025-11-22T14:36:59+01:00 bigtreetech-cb1 systemd[1]: Starting [email protected] - User Runtime Directory /run/user/0...
2025-11-22T14:36:59+01:00 bigtreetech-cb1 login[1244]: pam_unix(login:session): session opened for user root(uid=0) by root(uid=0)
2025-11-22T14:36:59+01:00 bigtreetech-cb1 systemd-logind[1101]: New session 3 of user root.
2025-11-22T14:36:59+01:00 bigtreetech-cb1 systemd-logind[1101]: New session 4 of user root.
2025-11-22T14:36:59+01:00 bigtreetech-cb1 systemd[1]: Finished [email protected] - User Runtime Directory /run/user/0.
2025-11-22T14:36:59+01:00 bigtreetech-cb1 systemd[1]: Starting [email protected] - User Manager for UID 0...
2025-11-22T14:36:59+01:00 bigtreetech-cb1 (systemd)[1493]: pam_unix(systemd-user:session): session opened for user root(uid=0) by root(uid=0)
2025-11-22T14:36:59+01:00 bigtreetech-cb1 systemd-logind[1101]: New session 5 of user root.
2025-11-22T14:37:00+01:00 bigtreetech-cb1 systemd[1]: systemd-rfkill.service: Deactivated successfully.
2025-11-22T14:37:00+01:00 bigtreetech-cb1 systemd[1493]: Queued start job for default target default.target.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1493]: Created slice app.slice - User Application Slice.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1493]: Reached target paths.target - Paths.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1493]: Reached target timers.target - Timers.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1493]: Starting dbus.socket - D-Bus User Message Bus Socket...
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1493]: Listening on keyboxd.socket - GnuPG public key management service.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1493]: Starting ssh-agent.socket - OpenSSH Agent socket...
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1493]: Listening on dbus.socket - D-Bus User Message Bus Socket.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1493]: Listening on ssh-agent.socket - OpenSSH Agent socket.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1493]: Reached target sockets.target - Sockets.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1493]: Reached target basic.target - Basic System.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1493]: Reached target default.target - Main User Target.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1]: Started [email protected] - User Manager for UID 0.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1493]: Startup finished in 1.138s.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1]: Started session-3.scope - Session 3 of User root.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1]: Started session-4.scope - Session 4 of User root.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 login[1261]: ROOT LOGIN ON tty1
2025-11-22T14:37:01+01:00 bigtreetech-cb1 login[1244]: DIALUP AT ttyS0 BY root
2025-11-22T14:37:01+01:00 bigtreetech-cb1 login[1244]: ROOT LOGIN ON ttyS0
2025-11-22T14:37:04+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 1698 ('systemctl') (unit session-4.scope)...
2025-11-22T14:37:04+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-11-22T14:37:05+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 1099 ms.
2025-11-22T14:37:05+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 1697 ('systemctl') (unit session-3.scope)...
2025-11-22T14:37:05+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-11-22T14:37:06+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 917 ms.
2025-11-22T14:37:07+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 1812 ('systemctl') (unit armbian-firstrun.service)...
2025-11-22T14:37:07+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-11-22T14:37:07+01:00 bigtreetech-cb1 systemd-udevd[253]: /usr/lib/udev/rules.d/90-alsa-restore.rules:18 GOTO="alsa_restore_std" has no matching label, ignoring.
2025-11-22T14:37:07+01:00 bigtreetech-cb1 systemd-udevd[253]: /usr/lib/udev/rules.d/90-alsa-restore.rules:18 The line has no effect any more, dropping.
2025-11-22T14:37:07+01:00 bigtreetech-cb1 systemd-udevd[253]: /usr/lib/udev/rules.d/90-alsa-restore.rules:22 GOTO="alsa_restore_std" has no matching label, ignoring.
2025-11-22T14:37:07+01:00 bigtreetech-cb1 systemd-udevd[253]: /usr/lib/udev/rules.d/90-alsa-restore.rules:22 The line has no effect any more, dropping.
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 1098 ms.
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd[1]: Starting netplan-regdom.service - Netplan regulatory-domain configuration...
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd-networkd[261]: end0: Reconfiguring with /run/systemd/network/10-netplan-all-eth-interfaces.network.
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd-networkd[261]: wlan1: Found matching .network file, based on potentially unpredictable interface name: /run/systemd/network/10-netplan-wlan1.network
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd-networkd[261]: wlan1: Configuring with /run/systemd/network/10-netplan-wlan1.network.
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd[1]: netplan-regdom.service: Deactivated successfully.
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd[1]: Finished netplan-regdom.service - Netplan regulatory-domain configuration.
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd-networkd[261]: wlan1: Link UP
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd-networkd[261]: wlan1: Found matching .network file, based on potentially unpredictable interface name: /run/systemd/network/10-netplan-wlan1.network
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd-networkd[261]: end0: Reconfiguring with /run/systemd/network/10-netplan-all-eth-interfaces.network.
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd-networkd[261]: wlan1: Found matching .network file, based on potentially unpredictable interface name: /run/systemd/network/10-netplan-wlan1.network
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd-networkd[261]: wlan1: Reconfiguring with /run/systemd/network/10-netplan-wlan1.network.
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd[1]: netplan-ovs-cleanup.service - OpenVSwitch configuration for cleanup was skipped because of an unmet condition check (ConditionFileIsExecutable=/usr/bin/ovs-vsctl).
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd-networkd[261]: wlan1: Found matching .network file, based on potentially unpredictable interface name: /run/systemd/network/10-netplan-wlan1.network
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd-networkd[261]: wlan1: Reconfiguring with /run/systemd/network/10-netplan-wlan1.network.
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd-networkd[261]: end0: Reconfiguring with /run/systemd/network/10-netplan-all-eth-interfaces.network.
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd[1]: Started netplan-wpa-wlan1.service - WPA supplicant for netplan wlan1.
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd[1]: netplan-ovs-cleanup.service - OpenVSwitch configuration for cleanup was skipped because of an unmet condition check (ConditionFileIsExecutable=/usr/bin/ovs-vsctl).
2025-11-22T14:37:09+01:00 bigtreetech-cb1 wpa_supplicant[1886]: Successfully initialized wpa_supplicant
2025-11-22T14:37:10+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 1893 ('systemctl') (unit session-4.scope)...
2025-11-22T14:37:10+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-11-22T14:37:11+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 1059 ms.
2025-11-22T14:37:11+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 1896 ('systemctl') (unit session-3.scope)...
2025-11-22T14:37:11+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-11-22T14:37:11+01:00 bigtreetech-cb1 wpa_supplicant[1886]: wlan1: Trying to associate with 14:eb:b6:6d:d8:f4 (SSID='TP-Link_D8F4' freq=2422 MHz)
2025-11-22T14:37:11+01:00 bigtreetech-cb1 systemd-networkd[261]: wlan1: Connected WiFi access point: TP-Link_D8F4 (14:eb:b6:6d:d8:f4)
2025-11-22T14:37:11+01:00 bigtreetech-cb1 wpa_supplicant[1886]: wlan1: Associated with 14:eb:b6:6d:d8:f4
2025-11-22T14:37:11+01:00 bigtreetech-cb1 wpa_supplicant[1886]: wlan1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
2025-11-22T14:37:11+01:00 bigtreetech-cb1 wpa_supplicant[1886]: wlan1: WPA: Key negotiation completed with 14:eb:b6:6d:d8:f4 [PTK=CCMP GTK=CCMP]
2025-11-22T14:37:11+01:00 bigtreetech-cb1 wpa_supplicant[1886]: wlan1: CTRL-EVENT-CONNECTED - Connection to 14:eb:b6:6d:d8:f4 completed [id=0 id_str=]
2025-11-22T14:37:11+01:00 bigtreetech-cb1 systemd-networkd[261]: wlan1: Gained carrier
2025-11-22T14:37:11+01:00 bigtreetech-cb1 systemd-networkd[261]: wlan1: Found matching .network file, based on potentially unpredictable interface name: /run/systemd/network/10-netplan-wlan1.network
2025-11-22T14:37:12+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 1041 ms.
2025-11-22T14:37:12+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 1912 ('systemctl') (unit armbian-firstrun.service)...
2025-11-22T14:37:12+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-11-22T14:37:13+01:00 bigtreetech-cb1 systemd-networkd[261]: wlan1: DHCPv4 address 192.168.1.102/24, gateway 192.168.1.1 acquired from 192.168.1.1
2025-11-22T14:37:13+01:00 bigtreetech-cb1 systemd-timesyncd[246]: Network configuration changed, trying to establish connection.
2025-12-07T13:20:16+01:00 bigtreetech-cb1 systemd-resolved[245]: Clock change detected. Flushing caches.
2025-12-07T13:20:16+01:00 bigtreetech-cb1 systemd-timesyncd[246]: Contacted time server 84.245.104.80:123 (2.debian.pool.ntp.org).
2025-12-07T13:20:16+01:00 bigtreetech-cb1 systemd-timesyncd[246]: Initial clock synchronization to Sun 2025-12-07 12:20:16.296894 UTC.
2025-12-07T13:20:16+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 1069 ms.
2025-12-07T13:20:16+01:00 bigtreetech-cb1 systemd[1]: Starting apt-daily-upgrade.service - Daily apt upgrade and clean activities...
2025-12-07T13:20:16+01:00 bigtreetech-cb1 systemd[1]: Starting dpkg-db-backup.service - Daily dpkg database backup service...
2025-12-07T13:20:16+01:00 bigtreetech-cb1 systemd[1]: Starting fake-hwclock-save.service - Save the current clock...
2025-12-07T13:20:16+01:00 bigtreetech-cb1 systemd-networkd[261]: wlan1: Gained IPv6LL
2025-12-07T13:20:16+01:00 bigtreetech-cb1 systemd[1]: fake-hwclock-save.service: Deactivated successfully.
2025-12-07T13:20:16+01:00 bigtreetech-cb1 systemd[1]: Finished fake-hwclock-save.service - Save the current clock.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd[1]: Stopping ssh.service - OpenBSD Secure Shell server...
2025-12-07T13:20:17+01:00 bigtreetech-cb1 sshd[1246]: Received signal 15; terminating.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd[1]: ssh.service: Deactivated successfully.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd[1]: Stopped ssh.service - OpenBSD Secure Shell server.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd[1]: sshd-keygen.service - Generate sshd host keys on first boot was skipped because of an unmet condition check (ConditionFirstBoot=yes).
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd[1]: dpkg-db-backup.service: Deactivated successfully.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd[1]: Finished dpkg-db-backup.service - Daily dpkg database backup service.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 sshd[2105]: Server listening on 0.0.0.0 port 22.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 sshd[2105]: Server listening on :: port 22.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 login[1261]: pam_unix(login:session): session closed for user root
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd[1]: [email protected]: Deactivated successfully.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd[1]: session-3.scope: Deactivated successfully.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd[1]: session-3.scope: Consumed 3.866s CPU time, 23.8M memory peak.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd-logind[1101]: Session 3 logged out. Waiting for processes to exit.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd[1]: [email protected]: Scheduled restart job, restart counter is at 1.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd[1]: Started [email protected] - Getty on tty1.
2025-12-07T13:20:17+01:00 bigtreetech-cb1 systemd-logind[1101]: Removed session 3.
2025-12-07T13:20:18+01:00 bigtreetech-cb1 passwd[2151]: pam_unix(passwd:chauthtok): password changed for root
2025-12-07T13:20:18+01:00 bigtreetech-cb1 chsh[2167]: changed user 'root' shell to '/usr/bin/bash'
2025-12-07T13:20:19+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 2187 ('systemctl') (unit armbian-firstrun.service)...
2025-12-07T13:20:19+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-12-07T13:20:19+01:00 bigtreetech-cb1 adduser[2185]: Adding user `armbian' ...
2025-12-07T13:20:19+01:00 bigtreetech-cb1 adduser[2185]: Selecting UID/GID from range 1000 to 59999 ...
2025-12-07T13:20:19+01:00 bigtreetech-cb1 adduser[2185]: Adding new group `armbian' (1000) ...
2025-12-07T13:20:19+01:00 bigtreetech-cb1 groupadd[2193]: group added to /etc/group: name=armbian, GID=1000
2025-12-07T13:20:19+01:00 bigtreetech-cb1 groupadd[2193]: group added to /etc/gshadow: name=armbian
2025-12-07T13:20:19+01:00 bigtreetech-cb1 groupadd[2193]: new group: name=armbian, GID=1000
2025-12-07T13:20:19+01:00 bigtreetech-cb1 adduser[2185]: Adding new user `armbian' (1000) with group `armbian (1000)' ...
2025-12-07T13:20:19+01:00 bigtreetech-cb1 useradd[2224]: new user: name=armbian, UID=1000, GID=1000, home=/home/armbian, shell=/bin/bash, from=/dev/ttyS0
2025-12-07T13:20:19+01:00 bigtreetech-cb1 adduser[2185]: Creating home directory `/home/armbian' ...
2025-12-07T13:20:19+01:00 bigtreetech-cb1 adduser[2185]: Copying files from `/etc/skel' ...
2025-12-07T13:20:19+01:00 bigtreetech-cb1 adduser[2185]: Adding new user `armbian' to supplemental / extra groups `users' ...
2025-12-07T13:20:19+01:00 bigtreetech-cb1 adduser[2185]: Adding user `armbian' to group `users' ...
2025-12-07T13:20:20+01:00 bigtreetech-cb1 gpasswd[2242]: members of group users set by root to armbian
2025-12-07T13:20:20+01:00 bigtreetech-cb1 passwd[2250]: pam_unix(passwd:chauthtok): password changed for armbian
2025-12-07T13:20:20+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 1137 ms.
2025-12-07T13:20:20+01:00 bigtreetech-cb1 addgroup[2255]: Selecting GID from range 100 to 999 ...
2025-12-07T13:20:20+01:00 bigtreetech-cb1 addgroup[2255]: Adding group `docker' (GID 103) ...
2025-12-07T13:20:20+01:00 bigtreetech-cb1 groupadd[2264]: group added to /etc/group: name=docker, GID=103
2025-12-07T13:20:20+01:00 bigtreetech-cb1 groupadd[2264]: group added to /etc/gshadow: name=docker
2025-12-07T13:20:20+01:00 bigtreetech-cb1 groupadd[2264]: new group: name=docker, GID=103
2025-12-07T13:20:20+01:00 bigtreetech-cb1 usermod[2268]: add 'armbian' to group 'sudo'
2025-12-07T13:20:20+01:00 bigtreetech-cb1 usermod[2268]: add 'armbian' to shadow group 'sudo'
2025-12-07T13:20:21+01:00 bigtreetech-cb1 usermod[2273]: add 'armbian' to group 'netdev'
2025-12-07T13:20:21+01:00 bigtreetech-cb1 usermod[2273]: add 'armbian' to shadow group 'netdev'
2025-12-07T13:20:21+01:00 bigtreetech-cb1 usermod[2279]: add 'armbian' to group 'audio'
2025-12-07T13:20:21+01:00 bigtreetech-cb1 usermod[2279]: add 'armbian' to shadow group 'audio'
2025-12-07T13:20:21+01:00 bigtreetech-cb1 usermod[2284]: add 'armbian' to group 'video'
2025-12-07T13:20:21+01:00 bigtreetech-cb1 usermod[2284]: add 'armbian' to shadow group 'video'
2025-12-07T13:20:21+01:00 bigtreetech-cb1 usermod[2290]: add 'armbian' to group 'disk'
2025-12-07T13:20:21+01:00 bigtreetech-cb1 usermod[2290]: add 'armbian' to shadow group 'disk'
2025-12-07T13:20:21+01:00 bigtreetech-cb1 usermod[2295]: add 'armbian' to group 'tty'
2025-12-07T13:20:21+01:00 bigtreetech-cb1 usermod[2295]: add 'armbian' to shadow group 'tty'
2025-12-07T13:20:21+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 2304 ('systemctl') (unit armbian-firstrun.service)...
2025-12-07T13:20:21+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-12-07T13:20:21+01:00 bigtreetech-cb1 usermod[2303]: add 'armbian' to group 'games'
2025-12-07T13:20:21+01:00 bigtreetech-cb1 usermod[2303]: add 'armbian' to shadow group 'games'
2025-12-07T13:20:22+01:00 bigtreetech-cb1 usermod[2311]: add 'armbian' to group 'dialout'
2025-12-07T13:20:22+01:00 bigtreetech-cb1 usermod[2311]: add 'armbian' to shadow group 'dialout'
2025-12-07T13:20:22+01:00 bigtreetech-cb1 usermod[2344]: add 'armbian' to group 'plugdev'
2025-12-07T13:20:22+01:00 bigtreetech-cb1 usermod[2344]: add 'armbian' to shadow group 'plugdev'
2025-12-07T13:20:22+01:00 bigtreetech-cb1 usermod[2349]: add 'armbian' to group 'input'
2025-12-07T13:20:22+01:00 bigtreetech-cb1 usermod[2349]: add 'armbian' to shadow group 'input'
2025-12-07T13:20:22+01:00 bigtreetech-cb1 CRON[1102]: pam_unix(cron:session): session closed for user root
2025-12-07T13:20:22+01:00 bigtreetech-cb1 usermod[2370]: add 'armbian' to group 'systemd-journal'
2025-12-07T13:20:22+01:00 bigtreetech-cb1 usermod[2370]: add 'armbian' to shadow group 'systemd-journal'
2025-12-07T13:20:22+01:00 bigtreetech-cb1 usermod[2376]: add 'armbian' to group 'render'
2025-12-07T13:20:22+01:00 bigtreetech-cb1 usermod[2376]: add 'armbian' to shadow group 'render'
2025-12-07T13:20:22+01:00 bigtreetech-cb1 usermod[2381]: add 'armbian' to group 'docker'
2025-12-07T13:20:22+01:00 bigtreetech-cb1 usermod[2381]: add 'armbian' to shadow group 'docker'
2025-12-07T13:20:22+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 1060 ms.
2025-12-07T13:20:23+01:00 bigtreetech-cb1 systemd[1]: sshd-keygen.service - Generate sshd host keys on first boot was skipped because of an unmet condition check (ConditionFirstBoot=yes).
2025-12-07T13:20:23+01:00 bigtreetech-cb1 sshd[2105]: Received signal 15; terminating.
2025-12-07T13:20:23+01:00 bigtreetech-cb1 systemd[1]: Stopping ssh.service - OpenBSD Secure Shell server...
2025-12-07T13:20:23+01:00 bigtreetech-cb1 systemd[1]: ssh.service: Deactivated successfully.
2025-12-07T13:20:23+01:00 bigtreetech-cb1 systemd[1]: Stopped ssh.service - OpenBSD Secure Shell server.
2025-12-07T13:20:23+01:00 bigtreetech-cb1 systemd[1]: sshd-keygen.service - Generate sshd host keys on first boot was skipped because of an unmet condition check (ConditionFirstBoot=yes).
2025-12-07T13:20:23+01:00 bigtreetech-cb1 systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
2025-12-07T13:20:23+01:00 bigtreetech-cb1 sshd[2416]: Server listening on 0.0.0.0 port 22.
2025-12-07T13:20:23+01:00 bigtreetech-cb1 sshd[2416]: Server listening on :: port 22.
2025-12-07T13:20:23+01:00 bigtreetech-cb1 systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
2025-12-07T13:20:23+01:00 bigtreetech-cb1 systemctl[2424]: Removed '/etc/systemd/system/multi-user.target.wants/armbian-firstrun.service'.
2025-12-07T13:20:23+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 2424 ('systemctl') (unit armbian-firstrun.service)...
2025-12-07T13:20:23+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-12-07T13:20:24+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 862 ms.
2025-12-07T13:20:24+01:00 bigtreetech-cb1 systemd[1]: Starting e2scrub_all.service - Online ext4 Metadata Check for All Filesystems...
2025-12-07T13:20:24+01:00 bigtreetech-cb1 systemd[1]: e2scrub_all.service: Deactivated successfully.
2025-12-07T13:20:24+01:00 bigtreetech-cb1 systemd[1]: Finished e2scrub_all.service - Online ext4 Metadata Check for All Filesystems.
2025-12-07T13:20:27+01:00 bigtreetech-cb1 dbus-daemon[1097]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service' requested by ':1.18' (uid=0 pid=2485 comm="timedatectl set-timezone Etc/UTC")
2025-12-07T13:20:27+01:00 bigtreetech-cb1 systemd[1]: Starting systemd-timedated.service - Time & Date Service...
2025-12-07T13:20:27+01:00 bigtreetech-cb1 systemd[1]: Started systemd-timedated.service - Time & Date Service.
2025-12-07T13:20:27+01:00 bigtreetech-cb1 dbus-daemon[1097]: [system] Successfully activated service 'org.freedesktop.timedate1'
2025-12-07T13:20:47+01:00 bigtreetech-cb1 systemd-networkd-wait-online[2056]: Timeout occurred while waiting for network connectivity.
2025-12-07T13:20:47+01:00 bigtreetech-cb1 apt-helper[2021]: E: Sub-process /lib/systemd/systemd-networkd-wait-online returned an error code (1)
2025-12-07T13:20:47+01:00 bigtreetech-cb1 systemd[1]: apt-daily-upgrade.service: Deactivated successfully.
2025-12-07T13:20:47+01:00 bigtreetech-cb1 systemd[1]: Finished apt-daily-upgrade.service - Daily apt upgrade and clean activities.
2025-12-07T13:20:52+01:00 bigtreetech-cb1 systemd[1]: Received SIGINT.

and unsuccessful case:

2025-11-22T14:36:59+01:00 bigtreetech-cb1 systemd[1]: Startup finished in 5.030s (kernel) + 12.149s (userspace) = 17.180s.
2025-11-22T14:36:59+01:00 bigtreetech-cb1 login[1265]: pam_unix(login:session): session opened for user root(uid=0) by root(uid=0)
2025-11-22T14:36:59+01:00 bigtreetech-cb1 systemd[1]: Created slice user-0.slice - User Slice of UID 0.
2025-11-22T14:36:59+01:00 bigtreetech-cb1 systemd[1]: Starting [email protected] - User Runtime Directory /run/user/0...
2025-11-22T14:36:59+01:00 bigtreetech-cb1 login[1248]: pam_unix(login:session): session opened for user root(uid=0) by root(uid=0)
2025-11-22T14:36:59+01:00 bigtreetech-cb1 systemd-logind[1107]: New session 3 of user root.
2025-11-22T14:36:59+01:00 bigtreetech-cb1 systemd-logind[1107]: New session 4 of user root.
2025-11-22T14:37:00+01:00 bigtreetech-cb1 systemd[1]: Finished [email protected] - User Runtime Directory /run/user/0.
2025-11-22T14:37:00+01:00 bigtreetech-cb1 systemd[1]: Starting [email protected] - User Manager for UID 0...
2025-11-22T14:37:00+01:00 bigtreetech-cb1 (systemd)[1495]: pam_unix(systemd-user:session): session opened for user root(uid=0) by root(uid=0)
2025-11-22T14:37:00+01:00 bigtreetech-cb1 systemd-logind[1107]: New session 5 of user root.
2025-11-22T14:37:00+01:00 bigtreetech-cb1 systemd[1]: systemd-rfkill.service: Deactivated successfully.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1495]: Queued start job for default target default.target.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1495]: Created slice app.slice - User Application Slice.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1495]: Reached target paths.target - Paths.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1495]: Reached target timers.target - Timers.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1495]: Starting dbus.socket - D-Bus User Message Bus Socket...
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1495]: Listening on keyboxd.socket - GnuPG public key management service.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1495]: Starting ssh-agent.socket - OpenSSH Agent socket...
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1495]: Listening on ssh-agent.socket - OpenSSH Agent socket.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1495]: Listening on dbus.socket - D-Bus User Message Bus Socket.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1495]: Reached target sockets.target - Sockets.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1495]: Reached target basic.target - Basic System.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1495]: Reached target default.target - Main User Target.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1495]: Startup finished in 1.156s.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1]: Started [email protected] - User Manager for UID 0.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1]: Started session-3.scope - Session 3 of User root.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 systemd[1]: Started session-4.scope - Session 4 of User root.
2025-11-22T14:37:01+01:00 bigtreetech-cb1 login[1265]: ROOT LOGIN ON tty1
2025-11-22T14:37:01+01:00 bigtreetech-cb1 login[1248]: DIALUP AT ttyS0 BY root
2025-11-22T14:37:01+01:00 bigtreetech-cb1 login[1248]: ROOT LOGIN ON ttyS0
2025-11-22T14:37:04+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 1701 ('systemctl') (unit session-4.scope)...
2025-11-22T14:37:04+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-11-22T14:37:05+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 1155 ms.
2025-11-22T14:37:05+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 1702 ('systemctl') (unit session-3.scope)...
2025-11-22T14:37:05+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-11-22T14:37:06+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 933 ms.
2025-11-22T14:37:07+01:00 bigtreetech-cb1 systemd-udevd[253]: /usr/lib/udev/rules.d/90-alsa-restore.rules:18 GOTO="alsa_restore_std" has no matching label, ignoring.
2025-11-22T14:37:07+01:00 bigtreetech-cb1 systemd-udevd[253]: /usr/lib/udev/rules.d/90-alsa-restore.rules:18 The line has no effect any more, dropping.
2025-11-22T14:37:07+01:00 bigtreetech-cb1 systemd-udevd[253]: /usr/lib/udev/rules.d/90-alsa-restore.rules:22 GOTO="alsa_restore_std" has no matching label, ignoring.
2025-11-22T14:37:07+01:00 bigtreetech-cb1 systemd-udevd[253]: /usr/lib/udev/rules.d/90-alsa-restore.rules:22 The line has no effect any more, dropping.
2025-11-22T14:37:07+01:00 bigtreetech-cb1 systemd[1]: Starting netplan-regdom.service - Netplan regulatory-domain configuration...
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd-networkd[260]: end0: Reconfiguring with /run/systemd/network/10-netplan-all-eth-interfaces.network.
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd-networkd[260]: wlan1: Found matching .network file, based on potentially unpredictable interface name: /run/systemd/network/10-netplan-wlan1.network
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd-networkd[260]: wlan1: Configuring with /run/systemd/network/10-netplan-wlan1.network.
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd[1]: netplan-regdom.service: Deactivated successfully.
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd[1]: Finished netplan-regdom.service - Netplan regulatory-domain configuration.
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 1840 ('systemctl') (unit armbian-firstrun.service)...
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd-networkd[260]: wlan1: Link UP
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd-networkd[260]: wlan1: Found matching .network file, based on potentially unpredictable interface name: /run/systemd/network/10-netplan-wlan1.network
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd-networkd[260]: end0: Reconfiguring with /run/systemd/network/10-netplan-all-eth-interfaces.network.
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd-networkd[260]: wlan1: Found matching .network file, based on potentially unpredictable interface name: /run/systemd/network/10-netplan-wlan1.network
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd-networkd[260]: wlan1: Reconfiguring with /run/systemd/network/10-netplan-wlan1.network.
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd-networkd[260]: end0: Reconfiguring with /run/systemd/network/10-netplan-all-eth-interfaces.network.
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd-networkd[260]: wlan1: Found matching .network file, based on potentially unpredictable interface name: /run/systemd/network/10-netplan-wlan1.network
2025-11-22T14:37:08+01:00 bigtreetech-cb1 systemd-networkd[260]: wlan1: Reconfiguring with /run/systemd/network/10-netplan-wlan1.network.
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 1120 ms.
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd[1]: netplan-ovs-cleanup.service - OpenVSwitch configuration for cleanup was skipped because of an unmet condition check (ConditionFileIsExecutable=/usr/bin/ovs-vsctl).
2025-11-22T14:37:09+01:00 bigtreetech-cb1 systemd[1]: Started netplan-wpa-wlan1.service - WPA supplicant for netplan wlan1.
2025-11-22T14:37:10+01:00 bigtreetech-cb1 wpa_supplicant[1891]: Successfully initialized wpa_supplicant
2025-11-22T14:37:10+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 1895 ('systemctl') (unit session-4.scope)...
2025-11-22T14:37:10+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-11-22T14:37:11+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 1132 ms.
2025-11-22T14:37:11+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 1898 ('systemctl') (unit session-3.scope)...
2025-11-22T14:37:11+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-11-22T14:37:11+01:00 bigtreetech-cb1 wpa_supplicant[1891]: wlan1: Trying to associate with 14:eb:b6:6d:d8:f4 (SSID='TP-Link_D8F4' freq=2422 MHz)
2025-11-22T14:37:12+01:00 bigtreetech-cb1 systemd-networkd[260]: wlan1: Connected WiFi access point: TP-Link_D8F4 (14:eb:b6:6d:d8:f4)
2025-11-22T14:37:12+01:00 bigtreetech-cb1 wpa_supplicant[1891]: wlan1: Associated with 14:eb:b6:6d:d8:f4
2025-11-22T14:37:12+01:00 bigtreetech-cb1 wpa_supplicant[1891]: wlan1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
2025-11-22T14:37:12+01:00 bigtreetech-cb1 wpa_supplicant[1891]: wlan1: WPA: Key negotiation completed with 14:eb:b6:6d:d8:f4 [PTK=CCMP GTK=CCMP]
2025-11-22T14:37:12+01:00 bigtreetech-cb1 wpa_supplicant[1891]: wlan1: CTRL-EVENT-CONNECTED - Connection to 14:eb:b6:6d:d8:f4 completed [id=0 id_str=]
2025-11-22T14:37:12+01:00 bigtreetech-cb1 systemd-networkd[260]: wlan1: Gained carrier
2025-11-22T14:37:12+01:00 bigtreetech-cb1 systemd-networkd[260]: wlan1: Found matching .network file, based on potentially unpredictable interface name: /run/systemd/network/10-netplan-wlan1.network
2025-11-22T14:37:12+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 1091 ms.
2025-11-22T14:37:13+01:00 bigtreetech-cb1 systemd-networkd[260]: wlan1: DHCPv4 address 192.168.1.102/24, gateway 192.168.1.1 acquired from 192.168.1.1
2025-11-22T14:37:13+01:00 bigtreetech-cb1 systemd-timesyncd[246]: Network configuration changed, trying to establish connection.
2025-12-07T13:09:47+01:00 bigtreetech-cb1 systemd-resolved[245]: Clock change detected. Flushing caches.
2025-12-07T13:09:47+01:00 bigtreetech-cb1 systemd-timesyncd[246]: Contacted time server 185.144.96.105:123 (2.debian.pool.ntp.org).
2025-12-07T13:09:47+01:00 bigtreetech-cb1 systemd-timesyncd[246]: Initial clock synchronization to Sun 2025-12-07 12:09:47.970005 UTC.
2025-12-07T13:09:47+01:00 bigtreetech-cb1 systemd[1]: Starting dpkg-db-backup.service - Daily dpkg database backup service...
2025-12-07T13:09:48+01:00 bigtreetech-cb1 systemd[1]: Starting fake-hwclock-save.service - Save the current clock...
2025-12-07T13:09:48+01:00 bigtreetech-cb1 systemd[1]: fake-hwclock-save.service: Deactivated successfully.
2025-12-07T13:09:48+01:00 bigtreetech-cb1 systemd[1]: Finished fake-hwclock-save.service - Save the current clock.
2025-12-07T13:09:48+01:00 bigtreetech-cb1 systemd-networkd[260]: wlan1: Gained IPv6LL
2025-12-07T13:09:48+01:00 bigtreetech-cb1 systemd[1]: dpkg-db-backup.service: Deactivated successfully.
2025-12-07T13:09:48+01:00 bigtreetech-cb1 systemd[1]: Finished dpkg-db-backup.service - Daily dpkg database backup service.
2025-12-07T13:09:48+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 2074 ('systemctl') (unit armbian-firstrun.service)...
2025-12-07T13:09:48+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-12-07T13:09:49+01:00 bigtreetech-cb1 login[1248]: pam_unix(login:session): session closed for user root
2025-12-07T13:09:49+01:00 bigtreetech-cb1 login[1265]: pam_unix(login:session): session closed for user root
2025-12-07T13:09:49+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 1136 ms.
2025-12-07T13:09:49+01:00 bigtreetech-cb1 systemd[1]: [email protected]: Deactivated successfully.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: [email protected]: Deactivated successfully.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: session-4.scope: Deactivated successfully.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: session-4.scope: Consumed 3.869s CPU time, 23.4M memory peak.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: session-3.scope: Deactivated successfully.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: session-3.scope: Consumed 3.917s CPU time, 22.6M memory peak.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: [email protected]: Scheduled restart job, restart counter is at 1.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: [email protected]: Scheduled restart job, restart counter is at 1.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd-logind[1107]: Session 4 logged out. Waiting for processes to exit.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: Starting e2scrub_all.service - Online ext4 Metadata Check for All Filesystems...
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: Started [email protected] - Getty on tty1.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: Started [email protected] - Serial Getty on ttyS0.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: e2scrub_all.service: Deactivated successfully.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: Finished e2scrub_all.service - Online ext4 Metadata Check for All Filesystems.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd-logind[1107]: Removed session 4.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd-logind[1107]: Session 3 logged out. Waiting for processes to exit.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd-logind[1107]: Removed session 3.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 sshd[1250]: Received signal 15; terminating.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: Stopping ssh.service - OpenBSD Secure Shell server...
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: ssh.service: Deactivated successfully.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: Stopped ssh.service - OpenBSD Secure Shell server.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: sshd-keygen.service - Generate sshd host keys on first boot was skipped because of an unmet condition check (ConditionFirstBoot=yes).
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
2025-12-07T13:09:50+01:00 bigtreetech-cb1 sshd[2163]: Server listening on 0.0.0.0 port 22.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 sshd[2163]: Server listening on :: port 22.
2025-12-07T13:09:50+01:00 bigtreetech-cb1 systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
2025-12-07T13:09:51+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 2171 ('systemctl') (unit armbian-firstrun.service)...
2025-12-07T13:09:51+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-12-07T13:09:52+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 1037 ms.
2025-12-07T13:09:53+01:00 bigtreetech-cb1 CRON[1105]: pam_unix(cron:session): session closed for user root
2025-12-07T13:09:54+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 2223 ('systemctl') (unit armbian-firstrun.service)...
2025-12-07T13:09:54+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-12-07T13:09:54+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 890 ms.
2025-12-07T13:09:55+01:00 bigtreetech-cb1 systemd[1]: sshd-keygen.service - Generate sshd host keys on first boot was skipped because of an unmet condition check (ConditionFirstBoot=yes).
2025-12-07T13:09:55+01:00 bigtreetech-cb1 sshd[2163]: Received signal 15; terminating.
2025-12-07T13:09:55+01:00 bigtreetech-cb1 systemd[1]: Stopping ssh.service - OpenBSD Secure Shell server...
2025-12-07T13:09:55+01:00 bigtreetech-cb1 systemd[1]: ssh.service: Deactivated successfully.
2025-12-07T13:09:55+01:00 bigtreetech-cb1 systemd[1]: Stopped ssh.service - OpenBSD Secure Shell server.
2025-12-07T13:09:55+01:00 bigtreetech-cb1 systemd[1]: sshd-keygen.service - Generate sshd host keys on first boot was skipped because of an unmet condition check (ConditionFirstBoot=yes).
2025-12-07T13:09:55+01:00 bigtreetech-cb1 systemd[1]: Starting ssh.service - OpenBSD Secure Shell server...
2025-12-07T13:09:55+01:00 bigtreetech-cb1 sshd[2267]: Server listening on 0.0.0.0 port 22.
2025-12-07T13:09:55+01:00 bigtreetech-cb1 sshd[2267]: Server listening on :: port 22.
2025-12-07T13:09:55+01:00 bigtreetech-cb1 systemd[1]: Started ssh.service - OpenBSD Secure Shell server.
2025-12-07T13:09:55+01:00 bigtreetech-cb1 systemctl[2275]: Removed '/etc/systemd/system/multi-user.target.wants/armbian-firstrun.service'.
2025-12-07T13:09:55+01:00 bigtreetech-cb1 systemd[1]: Reload requested from client PID 2275 ('systemctl') (unit armbian-firstrun.service)...
2025-12-07T13:09:55+01:00 bigtreetech-cb1 systemd[1]: Reloading...
2025-12-07T13:09:56+01:00 bigtreetech-cb1 systemd[1]: Reloading finished in 894 ms.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1]: Stopping [email protected] - User Manager for UID 0...
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1495]: Activating special unit exit.target...
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1495]: Stopped target default.target - Main User Target.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1495]: Stopped target basic.target - Basic System.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1495]: Stopped target paths.target - Paths.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1495]: Stopped target sockets.target - Sockets.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1495]: Stopped target timers.target - Timers.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1495]: Closed dbus.socket - D-Bus User Message Bus Socket.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1495]: Closed keyboxd.socket - GnuPG public key management service.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1495]: Stopping ssh-agent.socket - OpenSSH Agent socket...
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1495]: Closed ssh-agent.socket - OpenSSH Agent socket.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1495]: Removed slice app.slice - User Application Slice.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1495]: Reached target shutdown.target - Shutdown.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1495]: Finished systemd-exit.service - Exit the Session.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1495]: Reached target exit.target - Exit the Session.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 (sd-pam)[1514]: pam_unix(systemd-user:session): session closed for user root
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd-logind[1107]: Removed session 5.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1]: [email protected]: Deactivated successfully.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1]: Stopped [email protected] - User Manager for UID 0.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1]: [email protected]: Consumed 1.292s CPU time, 7.7M memory peak.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1]: Stopping [email protected] - User Runtime Directory /run/user/0...
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1]: run-user-0.mount: Deactivated successfully.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1]: [email protected]: Deactivated successfully.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1]: Stopped [email protected] - User Runtime Directory /run/user/0.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1]: Removed slice user-0.slice - User Slice of UID 0.
2025-12-07T13:10:00+01:00 bigtreetech-cb1 systemd[1]: user-0.slice: Consumed 9.232s CPU time, 50.5M memory peak.
2025-12-07T13:10:59+01:00 bigtreetech-cb1 systemd[1]: Starting fstrim.service - Discard unused blocks on filesystems from /etc/fstab...
2025-12-07T13:11:00+01:00 bigtreetech-cb1 fstrim[2313]: /boot: 176.1 MiB (184688640 bytes) trimmed on /dev/mmcblk0p1
2025-12-07T13:11:00+01:00 bigtreetech-cb1 fstrim[2313]: /: 2.7 GiB (2949083136 bytes) trimmed on /dev/mmcblk0p2
2025-12-07T13:11:00+01:00 bigtreetech-cb1 systemd[1]: fstrim.service: Deactivated successfully.
2025-12-07T13:11:00+01:00 bigtreetech-cb1 systemd[1]: Finished fstrim.service - Discard unused blocks on filesystems from /etc/fstab.
2025-12-07T13:12:41+01:00 bigtreetech-cb1 systemd[1]: Received SIGINT.

I have traced both cases and it seems two sessions simuteniosly killing each other ok pid 1533 (killed process, no debugging completion message is visible "end debug...")

+ ps -u root -o pid,tty,comm
+ awk -v me=tty1 -v mypid=1533 'NR>1 && $2 != "?" && $2 != me && $1 != mypid && $3 ~ /sh$/ { print $1 }'
1524
1534
++ tty
++ sed s:/dev/::
+ current_tty=tty1
+ current_pid=1533
+ ps -u root -o pid,tty,comm
+ awk -v me=tty1 -v mypid=1533 '
                    NR>1 && $2 != "?" && $2 != me && $1 != mypid && $3 ~ /sh$/ {
                      print $1
                    }'
+ xargs --no-run-if-empty kill -9

ok pid 1534 (survived process, message "end debug..." at the end)

+ ps -u root -o pid,tty,comm
+ awk -v me=ttyS0 -v mypid=1534 'NR>1 && $2 != "?" && $2 != me && $1 != mypid && $3 ~ /sh$/ { print $1 }'
1523
1533
++ tty
++ sed s:/dev/::
+ current_tty=ttyS0
+ current_pid=1534
+ ps -u root -o pid,tty,comm
+ awk -v me=ttyS0 -v mypid=1534 '
                    NR>1 && $2 != "?" && $2 != me && $1 != mypid && $3 ~ /sh$/ {
                      print $1
                    }'
+ xargs --no-run-if-empty kill -9
+ echo end debug...
end debug...
+ sync
+ sync
+ set +x

failed case: fail pid 1537 (killed process)

+ ps -u root -o pid,tty,comm
+ awk -v me=tty1 -v mypid=1537 'NR>1 && $2 != "?" && $2 != me && $1 != mypid && $3 ~ /sh$/ { print $1 }'
1528
1538
++ tty
++ sed s:/dev/::
+ current_tty=tty1
+ current_pid=1537
+ ps -u root -o pid,tty,comm
+ awk -v me=tty1 -v mypid=1537 '
                    NR>1 && $2 != "?" && $2 != me && $1 != mypid && $3 ~ /sh$/ {
                      print $1
                    }'
+ xargs --no-run-if-empty kill -9

fail pid 1538 (killed too)

+ ps -u root -o pid,tty,comm
+ awk -v me=ttyS0 -v mypid=1538 'NR>1 && $2 != "?" && $2 != me && $1 != mypid && $3 ~ /sh$/ { print $1 }'
1527
1537
++ tty
++ sed s:/dev/::
+ current_tty=ttyS0
+ current_pid=1538
+ ps -u root -o pid,tty,comm
+ awk -v me=ttyS0 -v mypid=1538 '
                    NR>1 && $2 != "?" && $2 != me && $1 != mypid && $3 ~ /sh$/ {
                      print $1
                    }'
+ xargs --no-run-if-empty kill -9

schavkin avatar Dec 07 '25 13:12 schavkin

I had the same issue with my Radxa Cubie A7A build. I fixed this with short delay. Now tty1 has enough time to kill the other root sessions.

https://github.com/NickAlilovic/build/blob/Radxa-A7A/packages/bsp/common/usr/lib/armbian/armbian-firstlogin#L791-L795

NickAlilovic avatar Dec 15 '25 22:12 NickAlilovic

I had the same issue with my Radxa Cubie A7A build. I fixed this with short delay. Now tty1 has enough time to kill the other root sessions.

https://github.com/NickAlilovic/build/blob/Radxa-A7A/packages/bsp/common/usr/lib/armbian/armbian-firstlogin#L791-L795

definitely not mergeable upstream, b/c there is also ttyS0 case [and possibly others, best to check /proc/cmdline].

tabrisnet avatar Dec 16 '25 00:12 tabrisnet

We only need one root session to enter the preset information. The problem with the code is two root sessions login at the same time (tty1 and ttyS0). They both run the firstlogin script and execute the kill command at the same time. By delaying all root sessions except tty1 we solve the race condition. That’s what my snippet of code is effectively doing.

NickAlilovic avatar Dec 16 '25 13:12 NickAlilovic

I wrote a script that has a priority list and the user can choose which tty fills in the preset information. In case tty1 is not used or they need ttyS0 to debug the preset information. https://github.com/NickAlilovic/build/commit/568ca704f846eb57847bbcb84046205efaffac31

NickAlilovic avatar Dec 16 '25 13:12 NickAlilovic