Issues with apt-get, NTPD timesync with DietPi

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Issues with apt-get, NTPD timesync with DietPi

Post by k-plan »

Hi ptrinh1979,
ptrinh1979 wrote:- what text editor is available in DietPi by default?

Code: Select all

nano
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
antalattila
Posts: 1
Joined: Tue Feb 11, 2020 9:37 pm

Re: Issues with apt-get, NTPD timesync with DietPi

Post by antalattila »

Same here.

I discovered minimum two issues here. the config file entry is not correct and at boot time is not working.

To fix the config file is quite easy. Pease do:

Code: Select all

nano /etc/systemd/timesyncd.conf
correct the entry server=.. to FallbackNTP=.. and done.

At boot time you will have the issue but it will fix the time at the next hour or if you run the following command manually:

Code: Select all

systemctl restart systemd-timesyncd
User avatar
Joulinar
Posts: 2068
Joined: Sat Nov 16, 2019 12:49 am

Re: Issues with apt-get, NTPD timesync with DietPi

Post by Joulinar »

Hi,

you reacted on a 2 years old entry. Not sure if there is any relation to your issue.

usually your config file should looks like this:

Code: Select all

root@DietPi3:~# cat /etc/systemd/timesyncd.conf
[Time]
Servers=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org
root@DietPi3:~#
next to this, the time server can be changed using dietpi-config tool.
and yes, during boot systemd-timesyncd is executed already and will update your system time. To check you can do the following after reboot

Code: Select all

journalctl -u systemd-timesyncd.service
systemctl status systemd-timesyncd.service
if system time is not updated during boot, something seems to be wrong on your device.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply