lenny ベースのアーカイブの作り直し

Debian HS-DHGL LS-CL LS-GL LS-HGL LS-WSGL/R1

lenny ベースのハックキットのインストール確認をしていて、 いくつか lenny のアーカイブ内の問題を見つけた。
アーカイブを解いて修正、アーカイブを作り直す。

作業には、標準ファーム 1.20 が動作している HS-DHGL を使う。
lenny ベースのハックキットが動作しているマシンを使いたかったが、 まだ、samba とか整備できていなくて、、、

アーカイブを解く

root@HS-DHGLEA2:~# cd /mnt/disk1/share/hackkit/
root@HS-DHGLEA2:/mnt/disk1/share/hackkit# ls
hackkit_017.sh         hackkit_018.sh         hackkit_081122.tar.gz  mkimage
root@HS-DHGLEA2:/mnt/disk1/share/hackkit# mkdir root
root@HS-DHGLEA2:/mnt/disk1/share/hackkit# cd root
root@HS-DHGLEA2:/mnt/disk1/share/hackkit/root# tar zxvf ../hackkit_081122.tar.gz
	:
	:
./media/
./initrd/
root@HS-DHGLEA2:/mnt/disk1/share/hackkit/root#

chroot

root@HS-DHGLEA2:/mnt/disk1/share/hackkit/root# chroot .
sh-3.2# ls
bin  boot  dev  etc  home  initrd  lib  media  mnt  opt  proc  root  sbin  selinux  srv  sys  tmp  usr  var
sh-3.2#

パッケージリストの更新

sh-3.2# apt-get update
Get:1 http://security.debian.org lenny/updates Release.gpg [189B]
Get:2 http://ftp.jp.debian.org lenny Release.gpg [189B]
Get:3 http://security.debian.org lenny/updates Release [40.8kB]
Get:4 http://ftp.jp.debian.org lenny Release [74.5kB]
Ign http://security.debian.org lenny/updates/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Sources/DiffIndex
Get:5 http://ftp.jp.debian.org lenny/main Packages/DiffIndex [2038B]
Get:6 http://security.debian.org lenny/updates/main Packages [9803B]
Get:7 http://security.debian.org lenny/updates/main Sources [4114B]
Get:8 http://ftp.jp.debian.org lenny/main Sources/DiffIndex [2038B]
Get:9 http://ftp.jp.debian.org lenny/main Packages [6744kB]
Get:10 http://ftp.jp.debian.org lenny/main Sources [2983kB]
Bus error
sh-3.2#
Bus error ってなんだ?
もう一回。
sh-3.2# apt-get update
Hit http://ftp.jp.debian.org lenny Release.gpg
Hit http://security.debian.org lenny/updates Release.gpg
Hit http://ftp.jp.debian.org lenny Release
Hit http://security.debian.org lenny/updates Release
Hit http://ftp.jp.debian.org lenny/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Sources/DiffIndex
Hit http://ftp.jp.debian.org lenny/main Sources/DiffIndex
Hit http://security.debian.org lenny/updates/main Packages
Hit http://security.debian.org lenny/updates/main Sources
Get:1 http://ftp.jp.debian.org lenny/main Packages [6744kB]
Get:2 http://ftp.jp.debian.org lenny/main Sources [2983kB]
Fetched 2B in 48s (0B/s)
Segmentation fault
root@HS-DHGLEA2:/mnt/disk1/share/hackkit/root#
今度は、Segmentation fault。

意味不明。

lenny をインストールした LS-GL で再実行

仕方がないので、lenny をインストールした LS-GL で再実行する。
hackkit:/mnt# ls
hackkit_081122.tar.gz
hackkit:/mnt# mkdir root
hackkit:/mnt# cd root
hackkit:/mnt/root# tar zxvf ../hackkit_081122.tar.gz
	:
	:
./opt/
./media/
./initrd/
hackkit:/# apt-get update
Get:1 http://ftp.jp.debian.org lenny Release.gpg [189B]
Get:2 http://security.debian.org lenny/updates Release.gpg [189B]
Get:3 http://ftp.jp.debian.org lenny Release [74.5kB]
Get:4 http://security.debian.org lenny/updates Release [40.8kB]
Ign http://security.debian.org lenny/updates/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Sources/DiffIndex
Get:5 http://security.debian.org lenny/updates/main Packages [9803B]
Get:6 http://ftp.jp.debian.org lenny/main Packages/DiffIndex [2038B]
Get:7 http://security.debian.org lenny/updates/main Sources [4114B]
Get:8 http://ftp.jp.debian.org lenny/main Sources/DiffIndex [2038B]
Get:9 http://ftp.jp.debian.org lenny/main Packages [6744kB]
Get:10 http://ftp.jp.debian.org lenny/main Sources [2983kB]
Fetched 9861kB in 40s (243kB/s)
Reading package lists... Done
hackkit:/#
こっちはちゃんと動いた。

パッケージのアップデート

hackkit:/# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  base-files dpkg libncurses5 libncursesw5 login ncurses-base ncurses-bin net-tools passwd perl-base rsyslog
11 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 6351kB of archives.
After this operation, 160kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org lenny/main base-files 4.0.6 [62.2kB]
Get:2 http://ftp.jp.debian.org lenny/main dpkg 1.14.23 [2351kB]
Get:3 http://ftp.jp.debian.org lenny/main login 1:4.1.1-6 [854kB]
Get:4 http://ftp.jp.debian.org lenny/main ncurses-bin 5.6+20080830-2 [136kB]
Get:5 http://ftp.jp.debian.org lenny/main perl-base 5.10.0-18 [962kB]
Get:6 http://ftp.jp.debian.org lenny/main libncurses5 5.6+20080830-2 [324kB]
Get:7 http://ftp.jp.debian.org lenny/main ncurses-base 5.6+20080830-2 [14.1kB]
Get:8 http://ftp.jp.debian.org lenny/main passwd 1:4.1.1-6 [871kB]
Get:9 http://ftp.jp.debian.org lenny/main libncursesw5 5.6+20080830-2 [345kB]
Get:10 http://ftp.jp.debian.org lenny/main net-tools 1.60-22 [267kB]
Get:11 http://ftp.jp.debian.org lenny/main rsyslog 3.18.5-1 [166kB]
Fetched 6351kB in 16s (379kB/s)
(Reading database ... 8549 files and directories currently installed.)
Preparing to replace base-files 4.0.5 (using .../base-files_4.0.6_armel.deb) ...
Unpacking replacement base-files ...
rm: cannot remove `/var/lib/dpkg/tmp.ci/control': Function not implemented
dpkg: error while cleaning up:
 subprocess rm cleanup returned error exit status 1
Processing triggers for man-db ...
Setting up base-files (4.0.6) ...
rm: cannot remove `/var/lib/dpkg/tmp.ci/control': Function not implemented
dpkg: error processing /var/cache/apt/archives/dpkg_1.14.23_armel.deb (--unpack):
 subprocess rm cleanup returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/dpkg_1.14.23_armel.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
hackkit:/#
いったいどうなっているの?

ネイティブ環境では?

