After googling for days, I gave up and just decided to ask you guys, as I know that a few of you have a pi...
I've installed Arch on ARM on my raspberry, and since haven't been able to get the time working...
As the raspberry pi has no hardware clock, the time is reset to 1970 everytime I reboot it, wich causes problems with some certificates and such.
I'm just going to tell you what I've tried, and what I found out so far:
ntpd -gqd (obviously w/o the service running)
ntp starts, but does neither change the time (-g: big changes), nor does it exit (-q:change time, then quit), instead it just keeps running printing:
SOME_DEBUG_INFO...
transmit: at SOME_GROWING_NUMBER 10.0.0.2->SOME_IPS mode 3 len 48
I've even left it running for 2 hours once, kept printing the upper transmit message the whole time...
Using ntpd.service
The service starts when booting without any error, but the time isn't changed, instead it is still 1970...
I also checked the .service file, and in ExecStart ntpd is also executed with the -g parameter, but the time isn't changed.
ntpdate
Is deprecated, ntpd -gq should be used instead, but that does not work either.
Leaves with the following error message:
1 Jun 1:04:27 ntpdate[691]: no servers can be used, exiting
ntpdate -u 0.europe.pool.ntp.org
This actually changes the time to the current time in my timezone, but is lost after reboot, as there is no hardware clock.
The last command worked, but I couldn't get it to work with a systemd service...
I tried adding ExecStartPre=/usr/bin/ntpdate -u 0.europe.pool.ntp.org
to ntpd.service under [Service], but the service fails at boot, saying ntpdate exits with error-code failure when checking with systemctl status ntpd.service
I also wrote a seperate service, wich would be start after dhcpcd.service is successfully running (so that I have a working internet-connection) using Requires=dhcpcd.service
After=dhcpcd.service
under [Unit], but again the service fails at boot, saying ntpdate exits with erro-code failure...
I don't have any idea, why ntpdate exits with error-code failure when executed in a systemd service...
The internet connection shouldn't be the problem, as ntpd.service is working fine...
Any ideas what the problem could be? And how to fix this?