The officially official Devuan Forum!

You are not logged in.

#1 2017-07-06 14:45:59

Giovanni Rapagnani
d1g
Registered: 2017-03-06
Posts: 0

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 <code>-s</code> flag passed to openntpd daemon. <code>-s</code> flag 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, <code>init</code> waits and the startup of the various <code>getty</code> processes inside <code>/etc/inittab</code> are delayed.

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 <code>-s</code> flag and let openntpd adjust the system time in daemon mode only.

<code>-s</code> is introduced through the <code>copy-root-overlay</code> function. It is not set by the <code>/etc/default/openntpd</code> file shipped with the openntpd package. So it is matter of removing the file <code>extra/generic-root/etc/default/openntpd</code>

________________________________________

Project: sdk/arm-sdk
Issue: #22
By: Giovanni Rapagnani

Offline

#2 2017-07-18 18:11:22

Count_Cucaracha
Member
Registered: 2017-07-17
Posts: 37

Re: console prompt delayed by 5 min when no internet connection

Wow wonder where the 5 minute timeout is set in the code. That seems extreme.

I am no expert on this but I think it's a problem to have a system come up and have a bad timestamp. In other word a lot of problems can surface when a system gets booted and has a future timestamp on certain files.
As always when "time" is involved things get complicated quickly.  You probably already know all this.

I think that in a very recent kernel (maybe even 4.13-rc1 IIRC) there are some new features to store the time so at least it isn't set to something crazy when it cannot be derived from a daemon, battery-backed timesource, etc. So no need to wait to get correct time and just use the last known good time we had which will not be in the future.


p.s. Code tags are

[code]your code here[/code]

Offline

#3 2017-07-18 19:05:15

golinux
Administrator
Registered: 2016-11-25
Posts: 551

Re: console prompt delayed by 5 min when no internet connection

Count_Cucaracha wrote:

p.s. Code tags are

[code]your code here[/code]

You'll be suggesting that regularly  here and I totally agree.  But these issues posts are imported from git to the forum.  The bot doesn't change anything in the markdown or however it's presented there.  So sometimes strange things happen . . .

Offline

#4 2017-07-21 00:35:36

Count_Cucaracha
Member
Registered: 2017-07-17
Posts: 37

Re: console prompt delayed by 5 min when no internet connection

golinux wrote:

The bot doesn't change anything in the markdown or however it's presented there.

The bot is in need of repairs I guess or is it built in to fluxbb? Minor problem for sure but makes reading the issues easier.

Offline

#5 2017-07-21 01:14:46

golinux
Administrator
Registered: 2016-11-25
Posts: 551

Re: console prompt delayed by 5 min when no internet connection

Count_Cucaracha wrote:
golinux wrote:

The bot doesn't change anything in the markdown or however it's presented there.

The bot is in need of repairs I guess or is it built in to fluxbb? Minor problem for sure but makes reading the issues easier.

The bot is a custom script written especially for this forum and it works quite well.  The real problem is actual human users who don't format their posts with appropriate tags.

Offline

#6 2017-07-22 00:13:58

Count_Cucaracha
Member
Registered: 2017-07-17
Posts: 37

Re: console prompt delayed by 5 min when no internet connection

golinux wrote:

The bot is a custom script written especially for this forum and it works quite well.  The real problem is actual human users who don't format their posts with appropriate tags.

Didn't you say the real problem is that the bot doesn't convert markdown into the bbcode here?  Or maybe you mean the lack of proper tags by users here is a bigger problem?

This import bot problem is not really a big problem.

Offline

#7 2017-07-22 01:46:40

golinux
Administrator
Registered: 2016-11-25
Posts: 551

Re: console prompt delayed by 5 min when no internet connection

Count_Cucaracha wrote:
golinux wrote:

The bot is a custom script written especially for this forum and it works quite well.  The real problem is actual human users who don't format their posts with appropriate tags.

Didn't you say the real problem is that the bot doesn't convert markdown into the bbcode here?  Or maybe you mean the lack of proper tags by users here is a bigger problem?

This import bot problem is not really a big problem.

Yes, the bot doesn't convert markdown to BBcode. It is an annoyance but not a problem.  And yes, the real problem is users who are either lazy or haven't figured out how to format their posts properly or are clueless about how formatting clarifies a post's content.

Offline

Board footer