View previous topic :: View next topic |
Author |
Message |
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Thu Feb 14, 2013 6:19 am Post subject: Time settings not preserved on reboot. [SOLVED] |
|
|
I used the wiki http://en.gentoo-wiki.com/wiki/Time_Synchronization to synchronize my box with a time server. I opted for rdate. It will set and I did add it to the default runlevel as instructed but whenever I reboot itdefaults back to another time. Any ideas? Am I missing something obvious?
Last edited by Budoka on Tue Mar 26, 2013 3:31 am; edited 1 time in total |
|
Back to top |
|
|
PabloEsc n00b
Joined: 24 Dec 2009 Posts: 40
|
Posted: Thu Feb 14, 2013 6:32 am Post subject: |
|
|
You probably need to set
Code: |
clock_systohc="YES"
|
in /etc/conf/hwclock |
|
Back to top |
|
|
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Fri Feb 15, 2013 12:35 am Post subject: |
|
|
PabloEsc wrote: | You probably need to set
Code: |
clock_systohc="YES"
|
in /etc/conf/hwclock |
/etc/conf/ doesn't exist on my system but I found hwclock in /etc/conf.d/hwclock. Also in /sbin and /etc/init.d.
I uncommented Code: | clock_systohc="YES" | in /etc/conf.d/hwclock,http://bpaste.net/show/77361/, rebooted, and the behaviour hasn't changed. Any other ideas? |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Fri Feb 15, 2013 1:10 am Post subject: |
|
|
Jaglover wrote: | Can you use hwclock utility to read and write hardware clock, does it work? |
No the hwclock utility doesn't sem to work. It kicks out the following error:
Quote: | hwclock --debug
hwclock from util-linux 2.21.2
hwclock: Open of /dev/rtc failed: No such file or directory
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.
|
However, and I am not sure if these are mutually exclusive, I used rdate as outlined on http://en.gentoo-wiki.com/wiki/Time_Synchronization#rdate and Code: | Print the retrieved time:
rdate -p ptbtime1.ptb.de
Synchronize the system clock with the retrieved time:
rdate -s ptbtime1.ptb.de
| work without any problem. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Sat Feb 16, 2013 1:17 pm Post subject: |
|
|
Jaglover wrote: | Code: | cat /sys/devices/system/clocksource/clocksource0/available_clocksource |
This will tell you what clocksources are available. |
[/quote]cat /sys/devices/system/clocksource/clocksource0/available_clocksource
tsc hpet acpi_pm
Quote: |
So what do I do next? |
|
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
floppymaster Developer
Joined: 07 Jul 2010 Posts: 229 Location: Detroit, MI, USA
|
Posted: Sat Feb 16, 2013 5:01 pm Post subject: |
|
|
Try enabling CONFIG_RTC_DRV_CMOS in your kernel config. That will expose the hardware clock present on most PC systems. |
|
Back to top |
|
|
Budoka l33t
Joined: 03 Jun 2012 Posts: 777 Location: Tokyo, Japan
|
Posted: Sun Feb 17, 2013 2:39 am Post subject: |
|
|
floppymaster wrote: | Try enabling CONFIG_RTC_DRV_CMOS in your kernel config. That will expose the hardware clock present on most PC systems. |
That did the trick. Thanks.
Not sure why RTC wasn't compiled in the kernel given that I followed the guide but it is all sorted out now. |
|
Back to top |
|
|
|