# Trouble with CMOS clock



## neilms (Jul 2, 2012)

Hello,

I have just installed freebsd FreeBSD on a few machines but *I* am having problems with one in particular. After it boots - sometimes before *I* even get the chance to login, *I* get the message about irrational time setting - there is NO way to set the clock in the BIOS.

How can *I* set the time?


----------



## wblock@ (Jul 2, 2012)

Please identify the make and model of that machine.  If there is no time setting in the BIOS, it's unusual.  Maybe a non-X86 system?


----------



## neilms (Jul 2, 2012)

The computer is a Compaq Armada E500 - an old style laptop.


----------



## wblock@ (Jul 3, 2012)

A Pentium III machine, last BIOS update in 2002.  The CMOS battery could be dead.  On machines of that era, a lot were soldered in, and replacing is probably not worth it.

I would plug it in, clear the CMOS from the BIOS, reset all the settings that are needed, then see if FreeBSD still complains about the clock.  If that fixes it, and it breaks again if the AC is disconnected for a while, then it is the CMOS battery.


----------



## SirDice (Jul 3, 2012)

If it still boots but the clock is crewed you can try setting it by hand and then installing net/openntpd. The clock needs to be within a few minutes, otherwise openntpd will fail to set the clock.


----------



## Beastie (Jul 3, 2012)

Or you can use the native ntpd(8) daemon with the *-gq* options. I have the same problem with an even older machine that can't remember the time/date at all anymore.


----------



## kpa (Jul 3, 2012)

This will do the same if added to /etc/rc.conf


```
ntpd_sync_on_start="YES"
```


----------



## Beastie (Jul 3, 2012)

Problem is timers on these machines may also not work well anymore so the time will not be updated correctly over time.
The rc.conf entries only work on startup (AFAIK).
The idea is to run the above command every x hours through cron(8).


----------

