The problemis that ntp is refusing to sync upon booting because the time difference between the pi and the remote server is too large (panic threshold exceeded). The best solution is to install fake-hwclock and instruct ntpd to ignore the panic threshold.
You can configure the panic threshold in one of two ways:
- edit
/etc/default/ntp
and ensure that the -g option is present.
- edit /etc/ntp.conf and place
tinker panic 0
at the top
Install the fake-hwclock program (debian based):
# apt-get install fake-hwclock
fake-hwclock description from Debian package:
fake-hwclock: Save/restore system clock on machines without working RTC hardware
Some machines don't have a working realtime clock (RTC) unit, or no
driver for the hardware that does exist. fake-hwclock is a simple set
of scripts to save the kernel's current clock periodically (including
at shutdown) and restore it at boot so that the system clock keeps at
least close to realtime. This will stop some of the problems that may
be caused by a system believing it has travelled in time back to
1970, such as needing to perform filesystem checks at every boot.
On top of this, use of NTP is still recommended to deal with the fake
clock "drifting" while the hardware is halted or rebooting.
With fake-hwclock installed your machine will not start up thinking it is 1970 all over again. When your machine boots up it will set its clock to the timestamp fake-hwclock wrote during the last reboot/shutdown. This means you can have a somewhat correct clock in case there are network issues when you boot up.
ntpd
comes pretty well configured and is started during boot-up.