1 |
On 2013-01-17, Stroller <stroller@××××××××××××××××××.uk> wrote: |
2 |
> |
3 |
> On 16 January 2013, at 16:43, Grant Edwards wrote: |
4 |
> |
5 |
>> I'm having problems with one of my Gentoo systems who's motherboard |
6 |
>> clock is a little slow. When the system comes up, the system time is |
7 |
>> set from the motherboard clock. If that's slow, something in the init |
8 |
>> system seems to panic because some file or other has a timestamp in |
9 |
>> the future. |
10 |
> |
11 |
> You've had lots of other suggestions here, but I think this is |
12 |
> handled fine if you add ntp to the default runlevel (and assuming the |
13 |
> system can connect to the net). |
14 |
|
15 |
It doesn't help problems that occur before ntpd has started and had a |
16 |
chance to slew the clock. By default, ntpd doesn't seem to want to do |
17 |
a step correction to fix large clock errors on startup (there's |
18 |
probably an option for that). |
19 |
|
20 |
FWIW, I recently identified one rather obscure CMOS-clock-related |
21 |
problem scenario (this isn't what happened the other day, but it did |
22 |
waste about half a day a few months back): |
23 |
|
24 |
1) Your CMOS clock is ahead of the "real" time by several hours for |
25 |
some reason. There are a number of ways this can happen: |
26 |
dual-booting between systems that disagree over UTC vs localtime |
27 |
for the CMOS clock, broken ntpd config, mismanaged timezone |
28 |
settings, etc. |
29 |
|
30 |
2) Kernel comes up and sets system time from CMOS clock. |
31 |
|
32 |
3) Root filesystem gets fsck'ed because it's been mounted 28 times, |
33 |
and filesystem meta-data gets timestamp that is actually several |
34 |
hours in the future. |
35 |
|
36 |
4) System reboots after fsck is finished. |
37 |
|
38 |
5) Before the recently fsck'ed filesystem gets mounted, the CMOS |
39 |
clock gets reset to the correct time (by dual booting, booting |
40 |
from a rescue CD, or by simply running the BIOS setup and fixing |
41 |
it). |
42 |
|
43 |
6) The system boots again, and when it tries to mount the root |
44 |
filesystem, the filesystem meta-data has a timestamp that's in the |
45 |
future so the ext3 code in the kernel refuses to mount it. |
46 |
|
47 |
7) You futz around verifying that you have a good root fs backup, |
48 |
looking at S.M.A.R.T logs and all sorts of other irrelevant things |
49 |
for several hours trying to figure out what's wrong. |
50 |
|
51 |
8) The universe catches up to the filesystem meta-data timestamp, and |
52 |
suddenly, mysteriously, everything works fine. |
53 |
|
54 |
-- |
55 |
Grant Edwards grant.b.edwards Yow! You mean you don't |
56 |
at want to watch WRESTLING |
57 |
gmail.com from ATLANTA? |