I have a ODROID-C2 machine on which I am running Arch Linux.
When I run journalctl -b
, I can see that initially the time is wrong:
-- Logs begin at Thu 2020-02-13 20:01:10 GMT, end at Fri 2020-03-20 17:20:14 GMT. --
Feb 13 20:01:15 moby kernel: Initializing cgroup subsys cpuset
Feb 13 20:01:15 moby kernel: Initializing cgroup subsys cpu
Feb 13 20:01:15 moby kernel: Initializing cgroup subsys cpuacct
Feb 13 20:01:15 moby kernel: Linux version 3.16.81-1-ARCH (builduser@
Later, during the boot process, the time is updated:
Feb 13 20:01:26 moby dbus-daemon[246]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.0' (uid=981 pid=203 comm="/usr/lib/systemd/systemd-networkd ")
Feb 13 20:01:26 moby systemd[1]: Starting Hostname Service...
Mar 20 17:12:59 moby systemd-timesyncd[234]: Initial synchronization to time server 85.199.214.99:123 (0.arch.pool.ntp.org).
Mar 20 17:13:02 moby kernel: audit_printk_skb: 36 callbacks suppressed
1. Question: I would like the time to be (close to) correct right from the start. Is there any way of doing this with an ODROID-C2? It is my understanding that a battery is required for this to work and I don't think an ODROID-C2 has that. Update: Apparently, that is not something that can be done easily.
Most importantly, I want to make sure services are only started once the time is corrected as it can confuse timers etc. I read that the following can be done to potentially achieve that:
- Run:
systemctl enable systemd-time-wait-sync.service
- Put:
After=time-sync.target
in the service file.
2. Question: Is that correct?
I am very confused because I don't think that this is what is happening. I have the following service file:
[Unit]
Description=Run check-updates.service every Friday at 8pm
After=time-sync.target
[Timer]
OnCalendar=Fri 20:00
Persistent=true
[Install]
WantedBy=timers.target
But I can read the following for journalctl -b
:
Feb 13 20:01:25 moby systemd[262]: check-updates.timer: Not using persistent file timestamp Fri 2020-03-20 17:01:56 GMT as it is in the future.
Feb 13 20:01:25 moby systemd[262]: Started Run check-updates.service every Friday at 8pm.
which is clearly before the time has been updated to the correct time.
3. Question: How can I further debug this?