openzfs-docs
openzfs-docs copied to clipboard
Debian root on ZFS - Should install systemd-timesyncd
With some help troubleshooting, I found that I couldn't authenticate on some websites because of clock drift, because Debian's root on ZFS does not install any network time synchronization that is normally installed by Debian. So my clock ended up being behind by 2 about minutes; commands showing the issue as well as how to fix below.
- Where would be an appropriate place in the instructions to add network time support?
- Can we check if it needs to be added to any other distros?
$ timedatectl
Local time: Fri 2022-09-09 01:14:56 EDT
Universal time: Fri 2022-09-09 05:14:56 UTC
RTC time: Fri 2022-09-09 05:13:47
Time zone: America/New_York (EDT, -0400)
System clock synchronized: no
NTP service: n/a
RTC in local TZ: no
$ sudo systemctl start systemd-timesyncd
Failed to start systemd-timesyncd.service: Unit systemd-timesyncd.service not found.
$ sudo apt install systemd-timesyncd # NB: Debian-derived distros auto-start services for you unlike, say, RedHat.
...
$ systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; ve>
Active: active (running) since Fri 2022-09-09 01:16:42 EDT; 2min 28s ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 652199 (systemd-timesyn)
Status: "Initial synchronization to time server 64.79.100.196:123 (0.debia>
Tasks: 2 (limit: 19064)
Memory: 1.0M
CPU: 87ms
CGroup: /system.slice/systemd-timesyncd.service
└─652199 /lib/systemd/systemd-timesyncd
$ timedatectl
Local time: Fri 2022-09-09 01:22:41 EDT
Universal time: Fri 2022-09-09 05:22:41 UTC
RTC time: Fri 2022-09-09 05:22:41
Time zone: America/New_York (EDT, -0400)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Debian's root on ZFS does not install any network time synchronization that is normally installed by Debian
This makes me worry a bit about what else might be missing.
But yeah, it seems like the easy answer here is to add a step to install systemd-timesyncd. We'd probably want to do that before rebooting into the installed system. So probably after 4.5 and before 4.9 (since it's nice to keep the optional stuff all at the end there).
Side note not related to this issue: Why am I installing GRUB in 4.8 when I have a whole Step 5 about GRUB? Maybe 4.8 and 4.9 should be moved down to Step 5.
That's strange, I didn't install it manually, but systemd-timesyncd
is here on my system, Debian testing, KDE, installed nearly by our manual.
(I've installed system 16-17 of may)
systemd-timesyncd2# zcat -f /var/log/dpkg.log* | grep "\ install\ " | grep -i systemd-timesyncd
2022-05-17 00:33:20 install systemd-timesyncd:amd64 <none> 250.4-1
But it may be true that it won't install with barebone Debian bootstrap.