Gentoo Archives: gentoo-user

From: "Poison BL." <poisonbl@×××××.com>
To: gentoo-user <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Re: another "headless device"-question: In search of the LAN
Date: Tue, 30 Sep 2014 13:15:10
Message-Id: CAOTuDKqhWssxbw6hP3FLX70oXNivesMsmoDKR-ZLWxK0txyVVw@mail.gmail.com
In Reply to: Re: [gentoo-user] Re: another "headless device"-question: In search of the LAN by meino.cramer@gmx.de
1 On Tue, Sep 30, 2014 at 8:34 AM, <meino.cramer@×××.de> wrote:
2 > James <wireless@×××××××××××.com> [14-09-30 14:24]:
3 >> Meino,
4 >>
5 >>
6 >> Make sure your system time (hwclock) is properly set upon bootup.
7 >> Since you are running on an embedded hardware board, I'd look at
8 >> those docs and find a forum as to the specifics of how the hardware
9 >> clock is set and maintained on the board. Once you get it close,
10 >> then ntp should be configuration.
11 >>
12 >> man hwclock
13 >>
14 >> hth,
15 >> James
16 >>
17 >>
18 >
19 > Hi James,
20 >
21 > ...the system has no built-in RTC which still runs if the system is
22 > powered off.
23 > After power is up and eth0 is alive, the time/date has to be set via
24 > ntp-client. The rest already working.
25 > I called
26 > /etc/init.d/ntp-client start
27 > after booting the little beast and plugging in the RJ45 and everything
28 > else was fine.
29 > Currently I am experimenting with chrony (emerging).
30 > Will see, if this will make a difference ;)
31 >
32 > Best
33 > mcc
34 >
35
36 The trick for bringing the clock into the right era after boot on a
37 system like that one (and what's used in raspbian for the pi) is to,
38 at shutdown, write the current date/time into a file. Then, on boot,
39 set the date/time to what that file has, meaning it won't be perfectly
40 accurate, but it will be considerably closer until ntp's available to
41 it again. The most important thing that accomplishes for me is, while
42 it doesn't keep the wall clock times accurate, maintaining the right
43 order of times on log messages, etc. It also prevents a lot of issues
44 with log and backup rotations that depend on 'which file is newer?',
45 etc.
46
47 --
48 Poison [BLX]
49 Joshua M. Murphy