LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-11-2013, 02:21 AM   #1
Cosmo_dub
LQ Newbie
 
Registered: Oct 2013
Posts: 3

Rep: Reputation: Disabled
Time always wrong on reboot


Hello all
I´ve been trying lately to fix a problem with my company´s computer server, unfortunately with no success. I am not a computer specialist, and after several failed attempts to fix it, I don´t know what else I may try.

Well, this server runs with Debian GNU/Linux 4.0 (Etch) , and kernel version 2.6.18-4-k7.
No dual boot with Windows.
The problem is related with the HW clock. It seems that it is not working properly.
Every time I reboot the computer, the system keeps always the same date, that is, the last one I introduced from the BIOS menu.
So, the problem is: when I modify the HW clock from the BIOS using the real time, the system will copy it to the system clock and keeps that date with every reboot!!

Any attempt to change the HW clock from the command line using commands like hwclock is unsuccessful. Neither, the system replies nor changes are made whatsoever.
I am going to explain every step I've tried so far to fix the problem:

1) Change the BIOS battery.

It seems logical that, since there is no response from the HW clock, the problem must be related with the battery of the BIOS. Alas, I have changed it twice and it didn´t change anything.

2) Use the hwclock and date commands

When typing the command:

hwclock –show

the system returns the following message:

“ Select() to /dev/rtc to wait or clock tick timed out”

I´ve read in several forums that the solution is to remove the rtc module.
I did it using the following commands:

rmmod rtc
echo “blacklist rtc” >> /etc/modprobe.d/own-blacklist.conf

Then I rebooted the computer and typed the command:

hwclock --debug

With the following answer:

Hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
Using direct I/O instructions to ISA clock.
Last drift adjustment done at xxxx seconds after 1969.
Last calibration done at yyyy seconds after 1969.
Hardware clock is on local time.
Assuming hardware clock is kept in local time.
Waiting for clock tick…
… got clock tick


It seems that the hwclock is "working", but that is just an illusion, because typing afterwards the commands:

hwclock --show, hwclock –-systohc or hwclock –-hctosys

No replies, no changes, nothing comes from the computer. In fact since the hwclock command does not give any reply, I have no means to guess what the problem is.
On the other hand, the command date works fine, and allows me to change the system time although at this moment it is useless to me.

3) Other modules.

No success using other modules like:

modprobe genrtc
hwclock –show
rmmod genrtc
modprobe rtc
hwclock –show
rmmod rtc

4) NTP time update service.
My server uses the ntp service but it does not update the system time because it is behind a proxy.

I checked it typing the command:

ntpq -p

It detects that the server is connected to my company service provider. Using the ntptrace command, it returns a message saying that there is synchronization with the server but also indicating stratum 16. I think it means: "This server is not considered a time provider".
I believe that, as the server is behind a proxy, I cannot update the time using external servers as pool.ntp.org, right?

And that´s all.

I haven´t found any clue, and after Googling a lot, I just can find some BIOS battery related issues. I discarded them after replacing it twice, so now I have no idea how to fix the problem.. ???

I would appreciate any help / idea / clue which could shed some light to find the solution before getting mad!!
Thanks in advance
 
Old 10-11-2013, 02:28 AM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
The presence of the 1969 date would imply that the hwclock is stuck at zero (00:00:00 January 1, 1970 UTC as I recall).

I was going to suggest changing the cmos battery, but I see you did that.

After re-reading your post I suspect the hardware itself might be bad - the silicon. If so there is probably not much you can with it other than set the system time after reboot and let the kernel and NTP keep it good until power off - then reset it on reboot.

Last edited by astrogeek; 10-11-2013 at 02:30 AM. Reason: typos
 
1 members found this post helpful.
Old 10-11-2013, 08:54 AM   #3
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
um, hate to ask, but did you update your BIOS time after you replaced the battery?
 
Old 10-11-2013, 09:09 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Depends on how old this server is. Some RTC's are a module that might be possible to change.

I assume you put the new battery in correctly. You may have to remove battery, power to system and press power button a few times. Then replace battery and then power it back up.

Newer clock's have an oscillator that might have gone bad. Maybe even a jumper on the board to enable it.

It may be possible to enable ntp on a router or modem or other computer within the lan.
 
1 members found this post helpful.
Old 10-25-2013, 04:05 AM   #5
Cosmo_dub
LQ Newbie
 
Registered: Oct 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you for your support!
As it seems that I have a Hardware problem with the server, I am going to switch the damaged board for a spare one.
I will tell you soon if that is the key to solve my problem!!
 
Old 10-25-2013, 09:28 AM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
Also, most computers these days are set up to obtain their time from a network time-server, which in turn obtains its time-reference from nist.gov or somesuch. Usually, you want every computer on the local network to have an exactly-synchronized clock.

Last edited by sundialsvcs; 10-25-2013 at 09:35 AM.
 
Old 11-07-2013, 07:01 AM   #7
Cosmo_dub
LQ Newbie
 
Registered: Oct 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Finally It was a hardware problem. I changed the main board and everything went fine.
Thanks to everybody for the support.
 
Old 11-10-2013, 02:09 PM   #8
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by Cosmo_dub View Post
Finally It was a hardware problem. I changed the main board and everything went fine.
Thanks to everybody for the support.
Glad you got it going, glad to help!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
syslog time wrong - but date returns the correct time? falc410 Linux - Newbie 7 04-05-2020 10:04 PM
[SOLVED] hwclock (BIOS): time set wrong during shutdown and also reboot. JZL240I-U Linux - Hardware 14 11-18-2010 01:57 AM
Fedora 9: time always wrong after reboot Dims Linux - Newbie 7 07-15-2009 11:49 PM
my time is wrong and calender is also wrong Paxmaster Linux - General 6 12-16-2004 12:46 AM
Setting System Time: kernel in wrong time zone warrenweiss Linux - General 7 05-15-2004 03:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration