詳しい人にかかれば、すっと解決できるんだろうが、、、(汗)
さて、何をコピーしようか。
root@UDE:~# mkdir /mnt/debinst/usr/local/buffalo root@UDE:/# root@UDE:/# tar cf - lib/ld-* lib/libc-2.3.6.so lib/libc.so.6|(cd /mnt/debinst/usr/local/buffalo/; tar xvf -) lib/libc.so.6 lib/libc-2.3.6.so lib/ld-linux.so.3 lib/ld-linux.so.2 lib/ld-2.3.6.so root@UDE:/# tar cf - usr/local/sbin/miconmon |(cd /mnt/debinst/usr/local/buffalo/; tar xvf -) usr/local/sbin/miconmon root@UDE:/#たったこれだけでは、動かないかな???
root@UDE:/# chroot /mnt/debinst/usr/local/buffalo /usr/local/sbin/miconmon miconmon 1.00b3 started (Builddate May 27 2006 23:04:05) root@UDE:/#何かそれなりに動いたみたい
root@UDE:/# echo 'chroot /usr/local/buffalo $0 $*' > /mnt/debinst/usr/local/sbin/miconmon root@UDE:/# chmod +x /mnt/debinst/usr/local/sbin/miconmon$0 は自分自身。この場合 /usr/local/sbin/miconmon
root@UDE:/# chroot /mnt/debinst sh-2.05b# /usr/local/sbin/miconmon miconmon 1.00b3 started (Builddate May 27 2006 23:04:05) sh-2.05b#いけそー
まずは、標準ファームから /etc/init.d/miconmon.sh をいただく
root@UDE:~# cp /etc/init.d/miconmon.sh /mnt/debinst/etc/init.d root@UDE:~#テキトーにシンボリックリンクを張る
root@UDE:/mnt/debinst/etc# ln -s ../init.d/miconmon.sh rc0.d/K15miconmon root@UDE:/mnt/debinst/etc# ln -s ../init.d/miconmon.sh rc6.d/K15miconmon root@UDE:/mnt/debinst/etc# ln -s ../init.d/miconmon.sh rc1.d/S50miconmon root@UDE:/mnt/debinst/etc# ln -s ../init.d/miconmon.sh rcS.d/S50miconmon root@UDE:/mnt/debinst/etc# ln -s ../init.d/miconmon.sh rc2.d/S50miconmon root@UDE:/mnt/debinst/etc# ln -s ../init.d/miconmon.sh rc3.d/S50miconmon root@UDE:/mnt/debinst/etc# ln -s ../init.d/miconmon.sh rc4.d/S50miconmon root@UDE:/mnt/debinst/etc# ln -s ../init.d/miconmon.sh rc5.d/S50miconmon root@UDE:/mnt/debinst/etc# ls -l rc?.d/*miconmon* lrwxrwxrwx 1 root root 21 Sep 8 03:04 rc0.d/K15miconmon -> ../init.d/miconmon.sh lrwxrwxrwx 1 root root 21 Sep 8 03:06 rc1.d/S50miconmon -> ../init.d/miconmon.sh lrwxrwxrwx 1 root root 21 Sep 8 03:06 rc2.d/S50miconmon -> ../init.d/miconmon.sh lrwxrwxrwx 1 root root 21 Sep 8 03:06 rc3.d/S50miconmon -> ../init.d/miconmon.sh lrwxrwxrwx 1 root root 21 Sep 8 03:06 rc4.d/S50miconmon -> ../init.d/miconmon.sh lrwxrwxrwx 1 root root 21 Sep 8 03:06 rc5.d/S50miconmon -> ../init.d/miconmon.sh lrwxrwxrwx 1 root root 21 Sep 8 03:04 rc6.d/K15miconmon -> ../init.d/miconmon.sh lrwxrwxrwx 1 root root 21 Sep 8 03:06 rcS.d/S50miconmon -> ../init.d/miconmon.sh root@UDE:/mnt/debinst/etc#こんなんでええのか。
: : miconmon 1.00b3 started (Builddate May 27 2006 23:04:05) set_fan_speed_nonlinear>now_temperature=0[deg] now_fanspeed=stop set_fan_speed_nonlinear>setted_fanspeed=stop : : Debian GNU/Linux testing/unstable (none) ttyS0 (none) login:起動してきた。
set_fan_speed_nonlinear>now_temperature=0[deg] now_fanspeed=stop set_fan_speed_nonlinear>setted_fanspeed=stopと表示される。
標準ファームでブート。miconapl をコピーする
root@UDE:~# mount /dev/sdb2 /mnt/debinst root@UDE:~# cd / root@UDE:/# tar cf - usr/local/sbin/miconapl |(cd /mnt/debinst/usr/local/buffalo/; tar xvf -) usr/local/sbin/miconapl root@UDE:/# echo 'chroot /usr/local/buffalo $0 $*' > /mnt/debinst/usr/local/sbin/miconapl root@UDE:/# chmod +x !$ chmod +x /mnt/debinst/usr/local/sbin/miconapl root@UDE:/# chroot /mnt/debinst /usr/local/sbin/miconapl -a fan_get_speed /usr/local/sbin/miconapl: error while loading shared libraries: libbuffalo_bin.so: cannot open shared object file: No such file or directory root@UDE:/#libbuffalo_bin.so が要るみたい。コピーする
root@UDE:/# tar cf - usr/local/lib/libbuffalo_bin.* |(cd /mnt/debinst/usr/local/buffalo/; tar xvf -) usr/local/lib/libbuffalo_bin.so usr/local/lib/libbuffalo_bin.a root@UDE:/#再度実行
root@UDE:/# chroot /mnt/debinst /usr/local/sbin/miconapl -a fan_get_speed /usr/local/sbin/miconapl: error while loading shared libraries: libbuffalo_bin.so: cannot open shared object file: No such file or directory root@UDE:/#root@UDE:/#ldconfig が必要。
root@UDE:/# mkdir /mnt/debinst/usr/local/buffalo/etc root@UDE:/# echo /usr/local/lib > /mnt/debinst/usr/local/buffalo/etc/ld.so.conf root@UDE:/# which ldconfig /sbin/ldconfig root@UDE:/# tar cf - sbin/ldconfig|(cd /mnt/debinst/usr/local/buffalo; tar xvf -) root@UDE:/# chroot /mnt/debinst/usr/local/buffalo ldconfig root@UDE:/# chroot /mnt/debinst /usr/local/sbin/miconapl -a fan_get_speed micon device open fail.: No such file or directory micon device open fail.: No such file or directory micon device open fail.: No such file or directory micon device open fail.: No such file or directory micon device open fail.: No such file or directory micon device open fail.: No such file or directory miconapl giveup err: Initialize: device[/dev/ttyS1] open fail.(errno=29) err: Initialize: device[/dev/ttyS1] open fail.(errno=29) root@UDE:/#動いたことは動いたけど、今度はデバイスがないと。
root@UDE:/# tar cf - dev/ttyS1 |(cd /mnt/debinst/usr/local/buffalo; tar xvf -) dev/ttyS1 root@UDE:/# chroot /mnt/debinst /usr/local/sbin/miconapl -a fan_get_speed err: Initialize: file[/var/lock/miconapl] open fail. err: Initialize: file[/var/lock/miconapl] open fail.今度は、ロックファイルを作る場所か。作る
root@UDE:/# mkdir /mnt/debinst/usr/local/buffalo/var root@UDE:/# mkdir /mnt/debinst/usr/local/buffalo/var/lock root@UDE:/# chroot /mnt/debinst /usr/local/sbin/miconapl -a fan_get_speed #[miconapl.fan_get_speed] fan_rpm=0 root@UDE:/#fan_rpm がぜろ?
root@UDE:/# chroot /mnt/debinst /usr/local/sbin/miconapl -a fan_set_speed fastは効いているし、とりあえずよしとする。
あかん。LED が点滅。
(none):~# miconapl -a fan_set_speed full (none):~# miconapl -a fan_get_speed #[miconapl.fan_get_speed] fan_rpm=3420 (none):~#miconapl は単独で動いているのに、、、
set_fan_speed_nonlinear>now_temperature=0[deg] now_fanspeed=stop set_fan_speed_nonlinear>setted_fanspeed=stopmiconmon には情報が取れていないみたい。
root@UDE:/# chroot /mnt/debinst/usr/local/buffalo/ chroot: cannot execute /bin/sh: No such file or directory root@UDE:/#やっぱり /bin/sh が必要
root@UDE:/# ls -l bin/sh lrwxrwxrwx 1 root root 4 Jul 30 17:15 bin/sh -> bash root@UDE:/# ls -l bin/sh bin/bash -rwxr-xr-x 1 root root 619848 Jun 21 11:12 bin/bash lrwxrwxrwx 1 root root 4 Jul 30 17:15 bin/sh -> bash root@UDE:/#bash にシンボリックリンクされているので、bash もろともコピーする
root@UDE:/# tar cf - bin/sh bin/bash |(cd /mnt/debinst/usr/local/buffalo/; tar xvf -) bin/bash bin/sh root@UDE:/#今度こそ、、、
root@UDE:/# chroot /mnt/debinst/usr/local/buffalo/ /bin/sh: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory root@UDE:/# ls /lib/libdl* /lib/libdl-2.3.6.so /lib/libdl.so.2 root@UDE:/# tar cf - lib/libdl* | (cd /mnt/debinst/usr/local/buffalo/; tar xvf -) lib/libdl.so.2 lib/libdl-2.3.6.so root@UDE:/# chroot /mnt/debinst/usr/local/buffalo/ /bin/sh: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory root@UDE:/# tar cf - lib/libgcc_s.so* | (cd /mnt/debinst/usr/local/buffalo/; tar xvf -) lib/libgcc_s.so.1 lib/libgcc_s.so root@UDE:/# chroot /mnt/debinst/usr/local/buffalo/ sh-2.05b#足りないものをどんどんコピーして、とりあえず chroot できるようになった。
root@UDE:~# chroot /mnt/debinst/usr/local/buffalo /usr/local/sbin/miconmon miconmon 1.00b3 started (Builddate May 27 2006 23:04:05) root@UDE:~# sh: line 1: grep: command not found sh: line 1: grep: command not foundgrep も必要か。
root@UDE:~# which grep /bin/grep root@UDE:~# ls -l /bin/grep lrwxrwxrwx 1 root root 7 Jul 30 17:15 /bin/grep -> busybox root@UDE:~# cd / root@UDE:/# tar cf - bin/grep bin/busybox |(cd /mnt/debinst/usr/local/buffalo/; tar xvf -) bin/busybox bin/grep root@UDE:/#もう一度
root@UDE:/# chroot /mnt/debinst/usr/local/buffalo /usr/local/sbin/miconmon miconmon 1.00b3 started (Builddate May 27 2006 23:04:05) root@UDE:/# grep: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory grep: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory root@UDE:/#しつこいなぁ。。。
root@UDE:/# ls -l /lib/libcrypt* -rwxr-xr-x 1 root root 22464 Jun 21 11:12 /lib/libcrypt-2.3.6.so lrwxrwxrwx 1 root root 17 Jul 30 17:15 /lib/libcrypt.so.1 -> libcrypt-2.3.6.so root@UDE:/# tar cf - lib/libcrypt* | (cd /mnt/debinst/usr/local/buffalo/; tar xvf -) lib/libcrypt.so.1 lib/libcrypt-2.3.6.so root@UDE:/# chroot /mnt/debinst/usr/local/buffalo /usr/local/sbin/miconmon miconmon 1.00b3 started (Builddate May 27 2006 23:04:05) root@UDE:/# grep: error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory grep: error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory root@UDE:/# tar cf - lib/libm.* lib/libm-* | (cd /mnt/debinst/usr/local/buffalo/; tar xvf -) lib/libm-2.3.6.so lib/libm.so.6 root@UDE:/# chroot /mnt/debinst/usr/local/buffalo /usr/local/sbin/miconmon miconmon 1.00b3 started (Builddate May 27 2006 23:04:05) root@UDE:/#とうとう黙らせた!
miconmon 1.00b3 started (Builddate May 27 2006 23:04:05) set_fan_speed_nonlinear>now_temperature=40[deg] now_fanspeed=stop set_fan_speed_nonlinear>setted_fanspeed=stop Initializing random number generator...done. Recovering nvi editor sessions...none found. INIT: Entering runlevel: 2 Starting system log daemon: syslogd. Starting kernel log daemon: klogd. Starting MTA: exim4. Starting internet superserver: inetd. miconmon 1.00b3 started (Builddate May 27 2006 23:04:05) Starting deferred execution scheduler: atd. Starting periodic command scheduler: cron. set_fan_speed_nonlinear>now_temperature=40[deg] now_fanspeed=stop set_fan_speed_nonlinear>setted_fanspeed=stop Debian GNU/Linux testing/unstable (none) ttyS0 (none) login:40[deg] と表示されているので、とりあえず動き出したようだ。
ところが、、、
POWER LED は点滅のまま。。(汗)
← LS-GL:debian:動かない miconmon |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ LS-GL:debian:POWER LED 点滅解除 |