nils-werner / raspi-overlayroot

Protect your SD card against wear and tear
MIT License
117 stars 21 forks source link

date/time is not persistant on a real-time-clock free system. #10

Closed fakstory closed 5 years ago

fakstory commented 5 years ago

Question

How can I update the date/time continuously, while keeping overlayroot in action?

This seems to me to be similar to this issue: https://github.com/nils-werner/raspi-overlayroot/issues/9

Because I would like to be able to let SOME parts of the system writable. But I have separated them because it is possible that the solution for each is not exactly the same. (I don't have to update the date/time as often as a watchdog)

nils-werner commented 5 years ago

Did you try running an ntp client on boot?

This is something you need to do on a Raspberry Pi, regardless if you use overlayroot or not.

fakstory commented 5 years ago

Indeed, I had ntpd running, but not functioning correctly, I have switched to systemd-timesyncd and now it syncs at boot with no problem.

I would still like a way to make /var/lib/systemd/timesync/clock writable.

Note: The service writes to a local file /var/lib/systemd/timesync/clock with every synchronization. This location is hard-coded and cannot be changed. This may be problematic for running off read-only root partition or trying to minimize writes to an SD card.

nils-werner commented 5 years ago

With overlayroot you should be able to write to /var/lib/systemd/timesync/clock! Are you sure you have overlayroot running, and not just set your SD card to read-only?