chroot 環境だからおかしい?
LS-GL の lenny ネイティブ環境で実行してみる。
hackkit:/# exit
exit
hackkit:/mnt/root# apt-get update
Get:1 http://security.debian.org lenny/updates Release.gpg [189B]
Get:2 http://ftp.jp.debian.org lenny Release.gpg [189B]
Get:3 http://security.debian.org lenny/updates Release [40.8kB]
Get:4 http://ftp.jp.debian.org lenny Release [74.5kB]
Ign http://security.debian.org lenny/updates/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Sources/DiffIndex
Hit http://security.debian.org lenny/updates/main Packages
Get:5 http://ftp.jp.debian.org lenny/main Packages/DiffIndex [2038B]
Hit http://security.debian.org lenny/updates/main Sources
Get:6 http://ftp.jp.debian.org lenny/main Sources/DiffIndex [2038B]
Get:7 http://ftp.jp.debian.org lenny/main 2008-12-07-0843.51.pdiff [2982B]
Get:8 http://ftp.jp.debian.org lenny/main 2008-12-07-0843.51.pdiff [2982B]
Get:9 http://ftp.jp.debian.org lenny/main 2008-12-07-0843.51.pdiff [2982B]
Get:10 http://ftp.jp.debian.org lenny/main 2008-12-07-0843.51.pdiff [1044B]
Get:11 http://ftp.jp.debian.org lenny/main 2008-12-07-0843.51.pdiff [1044B]
Get:12 http://ftp.jp.debian.org lenny/main 2008-12-07-0843.51.pdiff [1044B]
Get:13 http://ftp.jp.debian.org lenny/main 2008-12-08-0848.52.pdiff [8764B]
Get:14 http://ftp.jp.debian.org lenny/main 2008-12-08-0848.52.pdiff [8764B]
Get:15 http://ftp.jp.debian.org lenny/main 2008-12-08-0848.52.pdiff [8764B]
Get:16 http://ftp.jp.debian.org lenny/main 2008-12-08-0848.52.pdiff [5375B]
Get:17 http://ftp.jp.debian.org lenny/main 2008-12-08-0848.52.pdiff [5375B]
Get:18 http://ftp.jp.debian.org lenny/main 2008-12-08-0848.52.pdiff [5375B]
Get:19 http://ftp.jp.debian.org lenny/main 2008-12-08-2024.36.pdiff [335B]
Get:20 http://ftp.jp.debian.org lenny/main 2008-12-08-2024.36.pdiff [335B]
Get:21 http://ftp.jp.debian.org lenny/main 2008-12-08-2024.36.pdiff [335B]
Get:22 http://ftp.jp.debian.org lenny/main 2008-12-08-2024.36.pdiff [481B]
Get:23 http://ftp.jp.debian.org lenny/main 2008-12-08-2024.36.pdiff [481B]
Get:24 http://ftp.jp.debian.org lenny/main 2008-12-08-2024.36.pdiff [481B]
Get:25 http://ftp.jp.debian.org lenny/main 2008-12-09-0846.41.pdiff [10.1kB]
Get:26 http://ftp.jp.debian.org lenny/main 2008-12-09-0846.41.pdiff [10.1kB]
Get:27 http://ftp.jp.debian.org lenny/main 2008-12-09-0846.41.pdiff [10.1kB]
Get:28 http://ftp.jp.debian.org lenny/main 2008-12-09-0846.41.pdiff [1400B]
Get:29 http://ftp.jp.debian.org lenny/main 2008-12-09-0846.41.pdiff [1400B]
Get:30 http://ftp.jp.debian.org lenny/main 2008-12-09-0846.41.pdiff [1400B]
Fetched 150kB in 1min40s (1498B/s)
Reading package lists... Done
hackkit:/mnt/root# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  net-tools rsyslog
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 433kB of archives.
After this operation, 4096B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org lenny/main net-tools 1.60-22 [267kB]
Get:2 http://ftp.jp.debian.org lenny/main rsyslog 3.18.5-1 [166kB]
Fetched 433kB in 3s (128kB/s)
(Reading database ... 8549 files and directories currently installed.)
Preparing to replace net-tools 1.60-21 (using .../net-tools_1.60-22_armel.deb) ...
Unpacking replacement net-tools ...
Preparing to replace rsyslog 3.18.2-1 (using .../rsyslog_3.18.5-1_armel.deb) ...
Unpacking replacement rsyslog ...
Processing triggers for man-db ...
Setting up net-tools (1.60-22) ...
Setting up rsyslog (3.18.5-1) ...
Installing new version of config file /etc/default/rsyslog ...
Stopping enhanced syslogd: rsyslogd.
Starting enhanced syslogd: rsyslogd.
hackkit:/mnt/root#
何で結果が違うの?

LS-CL では?

もともとのアーカイブを作った LS-CL の標準ファームで試す。
root@LS-CL701:/mnt/disk1/share/hackkit# ls
hackkit_011.sh         hackkit_012.sh         hackkit_013.sh         hackkit_081122.tar.gz  mkimage
root@LS-CL701:/mnt/disk1/share/hackkit# mkdir root
root@LS-CL701:/mnt/disk1/share/hackkit# cd root
root@LS-CL701:/mnt/disk1/share/hackkit/root# tar zxvf ../hackkit_081122.tar.gz
	:
	:
./initrd/
root@LS-CL701:/mnt/disk1/share/hackkit/root# chroot .
sh-3.2# apt-get update
Get:1 http://ftp.jp.debian.org lenny Release.gpg [189B]
Get:2 http://security.debian.org lenny/updates Release.gpg [189B]
Get:3 http://ftp.jp.debian.org lenny Release [74.5kB]
Get:4 http://security.debian.org lenny/updates Release [40.8kB]
Ign http://security.debian.org lenny/updates/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Sources/DiffIndex
Get:5 http://ftp.jp.debian.org lenny/main Packages/DiffIndex [2038B]
Get:6 http://security.debian.org lenny/updates/main Packages [9803B]
Get:7 http://ftp.jp.debian.org lenny/main Sources/DiffIndex [2038B]
Get:8 http://security.debian.org lenny/updates/main Sources [4114B]
Get:9 http://ftp.jp.debian.org lenny/main Packages [6744kB]
Get:10 http://ftp.jp.debian.org lenny/main Sources [2983kB]
Fetched 9861kB in 36s (270kB/s)
Reading package lists... Done
sh-3.2#
これだと、たぶん upgrade は失敗する。
sh-3.2# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  base-files dpkg libncurses5 libncursesw5 login ncurses-base ncurses-bin net-tools passwd perl-base rsyslog
11 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 6351kB of archives.
After this operation, 160kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org lenny/main base-files 4.0.6 [62.2kB]
Get:2 http://ftp.jp.debian.org lenny/main dpkg 1.14.23 [2351kB]
Get:3 http://ftp.jp.debian.org lenny/main login 1:4.1.1-6 [854kB]
Get:4 http://ftp.jp.debian.org lenny/main ncurses-bin 5.6+20080830-2 [136kB]
Get:5 http://ftp.jp.debian.org lenny/main perl-base 5.10.0-18 [962kB]
Get:6 http://ftp.jp.debian.org lenny/main libncurses5 5.6+20080830-2 [324kB]
Get:7 http://ftp.jp.debian.org lenny/main ncurses-base 5.6+20080830-2 [14.1kB]
Get:8 http://ftp.jp.debian.org lenny/main passwd 1:4.1.1-6 [871kB]
Get:9 http://ftp.jp.debian.org lenny/main libncursesw5 5.6+20080830-2 [345kB]
Get:10 http://ftp.jp.debian.org lenny/main net-tools 1.60-22 [267kB]
Get:11 http://ftp.jp.debian.org lenny/main rsyslog 3.18.5-1 [166kB]
Fetched 6351kB in 12s (497kB/s)
(Reading database ... 8549 files and directories currently installed.)
Preparing to replace base-files 4.0.5 (using .../base-files_4.0.6_armel.deb) ...
Unpacking replacement base-files ...
Processing triggers for man-db ...
Setting up base-files (4.0.6) ...
(Reading database ... 8549 files and directories currently installed.)
Preparing to replace dpkg 1.14.22 (using .../dpkg_1.14.23_armel.deb) ...
Unpacking replacement dpkg ...
Processing triggers for man-db ...
Setting up dpkg (1.14.23) ...
(Reading database ... 8549 files and directories currently installed.)
Preparing to replace login 1:4.1.1-5 (using .../login_1%3a4.1.1-6_armel.deb) ...
Unpacking replacement login ...
Processing triggers for man-db ...
Setting up login (1:4.1.1-6) ...
(Reading database ... 8549 files and directories currently installed.)
Preparing to replace ncurses-bin 5.6+20080830-1 (using .../ncurses-bin_5.6+20080830-2_armel.deb) ...
Unpacking replacement ncurses-bin ...
Processing triggers for man-db ...
Setting up ncurses-bin (5.6+20080830-2) ...
(Reading database ... 8549 files and directories currently installed.)
Preparing to replace perl-base 5.10.0-17 (using .../perl-base_5.10.0-18_armel.deb) ...
Unpacking replacement perl-base ...
Processing triggers for man-db ...
Setting up perl-base (5.10.0-18) ...
(Reading database ... 8549 files and directories currently installed.)
Preparing to replace libncurses5 5.6+20080830-1 (using .../libncurses5_5.6+20080830-2_armel.deb) ...
Unpacking replacement libncurses5 ...
Setting up libncurses5 (5.6+20080830-2) ...
(Reading database ... 8549 files and directories currently installed.)
Preparing to replace ncurses-base 5.6+20080830-1 (using .../ncurses-base_5.6+20080830-2_all.deb) ...
Unpacking replacement ncurses-base ...
Setting up ncurses-base (5.6+20080830-2) ...
(Reading database ... 8549 files and directories currently installed.)
Preparing to replace passwd 1:4.1.1-5 (using .../passwd_1%3a4.1.1-6_armel.deb) ...
Unpacking replacement passwd ...
Processing triggers for man-db ...
Setting up passwd (1:4.1.1-6) ...
(Reading database ... 8549 files and directories currently installed.)
Preparing to replace libncursesw5 5.6+20080830-1 (using .../libncursesw5_5.6+20080830-2_armel.deb) ...
Unpacking replacement libncursesw5 ...
Preparing to replace net-tools 1.60-21 (using .../net-tools_1.60-22_armel.deb) ...
Unpacking replacement net-tools ...
Preparing to replace rsyslog 3.18.2-1 (using .../rsyslog_3.18.5-1_armel.deb) ...
Unpacking replacement rsyslog ...
Processing triggers for man-db ...
Setting up libncursesw5 (5.6+20080830-2) ...
Setting up net-tools (1.60-22) ...
Setting up rsyslog (3.18.5-1) ...
Installing new version of config file /etc/default/rsyslog ...
Stopping enhanced syslogd: rsyslogd already stopped.
Starting enhanced syslogd: rsyslogd.
sh-3.2#
おわった。謎。

