Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
timestamp problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
tliou
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2004
Posts: 86
Location: Salt Lake City, UT

PostPosted: Wed Mar 27, 2013 5:30 am    Post subject: timestamp problem Reply with quote

Hi,

I have a new build of gentoo with 3.7.10. Things were going well until I noticed that my emails were being sent from the future. I had put in the wrong date by a month when setting up the system using the date command. Resetting the date to the correct one using the date command worked fine, but the next time I started the system, the hard disks would not mount, my machine had an unknown name and dhcpcd could not pull an IP address from my dhcp server. Resetting the date back to the future restored the machine to running perfectly except that I am now a month ahead again.

I tried using the touch command to reset various config files but that did not work.

Any suggestions where I have to make a correction?

Thanks
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6250
Location: Goose Creek SC

PostPosted: Wed Mar 27, 2013 2:29 pm    Post subject: Reply with quote

boot to bios, check time, boot cd, check time, fsck gentoo partitions, mount gentoo partitions, run
Code:
find /mnt/gentoo -exec touch {} \;
will reset all file times to current time. good luck, I've not done this for whole system, but in theory
_________________
Defund the FCC.
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 3782

PostPosted: Wed Mar 27, 2013 3:35 pm    Post subject: Reply with quote

In mv-perl on the mv-overlay, there is a script called "touch.difference" (you can also download it directly). If you use that in the prevoius command instead of touch (with the option --sub=...) then ... seconds are subtracted from every filestamp (so you substitute e.g. ...= 259200 to make files one month younger). This should be more reliable than making all files of equal age. However, I do not give any guarantees, either: Especially the first time when you reboot there will be problems anyway, since openrc will be confused about the dates.
Back to top
View user's profile Send private message
tliou
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2004
Posts: 86
Location: Salt Lake City, UT

PostPosted: Thu Mar 28, 2013 5:19 am    Post subject: Reply with quote

Thanks. Will give it a shot and report back.
Back to top
View user's profile Send private message
tliou
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2004
Posts: 86
Location: Salt Lake City, UT

PostPosted: Tue Apr 02, 2013 4:56 am    Post subject: Reply with quote

I'm afraid I chickened out of either of the global commands. I thought that I should back everything up just in case something unexpected should happen because it didn't look like there might be an easy way back if something went wrong. Compared to backing everything up, though, it seemed like it was a lot less risk to just back the date up with the date command one day at a time with a reboot between each reset. I'm sure there are easier ways, but the work of backing everything up to address the risk of something going wrong seemed like a lot more work than just issuing the date command and reboot 30 times.

Thanks though.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum