On Fri, Jan 12, 2024 at 02:35:47PM +0100, Christian Gut wrote:

> Hi,
> 
> Could somebody point me to documentation or tell me where OpenBSD gets the 
> time from, when the system has no RTC and ntpd is not working?
> 
> I am using an EdgeRouter / octeon and at every reboot, the date/time gets 
> reset to the exact same date.
> 
> I tried to read the source code of boot(9) and inittodr(9). I can see, that 
> there seems to be a fallback to some timestamp that comes from the 
> filesystem. Maybe when the root filesystem is mounted as of ffs_mountroot() 
> for example. But my understanding did not go so far to identify from which 
> file, directory, superblock or other filesystem metadata the information 
> really comes from.
> 
> It seems to me, that either my system is broken or something on octeon does 
> not work correctly for this fallback to happen correctly.
> 
> Kind Regards,
> Christian
> 

When there is no RTC or reading it fails, the "last written" timestamp
of the root filesystem is used. 

What are you observing exactly? You did not tell any details.  How
does ntpd fail? Please show some logs (/var/log/daemon should have some
lines).

        -Otto

Reply via email to