[lfs-support] Timekeeping

Paul Rogers paulgrogers at fastmail.fm
Sun Nov 1 10:27:27 PST 2015


>> The only thing I can think of is it could it be udev?
>> init.d/checkfs?  Do I need to get the clock adjusted before udev
>> runs?  Any ideas?  TIA.
>>
>
> Do you have ntp running on both systems?  Get the time right and
> umount/remount the partition.  Then the time should be the same
> for both.
>
>   -- Bruce

> Have you tried "date" and "date -u" on both systems? Also, it may be
> interesting to read the hardware clock and see what is in it ("man
> hwclock" for details). Also, you could try to compare the files
> /etc/adjtime on both systems.
>
> Well, that's all I can think of.

> Pierre

Thanks guys!  Having you here led me to the fix.  It's something I
discovered in college all those years ago.  Often (in calculus class)
when I was confused and went to the professor with a question (and had
to wait on others) in trying to figure out an explanation of my
confusion I'd have to organize my confused ideas in such a way that the
explanation became clear and the confusion went away, as did I.  ;-)

I install LFS as per the book.  But then when it comes to the BLFS
stuff, that's where I begin to make choices and adaptations.  One of
the things I "adapted"  ;-^  in the new version was rewriting
(simplifying in my view) all the bootscripts.  (I actually redesigned
rc a few versions ago.)   Also, I don't like the idea of starting the
clock as a side-effect of udev in 55-lfs-rules, so I commented that out
and did it in an obvious setclock bootscript.  (In the older system
it's still done by udev.)

I tried Bruce's idea.  It seemed very reasonable, but didn't work.
Pierre's idea was also good, and I can see how that could be trouble
ahead.  I'm not sure where /var/lib/hwclock/adjtime getting used.

Seems the "problem" was I should have put the setclock bootscript
immediately after udev, but I had it somewhat after checkfs.  When I
tried to explain the problem to you, above, that was the start of the
right path.  I moved the setclock to before checkfs and so far (once)
there was no problem, though I need to go through a couple cycles
bouncing between systems.  Just to check, but it's got to be right!

Thanks for listening!  8-)

-- 
Paul Rogers
paulgrogers at fastmail.fm
Rogers' Second Law: "Everything you do communicates."
(I do not personally endorse any additions after this line. TANSTAAFL
:-)

        

-- 
http://www.fastmail.com - The professional email service



More information about the lfs-support mailing list