Sep 18 01:21:57 qube kernel: usb 2-1: new high speed USB device using ehci_marvell and address 2 Sep 18 01:21:57 qube kernel: usb 2-1: configuration #1 chosen from 1 choice Sep 18 01:21:57 qube kernel: scsi2 : SCSI emulation for USB Mass Storage devices Sep 18 01:22:02 qube kernel: scsi 2:0:0:0: Direct-Access ViPowER VP-89118(SD1) 2.10 PQ: 0 ANSI: 4 Sep 18 01:22:03 qube kernel: sd 2:0:0:0: [sdd] 488397168 512-byte hardware sectors (250059 MB) Sep 18 01:22:03 qube kernel: sd 2:0:0:0: [sdd] Write Protect is off Sep 18 01:22:03 qube kernel: sd 2:0:0:0: [sdd] 488397168 512-byte hardware sectors (250059 MB) Sep 18 01:22:03 qube kernel: sd 2:0:0:0: [sdd] Write Protect is off Sep 18 01:22:03 qube kernel: sdd: sdd1 sdd2 sdd3 sdd4 Sep 18 01:22:03 qube kernel: sd 2:0:0:0: [sdd] Attached SCSI disk Sep 18 01:22:03 qube kernel: sd 2:0:0:0: Attached scsi generic sg3 type 0 ^C root@qube:~# mkdir /tmp/boot root@qube:~# mount /dev/sdd1 /tmp/boot
root@qube:~# rm /tmp/boot/initrd.buffalo /tmp/boot/uImage.buffalo root@qube:~#
root@qube:~# umount /tmp/boot root@qube:~#
root@qube:/srv/tftp/ls400-111# vi remakeinitrd.sh : : root@qube:/srv/tftp/ls400-111# !cat cat remakeinitrd.sh set -x cp initrd.buffalo{.orig,} dd if=initrd.buffalo of=/tmp/initrd.gz bs=64 skip=1 gunzip /tmp/initrd.gz mkdir root cd root cat /tmp/initrd | cpio -id ( echo mkdir /tmp/root echo mount /dev/sda2 /tmp/root echo exec /sbin/switch_root /tmp/root /sbin/init ) > init cp init /tmp find . -depth -print | cpio -ov > /tmp/initrd cd .. rm -fr root gzip /tmp/initrd mkimage -A ARM -O Linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs -d /tmp/initrd.gz initrd.buffalo rm -f /tmp/initrd.gz root@qube:/srv/tftp/ls400-111#実行する
root@qube:/srv/tftp/ls400-111# bash !$ bash remakeinitrd.sh + cp initrd.buffalo.orig initrd.buffalo + dd if=initrd.buffalo of=/tmp/initrd.gz bs=64 skip=1 185731+1 records in 185731+1 records out 11886820 bytes (12 MB) copied, 7.32906 s, 1.6 MB/s + gunzip /tmp/initrd.gz + mkdir root + cd root + cat /tmp/initrd + cpio -id 52829 blocks + echo mkdir /tmp/root + echo mount /dev/sda2 /tmp/root + echo exec /sbin/switch_root /tmp/root /sbin/init + cp init /tmp + find . -depth -print + cpio -ov ./usr/lib/libreadline.so.6.2 ./usr/lib/libstdc++.so.6.0.16-gdb.py ./usr/lib/libkmod.so.2 ./usr/lib/libe2p.so.2 ./usr/lib/libpopt.so.0 : : ./debugtool ./www/cgi-bin/resume.cgi ./www/cgi-bin/query.cgi ./www/cgi-bin ./www . 52586 blocks + cd .. + rm -fr root + gzip /tmp/initrd + mkimage -A ARM -O Linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs -d /tmp/initrd.gz initrd.buffalo Image Name: initramfs Created: Fri Sep 20 00:08:25 2013 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 11908611 Bytes = 11629.50 kB = 11.36 MB Load Address: 0x00000000 Entry Point: 0x00000000 + rm -f /tmp/initrd.gz root@qube:/srv/tftp/ls400-111#
白点滅
tftp サーバに取りに来る
root@qube:/srv/tftp/ls400-111# tail -f /var/log/daemon.log : : Sep 20 00:09:34 qube in.tftpd[1305]: connect from 192.168.11.150 (192.168.11.150) Sep 20 00:09:34 qube tftpd[1307]: tftpd: trying to get file: uImage.buffalo Sep 20 00:09:34 qube tftpd[1307]: tftpd: serving file from /srv/tftp Sep 20 00:09:35 qube in.tftpd[1308]: connect from 192.168.11.150 (192.168.11.150) Sep 20 00:09:35 qube tftpd[1309]: tftpd: trying to get file: initrd.buffalo Sep 20 00:09:35 qube tftpd[1309]: tftpd: serving file from /srv/tftp白点灯!!
root@qube:/srv/tftp/ls400-111# telnet ls410d Trying 192.168.2.57... telnet: Unable to connect to remote host: Connection refused root@qube:/srv/tftp/ls400-111#うーん。
root@qube:/srv/tftp/ls400-111# ping !$ ping ls410d PING ls410d.yamasita.jp (192.168.2.57) 56(84) bytes of data. 64 bytes from ls410d.yamasita.jp (192.168.2.57): icmp_req=1 ttl=64 time=0.287 ms 64 bytes from ls410d.yamasita.jp (192.168.2.57): icmp_req=2 ttl=64 time=0.240 ms --- ls410d.yamasita.jp ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 0.240/0.263/0.287/0.028 ms root@qube:/srv/tftp/ls400-111#ping は通る!!
192.168.2.57 という IP アドレスが現れたことから、 きっと Debian は動いてる!!
電源が落ちた。。。。動いてる!!
|
← initrd の /init を見る(2) |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ ハックキットは動いている?? |
Copyright (C) 2003-2013 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市