console prompt delayed by 5 min when no internet connection
When the board has no internet connection (yet a LAN connection), it takes around 5 minutes before the serial console prompt appears. You actually see the kernel messages, but at some point they stop and during 5 min you don't get anything at the console. Most people will not wait, think something is wrong with the system and maybe reboot.
Actually this is due to the
-sflag passed to openntpd daemon.
-sflag tells openntpd to set system time at startup. When there is no internet connection, openntpd takes around 5 min to switch to daemon mode (dns timeout?).
During those 5 min,
initwaits and the startup of the various
I think it is wrong that the console is not available as fast as possible. It gives the wrong feeling that the system boot has hung.
Also, given the limited system installed on the devuan image, this image is more tailored at the maker world. I guess several of them will first try to establish a serial console connection before even connecting it to the internet.
I believe it would be better to remove this
-sflag and let openntpd adjust the system time in daemon mode only.
-sis introduced through the
copy-root-overlayfunction. It is not set by the
/etc/default/openntpdfile shipped with the openntpd package. So it is matter of removing the file
I understand the
-sis set to circumvent the error
adjtime failed: Invalid argumentwhen openntpd refuses to set the system time because the offset is too large with respect to the NTP servers time.
it is a pity openntpd does not provide a flag similar to the
-gflag of ntp package. This flag allows once to set the system time even if the offset is very large w.rt. to NTP servers time.
It would then be interesting considering switching to ntp package instead of openntpd. An added benefit of ntp package: it provides the
ntpqcommand, handy to check the synchronisation towards the NTP servers:
ntpq -pnEdited by Giovanni Rapagnani
I shall switch (back) to
ntpthen if this is the case. Thank you for investigating!
Solved with the replacement of openntpd with ntp. Thank you.