How to make NTP work despite a high offset?

Recently I have kickstarted some servers that had their time off by a month in the bios. The time in the bios said it was a random time/date in May, while it was June.

This caused NTP not to work, because NTP doesn't sync with such a high offset. How can I make sure that NTP syncs despite the offset, in this case a month, being too high?


Solution 1:

See -g option for ntpd; set in /etc/sysconfig/ntpd. (IMO, running both ntpd and ntpdate is distasteful.)

Solution 2:

For EL5 and EL6:

Start ntpdate as well.

It should be sufficient to enable them in your kickstart.

%post
chkconfig ntpdate on
chkconfig ntpd on

Solution 3:

Running the following from the command line should force an update despite any time difference.

ntpd -gq