View previous topic :: View next topic |
Author |
Message |
tliou Tux's lil' helper
Joined: 23 Nov 2004 Posts: 108 Location: Salt Lake City, UT
|
Posted: Wed Mar 27, 2013 5:30 am Post subject: timestamp problem |
|
|
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 |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Wed Mar 27, 2013 2:29 pm Post subject: |
|
|
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 |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Wed Mar 27, 2013 3:35 pm Post subject: |
|
|
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 |
|
|
tliou Tux's lil' helper
Joined: 23 Nov 2004 Posts: 108 Location: Salt Lake City, UT
|
Posted: Thu Mar 28, 2013 5:19 am Post subject: |
|
|
Thanks. Will give it a shot and report back. |
|
Back to top |
|
|
tliou Tux's lil' helper
Joined: 23 Nov 2004 Posts: 108 Location: Salt Lake City, UT
|
Posted: Tue Apr 02, 2013 4:56 am Post subject: |
|
|
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 |
|
|
|