Hi ,
I’ve just started using Dietpi on an Odroid hc1 , using journalctl I see that the log is filled with errors from getty
May 23 20:29:58 DietPi agetty[2473]: /dev/ttyS0: not a tty
May 23 20:29:58 DietPi agetty[2474]: /dev/ttyS2: not a tty
May 23 20:29:58 DietPi agetty[2475]: /dev/ttyS1: not a tty
May 23 20:30:08 DietPi systemd[1]: serial-getty@ttyS0.service: Service hold-off time over, scheduling restart.
May 23 20:30:08 DietPi systemd[1]: serial-getty@ttyS1.service: Service hold-off time over, scheduling restart.
May 23 20:30:08 DietPi systemd[1]: serial-getty@ttyS2.service: Service hold-off time over, scheduling restart.
May 23 20:30:08 DietPi systemd[1]: Stopped Serial Getty on ttyS2.
May 23 20:30:08 DietPi systemd[1]: Started Serial Getty on ttyS2.
May 23 20:30:08 DietPi systemd[1]: Stopped Serial Getty on ttyS1.
May 23 20:30:08 DietPi systemd[1]: Started Serial Getty on ttyS1.
May 23 20:30:08 DietPi systemd[1]: Stopped Serial Getty on ttyS0.
May 23 20:30:08 DietPi systemd[1]: Started Serial Getty on ttyS0.
May 23 20:30:08 DietPi agetty[2480]: /dev/ttyS2: not a tty
May 23 20:30:08 DietPi agetty[2481]: /dev/ttyS1: not a tty
May 23 20:30:08 DietPi agetty[2482]: /dev/ttyS0: not a tty
May 23 20:30:18 DietPi systemd[1]: serial-getty@ttyS2.service: Service hold-off time over, scheduling restart.
May 23 20:30:18 DietPi systemd[1]: serial-getty@ttyS0.service: Service hold-off time over, scheduling restart.
May 23 20:30:18 DietPi systemd[1]: serial-getty@ttyS1.service: Service hold-off time over, scheduling restart.
May 23 20:30:18 DietPi systemd[1]: Stopped Serial Getty on ttyS1.
May 23 20:30:18 DietPi systemd[1]: Started Serial Getty on ttyS1.
May 23 20:30:18 DietPi systemd[1]: Stopped Serial Getty on ttyS0.
May 23 20:30:18 DietPi systemd[1]: Started Serial Getty on ttyS0.
May 23 20:30:18 DietPi systemd[1]: Stopped Serial Getty on ttyS2.
this is a fresh minimal install nothing else installed
any help would be much appreciated
I have sort of fixed it but I’m not 100% sure it is the correct way but I did
systemctl stop getty@ttyS1
systemctl disable getty@ttyS1
systemctl mask serial-getty@ttyS1.service
for ttyS0 ,ttyS1 and ttyS2
the logs have gone so hopefully everything is fine .
Greylinux
The last DietPi version should have fixed that by disabling all serial-getty instances that do not have a valid serial device as target. Note that you mixed regular getty and serial-getty, so in your case it should be:
systemctl stop serial-getty@ttyS0
systemctl stop serial-getty@ttyS1
systemctl stop serial-getty@ttyS2
systemctl stop serial-getty@ttyS3
systemctl disable serial-getty@ttyS0
systemctl disable serial-getty@ttyS1
systemctl disable serial-getty@ttyS2
systemctl disable serial-getty@ttyS3
Masking should not be required.
You can control individual serial consoles via dietpi-config > Advanced Options > Serial/UART
Or you can disable all of them at once: /DietPi/dietpi/func/dietpi-set_hardware serialconsole disable
I was trying to check if a cronjob has been running and came across this error with journalctl. It haven’t noticed any problems caused by this, but it bothers me that this unknown-to-me service is running (and failing?) every 10 seconds. Here’s the log, which then repeats every 10 seconds:
Mar 08 07:44:16 DietPi systemd[1]: serial-getty@ttyS2.service: Service hold-off
time over, scheduling restart.
Mar 08 07:44:16 DietPi systemd[1]: serial-getty@ttyS0.service: Service hold-off
time over, scheduling restart.
Mar 08 07:44:16 DietPi systemd[1]: serial-getty@ttyS1.service: Service hold-off
time over, scheduling restart.
Mar 08 07:44:16 DietPi systemd[1]: Stopped Serial Getty on ttyS1.
Mar 08 07:44:16 DietPi systemd[1]: Started Serial Getty on ttyS1.
Mar 08 07:44:16 DietPi systemd[1]: Stopped Serial Getty on ttyS0.
Mar 08 07:44:16 DietPi systemd[1]: Started Serial Getty on ttyS0.
Mar 08 07:44:16 DietPi systemd[1]: Stopped Serial Getty on ttyS2.
Mar 08 07:44:16 DietPi systemd[1]: Started Serial Getty on ttyS2.
Mar 08 07:44:16 DietPi agetty[4918]: /dev/ttyS1: not a tty
Mar 08 07:44:16 DietPi agetty[4919]: /dev/ttyS0: not a tty
Mar 08 07:44:16 DietPi agetty[4920]: /dev/ttyS2: not a tty
Is this a problem? Is it useful in any way? Can/should I stop it (and how?)?
Hi,
short question. Do you use serial console at all? If not, the solution is provide in the post above
Or you can disable all of them at once: > /DietPi/dietpi/func/dietpi-set_hardware serialconsole disable
Yes, if you don’t use any serial console, simply disable all of them. If you use one, preferably you use a single tty only (most likely ttyS0) and disable all others like systemctl disable --now serial-getty@ttyS1 …
Currently, on image creation, we enable a serial console/getty on all serial devices the machine has. In case of Armbian-based images, I adjust them so that only the default/intended debug serial console is enabled for login as well. In other SBC cases the problem is that there are usually several available, but there is no generic rule about which is used/available/intended for serial login and attached to related GPIO pins and which is used for Bluetooth and/or other features. In case of x86 systems, there are usually ttyS0 ttyS1 ttyS2 and ttyS3 all available, hence a serial-getty console enabled on all of them. I am not sure how to handle best, enable only ttyS0 by default? However generally having them enabled does not hurt, they will fail quickly on boot, if not usable. And all serial consoles can be disabled either via dietpi.txt before first boot or via the command mentioned by Joulinar or via dietpi-config > Advanced Options > Serial/UART.