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