Group: comp.os.linux.networking
From: =?UTF-8?B?w4BuZ2VsIENhdGFsw6A=?=
Date: Wednesday, April 09, 2008 5:45 AM
Subject: Re: Problem with Debian Etch and NTP

Chris Davies escribió:
> Àngel Català wrote:
>> I have tryed what you said, and when I typed "hwclock --show" I have got
>> that message, and for "hwclock --show --directisa" it has worked, so I
>> hacked /etc/default/rcS, but it still is failing.
>
> This is the underlying problem. Your OS can't read or set the clock
> correctly, so it can't correct for the two hours.
>
> All the NTP suggestions are quite likely just side issues, sadly, and for
> now I would strongly suggest you first address the underlying problem.
> Once that's done, NTP should just start working as you'd expect.
>
>
> To get the boot time sorted, you need to fiddle around with the hwclock
> command. My assumptions are (a) that you're two hours ahead of UTC, and
> (b) that your BIOS clock is running under local time rather than UTC.
>
> 1. Boot debian and set the time (using ntpdate, or whatever you prefer)
> to within a couple of second or so of "real" time.
>
> 2. Write the current date/time to the BIOS clock:
>
> hwclock --directisa --localtime --systohc --noadjfile
>
> 3. Remove the adjtime file, to reset any wild (and invalid) adjustment
> attempts the system may have made:
>
> rm -f /etc/adjtime
>
> 4. Write the current date/tiem to the BIOS clock again, this time
> updating/creating the adjustment file:
>
> hwclock --directisa --localtime --systohc
>
> 5. Verify the current date/time in the BIOS clock. This should show the
> correct current time (to within a few seconds):
>
> hwclock --directisa --show
>
> If this doesn't show the right time, repeat from #3 again but
> with --utc instead of --localtime for item #4
>
> 6. Reboot without updating the BIOS clock again:
>
> reboot -f
>
>
> That should work :-)
> Chris

I have tried it with --utc instead --localtime and /etc/default/rcS with
UTC=yes

It seems it works, but... I have always 2 hour of difference between
Windows and Linux. If I have Linux with the right time, then Windows is
2 hour behind. If I adjust Windows then Linux is 2 hour in advance.

I will spend a bit time with this issue later.

Thanks.

Safety Articles | Usenet Groups | Usenet News | Bluegrass