標準ファームへの依存を減らし、 追従の必要を減らす形でハックキットを作り直す。
SATA の HDD を接続しやすいのは玄箱/Pro + ハックキット。
LS-GL の標準ファームの HDD は玄箱/Pro + ハックキットに接続する。
標準ファームの /mnt/disk1 である /dev/sdb6 を /tmp/mnt にマウントする。
kup:~# mkdir /tmp/mnt kup:~# mount /dev/sdb6 /tmp/mnt kup:~# ls /tmp/mnt share kup:~# ls /tmp/mnt/share/ debian kup:~# ls /tmp/mnt/share/debian/ LS-GL_hackkit_2.00.sh LS-GL_hackkit_2.00.tar.gz kup:~#
up:~# cd !$ cd /tmp/mnt/share/debian/ kup:/tmp/mnt/share/debian# ls LS-GL_hackkit_2.00.sh LS-GL_hackkit_2.00.tar.gz kup:/tmp/mnt/share/debian# cp LS-GL_hackkit_2.00.sh LS-GL_hackkit_2.10.sh kup:/tmp/mnt/share/debian# vi LS-GL_hackkit_2.10.sh : : kup:/tmp/mnt/share/debian# diff -c LS-GL_hackkit_2.00.sh LS-GL_hackkit_2.10.sh *** LS-GL_hackkit_2.00.sh Thu Dec 13 04:38:26 2007 --- LS-GL_hackkit_2.10.sh Sun Jan 20 12:53:44 2008 *************** *** 11,17 **** MOUNTPOINT=/mnt/debinst WORK=/mnt/disk1/share/debian ! HACKKIT=$WORK/LS-GL_hackkit_2.00.tar.gz #--------------------------------------------------------- # format --- 11,17 ---- MOUNTPOINT=/mnt/debinst WORK=/mnt/disk1/share/debian ! HACKKIT=$WORK/LS-GL_hackkit_2.10.tar.gz #--------------------------------------------------------- # format *************** *** 153,163 **** ln -s ../init.d/kernelmon $MOUNTPOINT/etc/rcS.d/S81kernelmon tar cf - usr/local/sbin/kernelmon |(cd $MOUNTPOINT; tar xvf -) - sed -e 's/^\(.*libbuffalo.*\)$/# \1/' \ - -e 's/^\(.*shutdown.sh.*\)$/ shutdown -h now/' \ - -e 's;\(\. /etc/melco/info\);#\1;' \ - /usr/local/bin/kernelmon_exec.sh > $MOUNTPOINT/usr/local/bin/kernelmon_exec.sh - chmod +x $MOUNTPOINT/usr/local/bin/kernelmon_exec.sh } #--------------------------------------------------------- #kernel module --- 153,158 ---- kup:/tmp/mnt/share/debian#
kup:/tmp/mnt/share/debian# mkdir root kup:/tmp/mnt/share/debian# cd root kup:/tmp/mnt/share/debian/root# tar zxvf ../LS-GL_hackkit_2.00.tar.gz : : ./var/opt/ ./var/mail/ kup:/tmp/mnt/share/debian/root#
kup:/tmp/mnt/share/debian/root# cd usr/local/bin kup:/tmp/mnt/share/debian/root/usr/local/bin# vi kernelmon_exec.sh : : kup:/tmp/mnt/share/debian/root/usr/local/bin# chmod +x kernelmon_exec.sh kup:/tmp/mnt/share/debian/root/usr/local/bin# ls -l total 4 -rwxr-xr-x 1 root staff 198 Jan 20 13:41 kernelmon_exec.sh kup:/tmp/mnt/share/debian/root/usr/local/bin# cat kernelmon_exec.sh #!/bin/sh if [ "$1" != micon_interrupts ] then exit fi int=`/usr/local/sbin/miconapl -a int_get_switch_status | sed -n -e 's/^int=\(.*\)$/\1/p'` if [ "$int" = power_sw ] then shutdown -h now fi kup:/tmp/mnt/share/debian/root/usr/local/bin#
まず、トップディレクトリに cdroot
kup:/tmp/mnt/share/debian/root/usr/local/bin# chroot /tmp/mnt/share/debian/root kup:/#
kup:/# apt-get update Get:1 http://ftp2.jp.debian.org etch Release.gpg [378B] Get:2 http://ftp2.jp.debian.org proposed-updates Release.gpg [189B] : : Get:37 http://ftp2.jp.debian.org proposed-updates/contrib [20B] Get:38 http://ftp2.jp.debian.org proposed-updates/non-free 2007-03-05-0806.13.pdiff [410B] Ign http://ftp2.jp.debian.org proposed-updates/non-free 2007-03-05-0806.13.pdiff Get:39 http://ftp2.jp.debian.org proposed-updates/non-free [837B] Fetched 8112kB in 21s (373kB/s) Reading package lists... Done kup:/# apt-get upgrade Reading package lists... Done Building dependency tree... Done The following packages will be upgraded: bsdutils debconf debconf-i18n debian-archive-keyring dhcp-client e2fslibs e2fsprogs findutils libblkid1 libc6 libcomerr2 libpam-modules libpam-runtime libpam0g libpcre3 libperl5.8 libss2 libssl0.9.7 libssl0.9.8 libuuid1 locales lsb-base mount perl-base tar tzdata util-linux 27 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 14.3MB of archives. After unpacking 81.9kB disk space will be freed. Do you want to continue [Y/n]? y Get:1 http://ftp2.jp.debian.org etch/updates/main bsdutils 1:2.12r-19etch1 [68.5kB] Get:2 http://ftp2.jp.debian.org etch/main tzdata 2007j-1etch1 [690kB] Get:3 http://ftp2.jp.debian.org etch/main libc6 2.3.6.ds1-13etch4 [3940kB] Get:4 http://ftp2.jp.debian.org etch/main e2fslibs 1.39+1.40-WIP-2006.11.14+dfsg-2etch1 [90.4kB] : : Get:27 http://ftp2.jp.debian.org etch/main libssl0.9.7 0.9.7k-3.1etch1 [672kB] Fetched 14.3MB in 17s (797kB/s) : : Setting up locales (2.3.6.ds1-13etch4) ... Generating locales (this might take a while)... ja_JP.EUC-JP... done ja_JP.UTF-8... done Generation complete. Setting up libssl0.9.7 (0.9.7k-3.1etch1) ... kup:/#
kup:/# pwconv kup:/# head /etc/passwd root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh lp:x:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh kup:/#OK
kup:/# apt-get install psmisc Reading package lists... Done Building dependency tree... Done The following NEW packages will be installed: psmisc 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 79.7kB of archives. After unpacking 275kB of additional disk space will be used. Get:1 http://ftp2.jp.debian.org etch/main psmisc 22.3-1 [79.7kB] Fetched 79.7kB in 0s (138kB/s) Selecting previously deselected package psmisc. (Reading database ... 8692 files and directories currently installed.) Unpacking psmisc (from .../archives/psmisc_22.3-1_arm.deb) ... Setting up psmisc (22.3-1) ... kup:/#
kup:/# dpkg -P nvi (Reading database ... 8726 files and directories currently installed.) Removing nvi ... Purging configuration files for nvi ... kup:/#
kup:/# apt-get install vim Reading package lists... Done Building dependency tree... Done The following extra packages will be installed: vim-common vim-runtime Suggested packages: ctags vim-doc vim-scripts The following NEW packages will be installed: vim vim-common vim-runtime 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 7324kB of archives. After unpacking 24.0MB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://ftp2.jp.debian.org etch/main vim-common 1:7.0-122+1etch3 [206kB] Get:2 http://ftp2.jp.debian.org etch/main vim-runtime 1:7.0-122+1etch3 [6362kB] Get:3 http://ftp2.jp.debian.org etch/main vim 1:7.0-122+1etch3 [756kB] Fetched 7324kB in 7s (1004kB/s) Selecting previously deselected package vim-common. (Reading database ... 8700 files and directories currently installed.) Unpacking vim-common (from .../vim-common_1%3a7.0-122+1etch3_arm.deb) ... Selecting previously deselected package vim-runtime. Unpacking vim-runtime (from .../vim-runtime_1%3a7.0-122+1etch3_all.deb) ... Selecting previously deselected package vim. Unpacking vim (from .../vim_1%3a7.0-122+1etch3_arm.deb) ... Setting up vim-common (7.0-122+1etch3) ... Setting up vim-runtime (7.0-122+1etch3) ... Processing /usr/share/vim/addons/doc Setting up vim (7.0-122+1etch3) ... kup:/#
kup:/# apt-get clean kup:/#
kup:/# exit exit kup:/tmp/mnt/share/debian/root/usr/local/bin#
kup:/tmp/mnt/share/debian/root/usr/local/bin# cd ../../.. kup:/tmp/mnt/share/debian/root# tar zcvf ../LS-GL_hackkit_2.10.tar.gz . : : ./var/tmp/ ./var/opt/ ./var/mail/ kup:/tmp/mnt/share/debian/root#できたかな。
|
|
← 新型 LS-GL にハックキット(4)電源が切れない |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ 新型 LS-GL に ハックキット 2.1(1)インストール |