On 31/01/2024 12:12, Max Nikulin wrote:
For Raspberry Pi's, Ubuntu offer a script similar to the following https://github.com/Jolicloud/initramfs-tools/blob/master/scripts/local-premount/fixrtc (I couldn't find an equivalent to https://sources.debian.net for Ubuntu, but the script is simple enough that I doubt if it's very different).On 31/01/2024 17:54, to...@tuxteam.de wrote:I think you want "maxstep". It's in the man page chrony.conf(5).But if the time is "months off" perhaps you've got another problem to fix first?I think, the problem is no RTC on some *pi board, certainly chrony out of box setup is not ready to such environment and its solution is not maxstep.Gene, are you going to complain again that some package has no man pages?
The script works like this: if the root device is specified on the kernel command line AND the word "fixrtc" isĀ specified, then get the time that the root file system was last mounted. The script then uses "date" to set the clock to that date stamp.
I assume that the idea is that, rather than having the clock start at 1970, it's better to start it at, say, yesterday. You've still got quite a lot of slewing to do if you connect to NTP, but at least there's a chance that you can verify certificates etc.
OpenPGP_signature.asc
Description: OpenPGP digital signature