• Re: getting correct time when rpi boots up freebsd

    From Theo@3:770/3 to Mike Scott on Tue Apr 19 13:13:38 2022
    XPost: comp.unix.bsd.freebsd.misc

    In comp.sys.raspberry-pi Mike Scott <usenet.16@scottsonline.org.uk.invalid> wrote:
    Hi all; a bit of a chicken-and-egg conundrum here when booting up a
    raspberry pi, unless there's something I've badly misunderstood.

    The pi doesn't have an internal clock, so is absolutely reliant on
    getting time off the network when it boots. ntpdate should do that (I
    think by extracting a server name from the ntp config file and synching
    to that). But that means resolving the name, and if the clock is far
    enough wrong, dns lookups seem to fail. So the system can't do the
    lookup to synch the clock to..........

    Are you doing DNSSEC or DNS over HTTPS by any chance?
    Otherwise that's odd for DNS to depend on the date.

    o I did wonder about using a gps dongle to set the time: but gpsd seems
    not to work on the rpi :-{ Anyone fixed this yet?

    There are I2C RTC modules that go on a Pi: https://wiki.seeedstudio.com/Pi_RTC-DS1307/
    (many many versions from different vendors, many <$10)

    FreeBSD can then be configured to use it: https://vzaigrin.wordpress.com/2015/08/04/real-time-clock-on-raspberry-pi-with-freebsd-11/
    (it is possible this is now simpler, I haven't tried it)

    Theo

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Hermann Riemann@3:770/3 to All on Wed Apr 20 06:37:54 2022
    Am 19.04.22 um 14:24 schrieb nospam:
    get an rtc clock.

    compute the_result and use
    #date -s the_result

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)