1 |
Florian Philipp <lists@×××××××××××.net> [12-02-06 20:00]: |
2 |
> Am 06.02.2012 19:39, schrieb meino.cramer@×××.de: |
3 |
> > Michael Mol <mikemol@×××××.com> [12-02-06 19:20]: |
4 |
> >> On Mon, Feb 6, 2012 at 12:51 PM, <meino.cramer@×××.de> wrote: |
5 |
> >>> Hi, |
6 |
> >>> |
7 |
> >>> to get the correct system time I use ntp-client in the boot process. |
8 |
> >>> Furthermore in /etc/conf.d/hwclock I set: |
9 |
> >>> |
10 |
> >>> # Set CLOCK to "UTC" if your Hardware Clock is set to UTC (also known as |
11 |
> >>> # Greenwich Mean Time). If that clock is set to the local time, then |
12 |
> >>> # set CLOCK to "local". Note that if you dual boot with Windows, then |
13 |
> >>> # you should set it to "local". |
14 |
> >>> clock="UTC" |
15 |
> >>> |
16 |
> >>> # If you want to set the Hardware Clock to the current System Time |
17 |
> >>> # (software clock) during shutdown, then say "YES" here. |
18 |
> >>> # You normally don't need to do this if you run a ntp daemon. |
19 |
> >>> clock_systohc="YES" |
20 |
> >>> |
21 |
> >>> # If you want to set the system time to the current hardware clock |
22 |
> >>> # during bootup, then say "YES" here. You do not need this if you are |
23 |
> >>> # running a modern kernel with CONFIG_RTC_HCTOSYS set to y. |
24 |
> >>> # Also, be aware that if you set this to "NO", the system time will |
25 |
> >>> # never be saved to the hardware clock unless you set |
26 |
> >>> # clock_systohc="YES" above. |
27 |
> >>> clock_hctosys="NO" |
28 |
> >>> |
29 |
> >>> # If you wish to pass any other arguments to hwclock during bootup, |
30 |
> >>> # you may do so here. Alpha users may wish to use --arc or --srm here. |
31 |
> >>> clock_args="" |
32 |
> >>> |
33 |
> >>> In the kernel config file I had set: |
34 |
> >>> |
35 |
> >>> CONFIG_RTC_HCTOSYS=y |
36 |
> >>> CONFIG_RTC_HCTOSYS_DEVICE="rtc0" |
37 |
> >>> |
38 |
> >>> I would exspect that after a reboot of the system which system time is |
39 |
> >>> correctly set via ntp-client that the hwclock and system time only |
40 |
> >>> differ in a small amount of time. |
41 |
> >>> |
42 |
> >>> But: |
43 |
> >>> solfire:/home/mccramer>hwclock |
44 |
> >>> Mon Feb 6 19:05:11 2012 -0.172569 seconds |
45 |
> >>> solfire:/home/mccramer>date |
46 |
> >>> Mon Feb 6 18:49:37 CET 2012 |
47 |
> >>> solfire:/home/mccramer> |
48 |
> >> |
49 |
> >> I don't know the CET tz, but I can see that the minutes don't match |
50 |
> >> up. I assume you rand the two commands within seconds of each other. |
51 |
> >> Is this true immediately after bootup, or does it take a while to get |
52 |
> >> that far off? It could be that your hardware clock is drifting, and |
53 |
> >> the system won't reset it until it goes to shutdown. |
54 |
> >> |
55 |
> >> -- |
56 |
> >> :wq |
57 |
> >> |
58 |
> > |
59 |
> > Hi Michael, |
60 |
> > thank you for your reply. |
61 |
> > I set the configuration as mentioned above and booted twice with about |
62 |
> > five minutes wait. |
63 |
> > The commands were executed within seconds, yes. |
64 |
> > All hardware clocks drifts, but this is not the problem. |
65 |
> > The problem is that the hardware clock is not set to the system time |
66 |
> > in contradiction to what I think the comments in the config are |
67 |
> > saying. |
68 |
> > |
69 |
> > How can I fix that? |
70 |
> > |
71 |
> > Thank you very much in advance for any help! |
72 |
> > Best regards, |
73 |
> > mcc |
74 |
> > |
75 |
> > |
76 |
> > |
77 |
> |
78 |
> Is your RTC driver compiled into the kernel? The "httosys" function of |
79 |
> the kernel takes place before any modules can be loaded and will fail if |
80 |
> your CMOS clock driver is a module. |
81 |
> |
82 |
> Activating clock_hctosys in /etc/conf.d/hwclock should solve this as it |
83 |
> takes place later in the boot process. |
84 |
> |
85 |
> Regards, |
86 |
> Florian Philipp |
87 |
> |
88 |
|
89 |
|
90 |
As I wrote the kernel is configured |
91 |
|
92 |
|
93 |
CONFIG_RTC_HCTOSYS=y |
94 |
CONFIG_RTC_HCTOSYS_DEVICE="rtc0" |
95 |
|
96 |
so there is no module, the functionality is compiled into the kernel. |
97 |
|
98 |
And as I wrote I am using the ntp_client to set the system time via |
99 |
ntp/ntp_client later in the boot process to get the correct system |
100 |
time. |