view · edit · print · history

Installing OpenNTPD on OpenSlug!

NOTE: This page is very out-of-date, and needs a thorough overhaul before it should be considered usable again. ~mwester 16 March 2007

OpenNTPD is very nice to run to keep your clock up to snuff. It's main advantages over the 'official' NTPD daemon is it does the same thing in one fifth as much code, meaning less RAM usage, and a much lower chance of security holes. But installing it is going to be confusing if you do not follow the correct steps.

You might want to check that your clock is somewhat accurate before installing, as OpenNTPD can't adjust the clock in large steps. It adjusts the clock with ~0.1 seconds every 4.5 minutes, so if your clock is two minutes off it'll take ages before the clock is accurate.
$ date MMDDHHMMCCYY (Example: 080514002005, for 14:00, the 5th of August 2005)

For OpenSlug 2.3-beta, 2.4-beta, 2.5-beta:

  1. ipkg install ntp-tickadj
  2. ipkg install tzdata-<your continent>
  3. ln -s /usr/share/zoneinfo/<your continent>/<Your timezone> /etc/localtime
  4. ipkg install openntpd
  5. hwclock --systohc
  6. reboot

Verify that ntpd is running (ps aux)

For OpenSlug >2.6-beta (or HEAD)

  1. ipkg install tzdata-<your-continent>
  2. ln -s /usr/share/zoneinfo/<your continent>/<Your timezone> /etc/localtime
  3. unset TZ (Or reboot. TZ will not be set once /etc/localtime exists)
  4. ipkg install openntpd
  5. hwclock --systohc

Verify that ntpd is running (ps aux)

If ntpd does not start, verify that you have a root-owned directory /var/shared/empty, and that you have a ntpd user in /etc/passwd with /var/shared/empty as homedir.

Note for OpenSlug 2.5-beta: I had problems with time still drifting away after following this guide. The problem was the initial tickadj value of 10000. Adding the boot script 'tickadj' helped me. It takes the tick value from '\etc\default\rcS' (in my case 10101)

ln -s /etc/init.d/tickadj /etc/rcS.d/S20tickadj

-- oaks

To get tickadj to be applied on my 2.5 system I had to run the command:

cd /etc/init.d
update-rc.d tickadj defaults

You can see the operation of the Openntpd program much better if you run it from the command line with these commands.

ps aux | grep ntpd (find any running copy of ntpd)
kill #### (where #### is the process id of the first ntpd listed)
repeat the above ps command to make sure all have been stopped
ntpd -d -s (run, set time immediately, show all output on the console)
Exit the running ntpd with a Ctrl-C

Continent and timezone for this command:


Your timezone entry can be found in the directory: /usr/share/zoneinfo/<your continent>/

For 3.10 tzdata-america changed to tzdata-americas

wget: server returned error 404

At this moment (10/10/05), the ipkg install openntpd is kinda cracked (wrong feed), so to get it to work you should:

  1. mv /etc/ipkg/native-feed.conf /etc/ipkg/native-feed.conf.saved
  2. ipkg install openntpd
  3. mv /etc/ipkg/native-feed.conf.saved /etc/ipkg/native-feed.conf

- Jelle

view · edit · print · history · Last edited by stanley_p_miller.
Based on work by Caysho, mwester, Michael, Mark Glines, Jelle, stanley_p_miller_qaz, oaks, blaster8, repvik, and benny.
Originally by repvik.
Page last modified on August 07, 2008, at 03:13 AM