lenny + armel のハックキットで時刻同期

Debian LS-CL

lenny + armel のハックキットで 「 時刻同期」を行う。

LS-CL は、 システムクロックがバッテリバックアップされていないという 信じられない仕様なので、電源を切る(コンセントを抜く)と 他から時刻を与えない限り正しい時刻を刻むことはできない。

ntpd のインストール

ackkit:~# apt-get install ntp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libcap1 libedit2 perl perl-doc perl-modules
Suggested packages:
  ntp-doc libterm-readline-gnu-perl libterm-readline-perl-perl groff
The following NEW packages will be installed:
  libcap1 libedit2 ntp perl perl-doc perl-modules
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 16.5MB of archives.
After this operation, 43.0MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org lenny/main perl-modules 5.10.0-17 [3189kB]
Get:2 http://ftp.jp.debian.org lenny/main perl 5.10.0-17 [4536kB]
Get:3 http://ftp.jp.debian.org lenny/main libcap1 1:1.10-14 [9074B]
Get:4 http://ftp.jp.debian.org lenny/main libedit2 2.11~20080614-1 [64.5kB]
Get:5 http://ftp.jp.debian.org lenny/main ntp 1:4.2.4p4+dfsg-7 [458kB]
Get:6 http://ftp.jp.debian.org lenny/main perl-doc 5.10.0-17 [8215kB]
Fetched 16.5MB in 26s (624kB/s)
tar: ./control: time stamp 2008-11-02 07:12:43 is 1225577262.255333097 s in the future
tar: ./conffiles: time stamp 2008-11-02 07:12:43 is 1225577262.251356243 s in the future
tar: ./md5sums: time stamp 2008-11-02 07:12:43 is 1225577262.247318488 s in the future
tar: ./postrm: time stamp 2008-11-02 07:12:43 is 1225577262.244299455 s in the future
tar: ./preinst: time stamp 2008-11-02 07:12:43 is 1225577262.241323378 s in the future
tar: .: time stamp 2008-11-02 07:12:43 is 1225577262.238927993 s in the future
Selecting previously deselected package perl-modules.
(Reading database ... 8549 files and directories currently installed.)
Unpacking perl-modules (from .../perl-modules_5.10.0-17_all.deb) ...
tar: ./md5sums: time stamp 2008-11-03 02:19:03 is 1225646036.275086144 s in the future
tar: ./postinst: time stamp 2008-11-03 02:19:02 is 1225646035.271083976 s in the future
tar: ./control: time stamp 2008-11-03 02:23:05 is 1225646278.268003719 s in the future
tar: ./prerm: time stamp 2008-11-03 02:19:02 is 1225646035.264920198 s in the future
tar: .: time stamp 2008-11-03 02:23:05 is 1225646278.262545585 s in the future
Selecting previously deselected package perl.
Unpacking perl (from .../perl_5.10.0-17_armel.deb) ...
tar: ./shlibs: time stamp 2007-04-30 05:17:11 is 1177877518.601099742 s in the future
tar: ./postinst: time stamp 2007-04-30 05:17:13 is 1177877520.59702148 s in the future
tar: ./md5sums: time stamp 2007-04-30 05:17:41 is 1177877548.594001465 s in the future
tar: ./control: time stamp 2007-04-30 05:17:39 is 1177877546.591070304 s in the future
tar: .: time stamp 2007-04-30 05:17:40 is 1177877547.588732334 s in the future
Selecting previously deselected package libcap1.
Unpacking libcap1 (from .../libcap1_1%3a1.10-14_armel.deb) ...
tar: ./shlibs: time stamp 2008-06-16 02:19:16 is 1213550043.344089384 s in the future
tar: ./postrm: time stamp 2008-06-16 02:24:38 is 1213550365.340136506 s in the future
tar: ./control: time stamp 2008-06-16 02:24:53 is 1213550380.337138834 s in the future
tar: ./md5sums: time stamp 2008-06-16 02:24:58 is 1213550385.333947875 s in the future
tar: ./postinst: time stamp 2008-06-16 02:24:38 is 1213550365.330727786 s in the future
tar: .: time stamp 2008-06-16 02:24:58 is 1213550385.328127565 s in the future
Selecting previously deselected package libedit2.
Unpacking libedit2 (from .../libedit2_2.11~20080614-1_armel.deb) ...
tar: ./conffiles: time stamp 2008-07-17 04:13:50 is 1216235317.077601393 s in the future
tar: ./md5sums: time stamp 2008-07-17 04:15:16 is 1216235403.073604391 s in the future
tar: ./control: time stamp 2008-07-17 04:15:10 is 1216235397.070616007 s in the future
tar: ./postrm: time stamp 2008-07-17 04:13:50 is 1216235317.067569987 s in the future
tar: ./postinst: time stamp 2008-07-17 04:13:50 is 1216235317.064306146 s in the future
tar: ./prerm: time stamp 2008-07-17 04:13:50 is 1216235317.061350745 s in the future
tar: .: time stamp 2008-07-17 04:15:16 is 1216235403.059012343 s in the future
Selecting previously deselected package ntp.
Unpacking ntp (from .../ntp_1%3a4.2.4p4+dfsg-7_armel.deb) ...
tar: ./control: time stamp 2008-11-02 07:12:41 is 1225577247.40174041 s in the future
tar: ./md5sums: time stamp 2008-11-02 07:12:40 is 1225577246.394364815 s in the future
tar: ./postinst: time stamp 2008-11-02 07:12:40 is 1225577246.391374079 s in the future
tar: ./postrm: time stamp 2008-11-02 07:12:40 is 1225577246.388404553 s in the future
tar: ./preinst: time stamp 2008-11-02 07:12:40 is 1225577246.385218514 s in the future
tar: .: time stamp 2008-11-02 07:12:41 is 1225577247.382820568 s in the future
Selecting previously deselected package perl-doc.
Unpacking perl-doc (from .../perl-doc_5.10.0-17_all.deb) ...
Adding `diversion of /usr/bin/perldoc to /usr/bin/perldoc.stub by perl-doc'
Processing triggers for man-db ...
Setting up libcap1 (1:1.10-14) ...
Setting up libedit2 (2.11~20080614-1) ...
Setting up ntp (1:4.2.4p4+dfsg-7) ...
Starting NTP server: ntpd.
Setting up perl-modules (5.10.0-17) ...
Setting up perl (5.10.0-17) ...
Setting up perl-doc (5.10.0-17) ...
hackkit:~#

ntp.conf の修正

hackkit:/etc# mv ntp.conf ntp.conf.orig
hackkit:/etc# cp ntp.conf.orig ntp.conf
hackkit:/etc# ls -l ntp.conf*
-rw-r--r-- 1 root root 2020 Nov 24 15:54 ntp.conf
-rw-r--r-- 1 root root 2020 Jul 17 04:13 ntp.conf.orig
hackkit:/etc# vi ntp.conf
	:
	:
hackkit:/etc# diff -c ntp.conf.orig ntp.conf
*** ntp.conf.orig       Thu Jul 17 04:13:07 2008
--- ntp.conf    Mon Nov 24 15:55:49 2008
***************
*** 14,27 ****

  # You do need to talk to an NTP server or two (or three).
  #server ntp.your-provider.example

  # pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
  # pick a different set every time it starts up.  Please consider joining the
  # pool: 
! server 0.debian.pool.ntp.org iburst dynamic
! server 1.debian.pool.ntp.org iburst dynamic
! server 2.debian.pool.ntp.org iburst dynamic
! server 3.debian.pool.ntp.org iburst dynamic


  # Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
--- 14,31 ----

  # You do need to talk to an NTP server or two (or three).
  #server ntp.your-provider.example
+ server  ntp3.jst.mfeed.ad.jp
+ server  ntp2.jst.mfeed.ad.jp
+ server  ntp1.jst.mfeed.ad.jp
+ server  sil.yamasita.jp

  # pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
  # pick a different set every time it starts up.  Please consider joining the
  # pool: 
! #server 0.debian.pool.ntp.org iburst dynamic
! #server 1.debian.pool.ntp.org iburst dynamic
! #server 2.debian.pool.ntp.org iburst dynamic
! #server 3.debian.pool.ntp.org iburst dynamic


  # Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
hackkit:/etc#

ntpd の再起動

hackkit:/etc# /etc/init.d/ntp restart
Stopping NTP server: ntpd.
Starting NTP server: ntpd.
hackkit:/etc#
しばらくして、
hackkit:~# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+ntp3.jst.mfeed. 210.173.160.86   2 u   20   64  377   13.306   15.089   3.172
*ntp2.jst.mfeed. 210.173.160.56   2 u   17   64  377   13.623   19.820   2.249
+ntp1.jst.mfeed. 210.173.160.56   2 u   19   64  377   13.181   15.574   3.809
 sil.yamasita.jp 210.173.160.57   3 u   24   64  377    0.368  -209.06  41.439
hackkit:~#
あれ?同期している。 時計がずれすぎていて同期するはずないと思ったのだが、、、

LS-CL
バッファローダイレクト
楽天市場
amazon


PRODUCTID, Linux Version
ハックの記録
LinkStation/玄箱 をハックしよう

ファームウェア Ver.1.06 へのアップデート

Copyright (C) 2003-2009 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市