Getty and Serial Getty don't seem to be initalizing properly

I have a custom device running U-Boot and Core18 that I’m working on upgrading from Core16 by tweaking the image repo. It can boot and initialize just fine, but doesn’t seem to be able to stand up Serial Getty. I flash and configure the device entirely over serial, so this is quite a problem, since I loose the ability to input into the box when this happens. After starting the Snap Daemon, the average boot looks like this:

[  OK  ] Stopped Getty on tty1.
[  OK  ] Started Getty on tty1.
[  OK  ] Stopped Serial Getty on ttymxc1.
[  OK  ] Started Serial Getty on ttymxc1.
[  OK  ] Stopped Getty on tty1.
[  OK  ] Started Getty on tty1.
[  OK  ] Stopped Serial Getty on ttymxc1.
[  OK  ] Started Serial Getty on ttymxc1.
[  OK  ] Stopped Getty on tty1.
[  OK  ] Started Getty on tty1.
[  OK  ] Stopped Serial Getty on ttymxc1.
[  OK  ] Started Serial Getty on ttymxc1.
[  OK  ] Stopped Getty on tty1.
[  OK  ] Started Getty on tty1.
[  OK  ] Stopped Serial Getty on ttymxc1.
[  OK  ] Started Serial Getty on ttymxc1.

Ad infinitum.

Anyone got any ideas? Could I be mis-configuring something that changed between 16 and 18? This image was version bumped to Core18 from Core16, so I never thought I’d see something as bizarre as serial not working. I’m using the mainline Kernel 4.14.181.

UDPATE: It seems that if I leave it for a few hours, it eventually gives up and applies my network configuration so that I can ssh in. Absolutely wack.

with all required ubuntu configs and the apparmor patchset for 4.14 ?

Updating this. Got pulled off this project and then put back on.

I’ve done some investigation, and saw that the serial-getty@.service times out 8 times, and then gives up, whereupon the rest of the system can boot. After that happens, serial-getty manages to successfully initialize, and the problem doesn’t come back.

After playing around with my hooks, actually found an issue that has somewhat similar symptoms: Snapd.service delays startup in Ubuntu 18.04 with 4.15.0-24

I was using 4.14, so I tried upgrading to 4.19 to see if that fixes anything, but that had no effect, so the problem must be elsewhere.

Also, it only takes about 10 minutes for the serial interface to give up.

Fixed it. I accidentally forgot to bump my kernel version in my build script. I updated it, and built an image with the correct kernel, and now the problem is solved!

1 Like