Hi all, I am having an issue with some older CentOS 5.3 servers. Every time the server boots, it gives the error "Cannot access the hardware clock by any known method", and then promptly sets the time 5 hours behind the hardware clock, down to the second. After the system is up. "hwclock" works fine. hwclock --debug does not show any error at all. The hardware clock is configured in local time. /etc/sysconfig/clock is set to UTC=false and ZONE="America/Chicago". /etc/localtime is a copy of Chicago's zone file. /etc/adjtime is configured with "LOCAL" as the third row. I am at a loss as to what is causing this. Any assistance is appreciated! Thanks!
m.roth at 5-cent.us
2012-Aug-09 19:43 UTC
[CentOS] Strange issue with system time being off
Russell Jones wrote:> Hi all, > > I am having an issue with some older CentOS 5.3 servers. Every time > the server boots, it gives the error "Cannot access the hardware clock > by any known method", and then promptly sets the time 5 hours behind > the hardware clock, down to the second. >So, it's obviously setting it to GMT.> After the system is up. "hwclock" works fine. hwclock --debug does not > show any error at all. > > The hardware clock is configured in local time. /etc/sysconfig/clock > is set to UTC=false and ZONE="America/Chicago". /etc/localtime is a > copy of Chicago's zone file. /etc/adjtime is configured with "LOCAL" > as the third row. I am at a loss as to what is causing this. > > Any assistance is appreciated! Thanks!Wonder if there's some permission or ownership problem.... You might also check in the BIOS, if some protection is turned on. mark
On Aug 9, 2012, at 12:33 PM, Russell Jones wrote:> Hi all, > > I am having an issue with some older CentOS 5.3 servers. Every time > the server boots, it gives the error "Cannot access the hardware clock > by any known method", and then promptly sets the time 5 hours behind > the hardware clock, down to the second. > > After the system is up. "hwclock" works fine. hwclock --debug does not > show any error at all. > > The hardware clock is configured in local time. /etc/sysconfig/clock > is set to UTC=false and ZONE="America/Chicago". /etc/localtime is a > copy of Chicago's zone file. /etc/adjtime is configured with "LOCAL" > as the third row. I am at a loss as to what is causing this. > > Any assistance is appreciated! Thanks!---- Chicago is GMT +5 if I recall correctly so it would seem that perhaps a previous install used UTC=true to set the hwclock after you get the time set (date -s "08/09/2012 14:54:00" or whatever) then set the hwclock to system time hwclock --systohc Craig
on 8/9/2012 12:33 PM Russell Jones spake the following:> Hi all, > > I am having an issue with some older CentOS 5.3 servers. Every time > the server boots, it gives the error "Cannot access the hardware clock > by any known method", and then promptly sets the time 5 hours behind > the hardware clock, down to the second. > > After the system is up. "hwclock" works fine. hwclock --debug does not > show any error at all. > > The hardware clock is configured in local time. /etc/sysconfig/clock > is set to UTC=false and ZONE="America/Chicago". /etc/localtime is a > copy of Chicago's zone file. /etc/adjtime is configured with "LOCAL" > as the third row. I am at a loss as to what is causing this. > > Any assistance is appreciated! Thanks! >Since you say "servers" do you have one that you can bring more current then 5.3 to see if there was a kernel patch or something that fixed this? Between 5.3 and Current (5.8) anything could have happened.
On 08/09/2012 02:33 PM, Russell Jones wrote:> Hi all, > > I am having an issue with some older CentOS 5.3 servers. Every time > the server boots, it gives the error "Cannot access the hardware clock > by any known method", and then promptly sets the time 5 hours behind > the hardware clock, down to the second. > > After the system is up. "hwclock" works fine. hwclock --debug does not > show any error at all.Apparently something is amiss in the initramfs preventing access to the rtc, and once the real root filesystem is mounted, rtc access works. I'm not sure where to look or how an error might have crept in, but when I unpack my initramfs on a couple of systems (it's a compressed cpio archive) and grep for "rtc", I find: ./etc/modprobe.d/dist.conf:alias char-major-10-135 rtc ./etc/udev/rules.d/50-udev-default.rules:SUBSYSTEM=="rtc", DRIVERS=="rtc_cmos", SYMLINK+="rtc" -- Bob Nichols "NOSPAM" is really part of my email address. Do NOT delete it.
Leonard den Ottolander
2012-Aug-10 12:09 UTC
[CentOS] Strange issue with system time being off
Hello Russell, On Thu, 2012-08-09 at 14:33 -0500, Russell Jones wrote:> After the system is up. "hwclock" works fine. hwclock --debug does not > show any error at all.Have you tried adding --debug to CLOCKFLAGS in rc.sysinit to see if it reports anything for the first invocation? Regards, Leonard. -- mount -t life -o ro /dev/dna /genetic/research
On 08/09/2012 12:33 PM, Russell Jones wrote:> The hardware clock is configured in local time. /etc/sysconfig/clock > is set to UTC=false and ZONE="America/Chicago".What other settings are in that file? The system is treating your hardware clock as if it were UTC. Actually setting it to UTC is probably the easiest fix (and possibly the best one).