From owner-freebsd-questions@FreeBSD.ORG Mon Jul 14 17:24:18 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 57FEA37B401 for ; Mon, 14 Jul 2003 17:24:18 -0700 (PDT) Received: from grumpy.dyndns.org (user-24-214-34-52.knology.net [24.214.34.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5347743FA3 for ; Mon, 14 Jul 2003 17:24:17 -0700 (PDT) (envelope-from dkelly@grumpy.dyndns.org) Received: from grumpy.dyndns.org (localhost [127.0.0.1]) by grumpy.dyndns.org (8.12.9/8.12.9) with ESMTP id h6F0OGDh059931 for ; Mon, 14 Jul 2003 19:24:16 -0500 (CDT) (envelope-from dkelly@grumpy.dyndns.org) Received: from localhost (localhost [[UNIX: localhost]]) by grumpy.dyndns.org (8.12.9/8.12.9/Submit) id h6F0OFFu059930 for FreeBSD-Questions@FreeBSD.org; Mon, 14 Jul 2003 19:24:15 -0500 (CDT) From: David Kelly To: FreeBSD-Questions@FreeBSD.org Date: Mon, 14 Jul 2003 19:24:15 -0500 User-Agent: KMail/1.5.2 References: <20030714231604.GA27924@teddy.fas.com> In-Reply-To: <20030714231604.GA27924@teddy.fas.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200307141924.15522.dkelly@HiWAAY.net> Subject: Re: Seting the hardware clock X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2003 00:24:18 -0000 On Monday 14 July 2003 06:16 pm, stan wrote: > ;m struggling with getting the hardware clock (BIOS clock) equal to > the kernels time. > > On my Linux boxes a utility called hwclock is run on the way down to > synchronize the 2. > > The problem I'm running into is that if the time on the system gets > to far out of date for ntpd to bring it into synch, then I can update > the kernels clock with ntpdate. But when I reboot the old incorrect > time comes back. > > I ran into this during some software testing, that required setting > the clock pretty far off of real time, and it was a PIA to get the > machine back to the correct time. > > How _should_ this be handled? adjkerntz(8) holds the key to synchronizing kernel and BIOS/CMOS clock time. As for your kernel clock not holding good time, there are ways to correct that too. Ntpd can not keep the popular Soekris boards (based on AMD Elan SC520) in sync without tuning the time standard used in the kernel. Forgot if it gains or loses 4 to 5 minutes per day without mod. Because you are having problems keeping time, and other problems writing time, there may be something odd about your motherboard. Maybe there is something to protect the CMOS clock from being written to? Some sort of BIOS virus protection? Another thing we saw with Soekris and FreeBSD 4.x was that FreeBSD wrote Sunday as 0 but would accept 0 or 7 on read, Soekris clock hardware was happy with 0, but BIOS demanded 7 else it assumed the clock was corrupt and reset its time to Jan 1, 1980. This only mattered if you rebooted on Sunday. Its a 2 byte patch to FreeBSD 4.x, already included in 5.x. -- David Kelly N4HHE, dkelly@hiwaay.net ===================================================================== The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system.