Welcome! Log In Create A New Profile

Advanced

Setting clock on pink pogoplug

Posted by raccettura 
Setting clock on pink pogoplug
July 13, 2011 10:16AM
I've go ta clean (brand new) install of Debian on my pogo plug here.

root@debian:~# cat /etc/issue
Debian GNU/Linux 6.0 \n \l

Since there's no RTC the clock is 1970. I tried using ntp but it failed for reasons uknown. So I tried using hwclock to set the clock…

root@debian:~# hwclock --set --date='07/13/11 10:56:00' --localtime --debug
Issuing date command: date --date="07/13/11 10:56:00" +seconds-into-epoch=%s
response from date command = seconds-into-epoch=1310568960

date string 07/13/11 10:56:00 equates to 1310568960 seconds since 1969.
hwclock from util-linux-ng 2.17.2
hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
No usable clock interface found.
Cannot access the Hardware Clock via any known method.

That seems to by why NTP is failing. if I do `ntpq -p hostname`, that gives me data, so it's not a connectivity or firewall issue.

How do you get the time to set (even in a volatile state) when the RTC isn't found?
Re: Setting clock on pink pogoplug
July 13, 2011 11:42AM
You can't use hwclock. That's trying to update the rtc. Just use "date --set". And are you sure ntp isn't working? What's the output of just "date"? Maybe you don't have the correct timezone? Use "dpkg-reconfigure tzdata" to fix it.
Re: Setting clock on pink pogoplug
July 13, 2011 08:31PM
TZ is setup correctly

When I run date:

root@debian:~# date
Wed Dec 31 19:08:13 EST 1969


I ran NTP manually and used ntpd, date never changed.
Re: Setting clock on pink pogoplug
July 13, 2011 09:07PM
ntp doesn't like large jumps in time. Instead, to set the clock initially run:
/etc/init.d/ntp stop
ntpdate-debian
/etc/init.d/ntp start
Re: Setting clock on pink pogoplug
July 14, 2011 08:19AM
Ah! You started ntpd manually so the init script (/etc/init.d/ntp) didn't run. The debian init script allows ntpd to update the clock the first time regardless of the time difference by using the -g option.
Re: Setting clock on pink pogoplug
July 23, 2011 02:48PM
Interesting… thanks I'll try that.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: