Subject: Re: where does time come from?
To: James K. Lowden <jklowden@schemamania.org>
From: Perry E. Metzger <perry@piermont.com>
List: netbsd-help
Date: 09/25/2002 10:10:58
"James K. Lowden" <jklowden@schemamania.org> writes:
> > > Is the TOD clock initialized from time information on the root
> > > filesystem, or is it possible my system was compromised and tampered
> > > with?  
> > 
> > See sys/arch/i386/isa/clock.c::inittodr()
> > 
> > Did you ignore the following boot message?
> > 
> >                 printf("WARNING: clock time much less than file system
> >                 time\n"); printf("WARNING: using file system time\n");
> 
> Well, no, not as far as I can tell:
> 
> # zcat /var/log/messages.* |grep WARN
> Sep 24 06:10:56 home root: WARNING: /etc/sendmail.cf not readable; 
> sendmail not started.
> # cat /var/log/messages |grep WARN

Ah, no. this is a printf, not a syslog. That has to be because it runs
before there is even a disk drive mounted to log *to*. inittodr is run
really early in the life of the machine. You could find this in your
dmesg but not in /var/log messages. I'd tell you to look in dmesg.boot
but that file was a post 1.4 invention I believe.

Of course, after inittodr is run, the CMOS clock is never read
again on a machine like yours, so this can only be seen the once
during boot.

> The machine itself is quite new; I doubt the battery is shot.

You said it was a rattletrap and it is running 1.4.x -- that doesn't
seem "quite new" to me -- and what you describe is precisely the
symptom of a dead CMOS battery. Anyway, have a look at your dmesg or
try rebooting the machine and let us know.

-- 
Perry E. Metzger		perry@piermont.com