On 05/02/15 16:39, Mark Rogers wrote:
I have a little (headless) ARM box running Debian with a built in clock module, but whose battery had died. On replacement the box failed to get an IP address via DHCP.
On investigation it appears that because the clock was "wrong" it couldn't perform DHCP queries ("Unable to setup timer"). I think "wrong" doesn't just mean inaccurate (it was claiming to be in 1928) but corrupt (hwclock reported corrupt registers).
The clock would get reset by a time server as soon as it got online, but without valid clock it couldn't get online to get the valid clock...
Anyone know any more about this or able to point to a general workaround for next time this happens?
All I have found (after the event) is here: http://www.solid-run.com/community/viewtopic.php?f=8&t=525 .. which confirms what I thought but doesn't really offer a solution (logging in to set the clock on a remote headless unit isn't particularly convenient!)
Mark
Well, I could be wrong but....
If it's on all the time, then there won't be a problem, as it will maintain it's own time (more or less), and if it drifts, you could always install NTPD (I think - Network Time Protocol Daemon which should keep time synced to a internet clock)
If it's rebooted frequently, then it will rely on the clock for its initial time. You'll just have to make sure it's got a decent battery all the time.
If it's rebooted only occasionally, and it fails as described while you're there, replacing the battery, then simply setting the date/time at a prompt should be sufficient to get it to reboot and get an IP address etc.
Steve