Ntpd and htpdate don't seem to work

6 posts
by rrohrer » Fri Jun 15, 2012 9:35 am
I've got gentoo installed etc, and it's really annoying to keep setting the clock every time I boot. So first I installed htpdate, everything seemed fine and dandy, until I rebooted the clock was reset. So I tried htpdate -qd www.google.com and it failed. Now if I reset the date to something close, it succeeds. This frustrated me, so I installed ntpd, and am having the same problem.

Both were added to rc-update, as default, and both happen after eth0 comes online in the boot. The only seem to work when the clock is kinda close to accurate, when it's set to dec31 1969 on a boot, they fail.

Any ideas?
Posts: 1
Joined: Tue Jun 12, 2012 11:42 pm
by fotrox » Mon Jun 18, 2012 1:41 am
Setting date is a real pain, however I could fix the problem following some of the instructions on this wiki page http://en.gentoo-wiki.com/wiki/NTP
I used the standard ntp tool and had only to check some config files and it was up and running just fine.
Don't forget to stop the hwclock daemon and delete it from bootup. In addition I added the swclock daemon to the boot level. So it won't mess things up. And maybe you should check if you set the timezone right, I had some wicked problems with it, wasn't fun at all.
Hope it helps you out.
Posts: 4
Joined: Sat Feb 18, 2012 10:26 pm
by Tiki-God » Tue Jun 19, 2012 2:48 pm
The simplest solution that I found is to just add ntp-client and ntpd to the default runlevels. This will run ntpdate at boot to set the correct time and then run ntpd to maintain the time.
Posts: 1
Joined: Tue Jun 19, 2012 2:41 pm
by RBf » Fri Dec 14, 2012 10:08 am
I've a short and perhaps stupid question.
But I want do install htpdate, but I don't know how..
I tried it with "apt-get install htpdate" , but it is saying "Unable to locate package"
Then I tired also to find the package in the Internet, but it was without success.

Would you be so nice helping me? ;)
Posts: 7
Joined: Fri Dec 14, 2012 10:03 am
by baldyza » Fri Dec 14, 2012 11:45 am
RBf wrote:I tried it with "apt-get install htpdate" , but it is saying "Unable to locate package"

This command will probably work on debian based distributions. Are you sure you are using gentoo?
Have a look at the wiki, it shows how to setup a clock on Gentoo.
http://wiki.gentoo.org/wiki/Raspberry_P ... ware_clock
Posts: 37
Joined: Fri Sep 21, 2012 11:23 am
by RBf » Fri Dec 14, 2012 12:05 pm
Oh I skipped the thing with gentoo. I'm using the wheezy one. Is it possible to use htpdate there?
Unfortunately I can't use ntp, because i use a proxy to go on the internet.
Posts: 7
Joined: Fri Dec 14, 2012 10:03 am