Categories
Development Linux

ntp won’t work on read-only Raspberry Pi

I’m struggling to understand WHY ntp (the service) won’t set the time correctly on my raspberry pi.

I have configured the filesystem as read only, to save my SD card, but it used to work, and I cannot seem to figure out why ntp won’t work now.

In the logs I get many many lines of that message:

ntpd[415]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
ntpd[415]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
ntpd[415]: error resolving pool 0.debian.pool.ntp.org: Temporary failure in name resolution (-3)
ntpd[415]: error resolving pool 1.debian.pool.ntp.org: Temporary failure in name resolution (-3)
ntpd[415]: error resolving pool 2.debian.pool.ntp.org: Temporary failure in name resolution (-3)
ntpd[415]: error resolving pool 3.debian.pool.ntp.org: Temporary failure in name resolution (-3)
ntpd[415]: error resolving pool 3.debian.pool.ntp.org: Temporary failure in name resolution (-3)
ntpd[415]: error resolving pool 2.debian.pool.ntp.org: Temporary failure in name resolution (-3)
ntpd[415]: error resolving pool 1.debian.pool.ntp.org: Temporary failure in name resolution (-3)
ntpd[415]: error resolving pool 0.debian.pool.ntp.org: Temporary failure in name resolution (-3)

My /etc/resolv.conf looks like this:

# Generated by resolvconf
nameserver 8.8.8.8
nameserver 192.168.1.22

I have access to internet on that RPi, I can ping the pool addresses, I can ping google, I can apt update (after remounting in rw)…

I also can issue an ntpdate command manually and IT WORKS!

$ sudo ntpdate -u 0.fr.pool.ntp.org 1.fr.pool.ntp.org
24 Nov 23:04:34 ntpdate[578]: step time server 129.250.35.250 offset 2418.621037 sec

So yeah, I’m pulling hairs here. I cannot understand why the ntp service won’t work. I scourged the internet, nobody seems to have this particular issue (all have a malfunctioning dns, but mine is working)

My read-only setup is the following: https://hallard.me/raspberry-pi-read-only/

Do you guys have any idea?

Leave a Reply

Your email address will not be published. Required fields are marked *