Chrony doesn't work and increases the boot time by 10 seconds
Created by: ollieparanoid
@yangxuan8282 wrote in https://github.com/postmarketOS/pmbootstrap/pull/1543#issuecomment-399624179:
I found for me the slow boot maybe related to chrony, I did a alpine install on rpi with this script, and add same openrc service as pmos(except hwclock, I delete it because rpi not have hardware clock). because alpine display openrc start progress, so I found every time it stuck at chronyd for over 10 seconds even I have replace default ntp server. after replace chrony with busybox ntp (/etc/init.d/ntpd) the boot progress is much faster than before, the boot time(from rpi color splash screen to see desktop) is basically same as raspbian. on pmos when I replace chrony with busybox ntp, I found it didn't work
My understanding is, that for some reason the network isn't available at this point, and therefore chrony runs into a 10 second timeout and busybox ntp just fails. Chrony seems to be the most secure NTP client out there (see pmbootstrap#588 (closed)), so if possible I think we should stick with that.
Proposal:
- Change the
chrony
aport to add "offline" after each server in the/etc/chrony.conf
file (see Arch Wiki)- that way it won't try to reach the NTP servers, so boot should not be blocked
- Set up a NetworkManager dispatcher to notify chrony when we're online (see networkmanager-dispatcher-chrony)
@yangxuan8282: would you like to give it a shot?