[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

SOLVED: clock resets on reboot



Figured it out:  no kernel build, no new battery.  At some point I had acquired an
/etc/adjtime file that was wrong, and /etc/init.d/hwclock.sh was kindly adjusting and
resetting my clock for me every time I entered runlevels 0 or 6.  The solution was:

# hwclock --set --date="now" ; hwclock --hctosys
# rm /etc/adjtime
# reboot

The reboot wasn't really necessary, but I wanted to check and don't have much of an uptime
investment at the moment anyway.  There is more information in man hwclock; search for
"adjtime".

Wade, if this doesn't work for you, post your differences to the list and we'll help you
out.

Rob

John Foster wrote:

> Rob Mahurin wrote:
> >
> > John Foster wrote:
> >
> > > Most modern Motherboards have a small rechargeable battery on them that
> > > hold enough power to keep the hardware clock set to the correct time,
> > > when the system is powered off. It appears that your battery is
> > > degrading and may need to be replaced.
> >
> > But it's right when it boots:  if I hit F1 and check in the CMOS before lilo loads,
> > the clock is accurate.  If I go into Windows through lilo, the clock is accurate
> > there.  But when I load a linux kernel, it gets reset.  (rebuilding a kernel from
> > scratch is on my list of things to do today now.)  That's why I didn't think initally
> > that it was the battery.  Would a dying battery cause this kind of behavior?
> _____________________________________________________________
> NO! I assumed that the problem was universal regardless of OS. Since
> that is not the case you are correct to compile a new kernel.
>
> --
> John Foster
> AdVance-Computing Systems
> jfoster@augustmail.com



--
"Keyboard not detected.  Press F4 to reboot."



Reply to: