You are not logged in.

#1 2009-11-09 19:45:18

ac3raven
Member
Registered: 2009-09-28
Posts: 67

Arch linux time and date weirdness

A while back I unplugged my arch linux hard drive for a certain reason, and that froze the time on it, so I had to reset the time when i booted it back up.  Now, whenever I boot up I get an error message about "the last session is in the future" and I can't boot.  I adjusted the bios clock to a few months a ahead and that fixed it, but of course that's not a permanent solution.  because of this time error some secure sites like gmail and my online banking site are inaccessible because of invalid certificates.

How do i fix this problem?

Offline

#2 2009-11-09 20:25:21

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: Arch linux time and date weirdness

Normally the "...  in the future" message happens only at the first boot attempt - reboot and you should be able to proceed. Did that not work for you?


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#3 2009-11-10 03:40:23

ac3raven
Member
Registered: 2009-09-28
Posts: 67

Re: Arch linux time and date weirdness

nope.

Offline

#4 2009-11-10 09:18:07

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: Arch linux time and date weirdness

So is time still frozen on arch, or is it moving forward, but a few months ahead?

Did you already try to correct the time using ntpd?


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#5 2009-11-10 13:22:37

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Arch linux time and date weirdness

Remount r/w.
Delete /var/lib/hwclock/adjtime.
set correct date/time with date command.
Reboot.
Also, look into using openntpd for the future.

Offline

#6 2009-11-10 17:12:19

ac3raven
Member
Registered: 2009-09-28
Posts: 67

Re: Arch linux time and date weirdness

I installed openntpd but I have no idea what to do beyond that.

Offline

#7 2009-11-10 17:28:47

Primoz
Member
From: Ljubljana-Slovena-EU
Registered: 2009-03-04
Posts: 688

Re: Arch linux time and date weirdness

Well I have ntpd installed instead of openntpd. But I think it's the same thing. IF it won't work install ntpd instead...
Add openntpd and ntdate to /etc/rc.conf:

sudo nano /etc/rc.conf

Then scroll to bottom and add ntpdate and openntpd to daemons (in this order).
Then open rc.local

sudo nano /etc/rc.local

And add this in it:

/usr/bin/ntpdate *name of ntp server you want your computer synchronized with*

names can be found here
That should do it.

Last edited by Primoz (2009-11-10 17:29:26)


Arch x86_64 ATI AMD APU KDE frameworks 5
---------------------------------
Whatever I do, I always end up with something horribly mis-configured.

Offline

#8 2009-11-10 17:35:52

mjheagle8
Member
From: /home/mjheagle8
Registered: 2009-07-12
Posts: 186

Re: Arch linux time and date weirdness

you can force reset the time with

tune2fs -T now

a fsck usually works too.


Desktop/Laptop - DWM :: VM - screen
Registered Linux User Number 483137 :: Victory! :: GitHub

Offline

#9 2009-11-10 18:53:11

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: Arch linux time and date weirdness

openntpd is easier to use (from what I've heard). All you need to do is as root:

ntpd -s -d

and then watch the reported offset get into the vicinity of 0.1

Last edited by grey (2009-11-10 18:53:28)


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#10 2009-11-11 02:46:23

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Arch linux time and date weirdness

ac3raven wrote:

I installed openntpd but I have no idea what to do beyond that.

Wiki, wiki, wiki.

Offline

#11 2009-11-11 06:27:50

efeX
Member
Registered: 2009-11-06
Posts: 18

Re: Arch linux time and date weirdness

I was having this problem also, it was a matter of UTC/localtime

Offline

#12 2009-11-20 21:55:51

ac3raven
Member
Registered: 2009-09-28
Posts: 67

Re: Arch linux time and date weirdness

okay, I got ntpd to work well, but I still can't boot into the OS without having to change the BIOS clock.  There must be some kind of log that keeps the date and time of my boots.  Maybe if I clear that, I won't have to adjust the bios clock to avoid the "...in the future" issue.

Help?

Offline

#13 2009-11-20 23:45:57

Mardoct
Member
Registered: 2009-08-17
Posts: 208

Re: Arch linux time and date weirdness

This happened to me a few times, too. Windows kept setting the time ahead when I booted it a few hours.

1.Boot in with incorrect BIOS clock time in the future.
2.Change date with the date command.

date
<some output here>
date -set '<the current time and date in the exact format shown above>'

3.Reboot
4.???
5.Profit.


The human being created civilization not because of willingness but of a need to be assimilated into higher orders of structure and meaning.

Offline

#14 2009-11-21 02:54:35

k_ibou
Member
From: Costa Rica
Registered: 2009-06-09
Posts: 101

Re: Arch linux time and date weirdness

when you receive that message you will be prompt to enter you root password to solve the problem. And it give you the command.

So I recommend you:

1)  to set up the bios with the right date and hour.

2) boot to archlinux and do as I said above. You must read carefully the text, you will see a comand.

3) If you have more than one partition if probably that you must do it again for the partition that is set in future. Just copy the command and change / for that you need to repair.

4) when you boot to your DE do this in console: # date --set "Y/M/D h:m"

I think with that should be ok, you can check your rc.conf in the option of hardwareclock

Offline

#15 2009-11-23 16:01:12

ac3raven
Member
Registered: 2009-09-28
Posts: 67

Re: Arch linux time and date weirdness

k_ibou wrote:

when you receive that message you will be prompt to enter you root password to solve the problem. And it give you the command.

So I recommend you:

1)  to set up the bios with the right date and hour.

2) boot to archlinux and do as I said above. You must read carefully the text, you will see a comand.

3) If you have more than one partition if probably that you must do it again for the partition that is set in future. Just copy the command and change / for that you need to repair.

4) when you boot to your DE do this in console: # date --set "Y/M/D h:m"

I think with that should be ok, you can check your rc.conf in the option of hardwareclock

I tried both k_ibou's and Mardoct's solutions and neither worked.  I still get the the "...in the future" error upon booting.  I also tried one other solution, but apparently hwclock is not the same as BIOS clock.  I need to boot into Arch with the CORRECT time in the BIOS, so that I don't get that "future" error when I reboot.  I saw no command outside of "mount -o -n remount,rw /", which doesn't seem to actually do anything.

Offline

#16 2009-11-28 18:25:18

ac3raven
Member
Registered: 2009-09-28
Posts: 67

Re: Arch linux time and date weirdness

bump.  I still need help resolving this issue.

Offline

#17 2009-11-29 03:26:21

k_ibou
Member
From: Costa Rica
Registered: 2009-06-09
Posts: 101

Re: Arch linux time and date weirdness

actually you'll see nothing. You just reboot and if there is another partition that suffer that problem type the command but change the partition. Example: from / to  /home.

did you already check your rc.conf??? is in localtime or UTC

Offline

#18 2009-12-04 18:55:56

ac3raven
Member
Registered: 2009-09-28
Posts: 67

Re: Arch linux time and date weirdness

Okay, I was able to mount / and /home.  My rc.conf file says utc time.  I did notice that my hardware clock is always out of sync when I type in "hwclock" in the terminal.  And ntpd is listening on 127.0.0.1

still the "future" problem though.

Offline

#19 2009-12-06 20:11:27

vikramr
Member
Registered: 2009-09-22
Posts: 40

Re: Arch linux time and date weirdness

I also had this problem in my laptop but managed to resolve it. see if this works :

check /etc/rc.conf

the Linke should be localtime or UTC. In my case it was something else by default - i dont remember what it was
HARDWARECLOCK="localtime"


Another thing - the ntp only synchs the software clock. For some reason my hardware clock never used to synch so I also synch my hardware and software clock using cron. add this line while root after you type the command

crontab -e

06 * * * *  /usr/sbin/run-cron /sbin/hwclock --systohc

I know this isnt the best way but it works for me. I am not an expert and will welcome suggestions to solve this 'properly'

Offline

#20 2009-12-07 13:06:00

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: Arch linux time and date weirdness

Being forced to use localtime since I dual boot with XP, I've had this problem on every unexpected shutdown, so I changed "0 1" to "0 0" for all relevant partitions in fstab to skip the disk checks. It's seriously worth it.

Offline

#21 2009-12-07 16:02:01

ac3raven
Member
Registered: 2009-09-28
Posts: 67

Re: Arch linux time and date weirdness

In there no real solution this issue?  How is it even caused in the first place?

Offline

#22 2009-12-07 20:14:21

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: Arch linux time and date weirdness

I don't know if it's been mentioned, but I use openntpd:

http://wiki.archlinux.org/index.php/Net … l#OpenNTPD


Matt

"It is very difficult to educate the educated."

Offline

#23 2009-12-07 20:37:35

ac3raven
Member
Registered: 2009-09-28
Posts: 67

Re: Arch linux time and date weirdness

time syncs perfectly fine once I'm booted up, but to boot I have to change the bios to a date ahead of my previous boot time.  So, in order to boot, I have to constantly set my bios time further and further into the future.  I'm in the year 2013 right now.  If there is a way to stop the superblock from recording the time at which I boot, that would fix it.

Does anyone understand this issue?  It is no longer an issue of time syncing.  I just need to get the superblock to stop thinking that the last boot happened "in the future".

Offline

#24 2009-12-08 00:50:37

chilebiker
Member
From: Zurich, Switzerland
Registered: 2006-07-18
Posts: 161

Re: Arch linux time and date weirdness

I had a similar problem until I found out that after a fresh install in my /etc/rc.conf the variable HARDWARECLOCK was set to "local" instead of "localtime". Changing that solved all my time problems.


Don't panic!

Offline

#25 2009-12-08 04:10:11

QwertyManiac
Member
Registered: 2008-10-05
Posts: 6

Re: Arch linux time and date weirdness

If am right, it isn't a software issue at all. Your motherboard battery needs a replacement, how long has it been? If the BIOS time keeps resetting at each boot to a constant value (2008 January for me, as an example), it is definitely the CMOS battery mis-mounted or dead.

The superblock isn't in 'future', its probably correct (look at the times it shows for 'now' and 'last block' value). Its just that your system clock goes to the past and the FS checker sees this as a corruption.

This page has some details on how you can buy and replace that.

That's all I could deduce from similar problems I've had.

Offline

Board footer

Powered by FluxBB