View previous topic :: View next topic |
Author |
Message |
Morimando Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/133512159642cd2efa529a4.jpg)
Joined: 14 Feb 2005 Posts: 339 Location: Germany
|
Posted: Sun Feb 27, 2005 1:33 pm Post subject: System clock? [solved] |
|
|
Hm it's not a majoy issue that i'm bothering you with, it's just the following:
My system clock is about 5 minutes after "real time", so i set it to the right time by running (as root)
Code: |
netdate -v time.fu-berlin.de
|
Everything working correctly until this point, but when i restart, the clock is set back to the wrong time. So my question is: how do i get Gentoo to save the time to the onboard-clock? It's just enerving setting the correct date/time after every restart..
thanks folks ![Wink ;)](images/smiles/icon_wink.gif) _________________ That young girl is one of the least benightedly unintelligent organic life forms it has been my profound lack of pleasure not to be able to avoid meeting.
-- Marvin
Last edited by Morimando on Sun Feb 27, 2005 4:06 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
frary Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_nibbler.gif)
Joined: 27 Jan 2004 Posts: 545
|
Posted: Sun Feb 27, 2005 1:53 pm Post subject: |
|
|
Have a look at ntp...sets the time by typing
Code: | ntpdate pool.ntp.org |
or you can let it check and correct your time at startup ( by adding to default runlevel ).
Works quite nice here...
T _________________ Mitleid bekommt man geschenkt;
Neid muss man sich hart erarbeiten!
I.Walter |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
nephros Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/145383245043ee5edfbdaa3.png)
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Sun Feb 27, 2005 2:03 pm Post subject: |
|
|
The "clock" init script should automatically save and restore the system clock to the hardware clock at each shutdown/boot.
Make sure you have /sbin/hwclock (from sys-apps/util-linux) installed and working.
"hwclock --systohc" and "hwclock --hctosys" can be used to do this manually. _________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Earthwings Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/49753421747790001d409d.png)
Joined: 14 Apr 2003 Posts: 7753 Location: Germany
|
Posted: Sun Feb 27, 2005 2:25 pm Post subject: |
|
|
Also keep an eye on /etc/adjtime and the --noadjfile option of hwclock. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Morimando Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/133512159642cd2efa529a4.jpg)
Joined: 14 Feb 2005 Posts: 339 Location: Germany
|
Posted: Sun Feb 27, 2005 2:54 pm Post subject: |
|
|
Am i a dumbass?
"There are no ebuilds that could satisfy hwclock" _________________ That young girl is one of the least benightedly unintelligent organic life forms it has been my profound lack of pleasure not to be able to avoid meeting.
-- Marvin |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
manny15 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Mortal Kombat/Mortal_Kombat_-_Cyrax.gif)
Joined: 01 Dec 2002 Posts: 473 Location: USA
|
Posted: Sun Feb 27, 2005 3:35 pm Post subject: |
|
|
Morimando wrote: | Am i a dumbass?
"There are no ebuilds that could satisfy hwclock" |
Well, hwclock is in the sys-apps/util-linux ebuild.
I've had similar issues, but I set the time locally, instead of using a server. But anyway, try setting the clock to the correct time like you usually do. Remove the file /etc/adjtime. Then, run , which should set the hardware clock to the current system time. When you reboot, hopefully your system time will be correct.
You don't need to have /etc/init.d/clock sync the hardware clock to the system time upon shutdown, only during boot. The /etc/adjtime file is supposed to make adjustments for hardware clock time drift. But if it's misconfigured, it will incorrectly set your system time when gentoo boots. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Morimando Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/133512159642cd2efa529a4.jpg)
Joined: 14 Feb 2005 Posts: 339 Location: Germany
|
Posted: Sun Feb 27, 2005 4:06 pm Post subject: |
|
|
thanks that was what i wanted to know also thanks to all others ![Smile :)](images/smiles/icon_smile.gif) _________________ That young girl is one of the least benightedly unintelligent organic life forms it has been my profound lack of pleasure not to be able to avoid meeting.
-- Marvin |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|