/dev/rtc を作る

sh-3.2# mknod /dev/rtc c 10 135
sh-3.2#

xfsprogs を入れる

sh-3.2# apt-get install xfsprogs
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  attr dvhtool quota xfsdump
The following NEW packages will be installed:
  xfsprogs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1523kB of archives.
After this operation, 3256kB of additional disk space will be used.
Get:1 http://ftp.jp.debian.org lenny/main xfsprogs 2.9.8-1 [1523kB]
Fetched 1523kB in 5s (276kB/s)
Selecting previously deselected package xfsprogs.
(Reading database ... 8549 files and directories currently installed.)
Unpacking xfsprogs (from .../xfsprogs_2.9.8-1_armel.deb) ...
Processing triggers for man-db ...
Setting up xfsprogs (2.9.8-1) ...
sh-3.2#

掃除

sh-3.2# apt-get clean
sh-3.2#

chroot から抜ける

sh-3.2# exit
exit
root@LS-CL701:/mnt/disk1/share/hackkit/root#

掃除その2

root@LS-CL701:/mnt/disk1/share/hackkit/root# rm root/.bash_history
root@LS-CL701:/mnt/disk1/share/hackkit/root#

アーカイブの作成

root@LS-CL701:/mnt/disk1/share/hackkit/root# tar zcvf ../hackkit_081209.tar.gz .
	:
	:
root@LS-CL701:/mnt/disk1/share/hackkit/root# 

インストーラの修正

[yasunari@giga unified]$ diff -u hackkit_018.sh hackkit_081209.sh
--- hackkit_018.sh      2008-12-06 23:33:16.000000000 +0900
+++ hackkit_081209.sh   2008-12-09 23:38:47.000000000 +0900
@@ -13,7 +13,7 @@
 HOSTNAME=hackkit

 WORK=/mnt/disk1/share/hackkit
-HACKKIT=$WORK/hackkit_081122.tar.gz
+HACKKIT=$WORK/hackkit_081209.tar.gz
 MOUNTPOINT=/mnt/debinst

 BOOTPARTITION=/dev/sdb1
@@ -85,9 +85,6 @@
        cd $MOUNTPOINT
        tar zxvf $HACKKIT

-       # must be in an archive
-       mknod $MOUNTPOINT/dev/rtc c 10 135
-
        if [ $MACHINE = LSWSGL ]
        then
                mkdir $MOUNTPOINT/mnt/disk1
[yasunari@giga unified]$

さあ、また全機種で確認だぁ!



LS-GL
バッファローダイレクト
楽天市場
Amazon
Yahoo!ショッピング
ソフマップ
livedoor デパート
ドスパラ

HS-DHGL
バッファローダイレクト
楽天市場
Yahoo!ショッピング
somap.com
ValuMore!
ムラウチドットコム
LS-HGL
バッファローダイレクト
楽天市場
livedoor デパート
Sofmap
Yahoo!ショッピング
パソQ
ムラウチドットコム
ヤマダ電機WEB
LinkStation Mini
LS-WSGL
バッファローダイレクト
楽天市場
Amazon
Yahoo!ショッピング
Livedoor デパート
Sofmap
ムラウチドットコム
ヤマダ電機WEB
パソQ
LS-CL
バッファローダイレクト
楽天市場
amazon


容易にドライブの増設が可能な、RAID機能対応ネットワークHDD〈リンクステーション〉
ハックの記録
LinkStation/玄箱 をハックしよう

作り直したハックキットの確認手順、確認項目

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