Saturday, March 15, 2008

 

system clock in debian linux (clock delay)

I had a clock delay on my debian system (+1 hour). It was ok since I ran ntpd, but when I had no internet connection, I still got this time gap. The problem is that whenever I tried to change the clock (through ntpdate or rdate), any changes were lost after reboot. My clock delay came back.

Pretty annoying, especially since I wanted to replace ntpdate package (synchronizing clock at every startup !) with rdate package (clock synchronization on demand through "sudo rdate -n pool.ntp.org").

I had correctly set the timezone ("sudo dpkg-reconfigure tzdata")

At startup, I also had this annoying msg during boot process:
Setting system clock: ... dev/rtc()... hwclock.sh
* Unable to set system clock to ...

If this happens to you (clock changes lost after reboot + error msg at startup):
1: in both /etc/init.d/hwclock.sh AND /etc/init.d/hwclockfirst.sh, replace "HWCLOCKPARS=" with "HWCLOCKPARS=--directisa"
2: save your changes
3: update your clock (with "sudo date" or better, with rdate package: "sudo rdate -n pool.ntp.org")
4: reboot !
That's it. Your clock should have the correct time (try "date" when logged in) and the error msg during boot time should be gone.
It worked for me.

src: http://ubuntuforums.org/showthread.php?t=594031
http://groups.google.nl/group/linux.debian.user/browse_thread/thread/649e6847e08de6cf

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?