さて、RAID1 のシステムをどうやって書き換えればよい?
qube:~# tail -f /var/log/messages : : Feb 27 07:10:19 qube kernel: usb 2-1: new high speed USB device using ehci_marvell and address 2 Feb 27 07:10:20 qube kernel: usb 2-1: configuration #1 chosen from 1 choice Feb 27 07:10:20 qube kernel: scsi2 : SCSI emulation for USB Mass Storage devices Feb 27 07:10:25 qube kernel: scsi 2:0:0:0: Direct-Access ViPowER VP-89118(SD1) 2.10 PQ: 0 ANSI: 4 Feb 27 07:10:25 qube kernel: sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB) Feb 27 07:10:25 qube kernel: sd 2:0:0:0: [sdb] Write Protect is off Feb 27 07:10:25 qube kernel: sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB) Feb 27 07:10:25 qube kernel: sd 2:0:0:0: [sdb] Write Protect is off Feb 27 07:10:25 qube kernel: sdb: sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 Feb 27 07:10:25 qube kernel: sd 2:0:0:0: [sdb] Attached SCSI disk Feb 27 07:10:25 qube kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
qube:~# mkdir /tmp/root qube:~# mount -t ext3 /dev/sdb2 /tmp/root qube:~# ls /tmp/root bin boot dev etc home initrd lib lost+found mnt modules proc root sbin sys tmp usr var www qube:~#
qube:~# cd /tmp/root/etc/ qube:/tmp/root/etc# mv shadow shadow.orig qube:/tmp/root/etc# sed -e 's/^root:[^:]*:/root::/' shadow.orig > shadow qube:/tmp/root/etc# grep root shadow root::11009:0:99999:7::: qube:/tmp/root/etc# chmod 600 shadow qube:/tmp/root/etc# ls -l shadow* -rw------- 1 root root 344 Feb 27 07:12 shadow -rw-r--r-- 1 root root 370 Jan 27 2009 shadow.orig qube:/tmp/root/etc#
qube:/tmp/root/etc# tail init.d/rcS /usr/local/bin/share_delete.sh & exec_sh pmcd.sh VER=`grep "^VERSION=" ${RELEASE_FILE} |sed -e "s%.*=%%"` SUB_VER=`grep "^SUBVERSION=" ${RELEASE_FILE} |sed -e "s%.* %%"` BUILDDATE=`grep "^BUILDDATE=" ${RELEASE_FILE} |sed -e "s%.*=%%"` logger -t ${LOGTAG} -p ${LOGFACILITY} "${VER}-${SUB_VER} ${BUILDDATE} started!" echo "${VER}-${SUB_VER} ${BUILDDATE} started!" > /dev/console /etc/init.d/wol.sh start wol_ready_check qube:/tmp/root/etc# echo >> init.d/rcS qube:/tmp/root/etc# ls -l ../usr/sbin/telnetd lrwxrwxrwx 1 root root 17 Feb 27 06:52 ../usr/sbin/telnetd -> ../../bin/busybox qube:/tmp/root/etc# echo /usr/sbin/telnetd >> init.d/rcS qube:/tmp/root/etc#
qube:/tmp/root/etc# echo /usr/local/sbin/miconapl -a serialmode_console >> init.d/rcS qube:/tmp/root/etc# tail init.d/rcS VER=`grep "^VERSION=" ${RELEASE_FILE} |sed -e "s%.*=%%"` SUB_VER=`grep "^SUBVERSION=" ${RELEASE_FILE} |sed -e "s%.* %%"` BUILDDATE=`grep "^BUILDDATE=" ${RELEASE_FILE} |sed -e "s%.*=%%"` logger -t ${LOGTAG} -p ${LOGFACILITY} "${VER}-${SUB_VER} ${BUILDDATE} started!" echo "${VER}-${SUB_VER} ${BUILDDATE} started!" > /dev/console /etc/init.d/wol.sh start wol_ready_check /usr/sbin/telnetd /usr/local/sbin/miconapl -a serialmode_console qube:/tmp/root/etc#
qube:/tmp/root/etc# cd / qube:/# umount /tmp/root qube:/#
ピーピーピーピーといって、LCD と ERROR LED が真っ赤に、
DISK1 の LED も点滅している
まずは telnet
yasunari@sil:~$ telnet 192.168.2.70 Trying 192.168.2.70... Connected to 192.168.2.70. Escape character is '^]'. BUFFALO INC. TeraStation series TS-WXL3B3 login: root No mail. root@TS-WXL3B3:~#GJ!
続いて、シリアルコンソール
BUFFALO INC. TeraStation series TS-WXL3B3 login: 3 USB_DEVICE=none 4 USB_DEVICE=none 5 USB_DEVICE=none KERNELMOn (PSW_on) Shutting down pwrmgr: BUFFALO INC. TeraStation series TS-WXL3B3 login: root Last login: Sat Feb 27 07:28:22 +0900 2010 on pts/0. No mail. root@TS-WXL3B3:~#OK.
root@TS-WXL3B3:~# tail -f /var/log/messages : : KERNELMOn (SATA 0 plugged) Feb 27 07:29:32 TS-WXL3B3 kernelmon: cmd=SATA 0 plugged何もおこらない。
Feb 27 07:30:08 TS-WXL3B3 linkstation: log saved to NAND(cron) Core Driver (ERROR) 0 0: Edma Error Reg 0x10 start to wait 1000 mili sec wait finished. Feb 27 07:31:57 TS-WXL3B3 kernel: Core Driver (ERROR) 0 0: Edma Error Reg 0x10 Feb 27 07:31:57 TS-WXL3B3 kernel: start to wait 1000 mili sec Feb 27 07:31:57 TS-WXL3B3 kernel: wait finished. ** BUFFALO Disable Command Queuing Function [0 0] ** scsi 0:0:0:0: Direct-Access SAMSUNG HD502HI 1AG0 PQ: 0 ANSI: 5 Linux IAL (ERROR) [0 0 0]: set device max sectors to 2048 /sbin/hotplug [scsi] /sbin/hotplug [scsi_disk] Linux IAL (ERROR) : retry command host=0, bus=0 SCpnt = 809e8960 sd 0:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB) sd 0:0:0:0: [sdb] Write Protect is off sd 0:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 0:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB) sd 0:0:0:0: [sdb] Write Protect is off sd 0:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sdb: sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] /sbin/hotplug [block] sd 0:0:0:0: [sdb] Attached SCSI disk /sbin/hotplug [block] /sbin/hotplug [scsi_device] sd 0:0:0:0: Attached scsi generic sg1 type 0 need re create_devlink!!! /sbin/hotplug [scsi_generic] *** /usr/local/bin/DirectCopy_wait.sh [stop] Feb 27 07:32:02 TS-WXL3B3 kernel: ** BUFFALO Disable Command Queuing Function [0 0] ** Feb 27 07:32:02 TS-WXL3B3 kernel: scsi 0:0:0:0: Direct-Access SAMSUNG HD502HI 1AG0 PQ: 0 ANSI: 5 Feb 27 07:32:02 TS-WXL3B3 kernel: Linux IAL (ERROR) [0 0 0]: set device max sectors to 2048 Feb 27 07:32:02 TS-WXL3B3 kernel: Linux IAL (ERROR) : retry command host=0, bus=0 SCpnt = 809e8960 Feb 27 07:32:02 TS-WXL3B3 kernel: sd 0:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB) Feb 27 07:32:02 TS-WXL3B3 kernel: sd 0:0:0:0: [sdb] Write Protect is off Feb 27 07:32:02 TS-WXL3B3 kernel: sd 0:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA Feb 27 07:32:02 TS-WXL3B3 kernel: sd 0:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB) Feb 27 07:32:02 TS-WXL3B3 kernel: sd 0:0:0:0: [sdb] Write Protect is off Feb 27 07:32:02 TS-WXL3B3 kernel: sd 0:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA Feb 27 07:32:02 TS-WXL3B3 kernel: sdb: sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 Feb 27 07:32:03 TS-WXL3B3 kernel: sd 0:0:0:0: [sdb] Attached SCSI disk Feb 27 07:32:03 TS-WXL3B3 kernel: sd 0:0:0:0: Attached scsi generic sg1 type 0 hdd_wakeup.sh : FLAG_FORMAT=0
ディスク1を「ディスクフォーマット」する
しばらくして、管理画面からは正常に見えるようになったが、
ERROR LED、LCD は真っ赤のまま。DISK1 の LED も点滅している。。。
root@TS-WXL3B3:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sdb2[0] sda2[1] 4999936 blocks [2/2] [UU] md10 : active raid1 sdb5[0] sda5[1] 999872 blocks [2/2] [UU] md0 : active raid1 sdb1[0] sda1[1] 999872 blocks [2/2] [UU] unused devices:同期も終わっているのに、、、root@TS-WXL3B3:~#
Buffalo さん、あかんのちゃうの?
System halted. BuffaloChangePowerStatusBeforeHalt > Check power status. MagicKey = 0x02 BuffaloGpio_ChangePowerStatus > Writing 0x7a BuffaloChangePowerStatusBeforeHalt > Changed to 0x7a from 0x02 >miconCntl_PowerOff >miconCntl_ShutdownWait pそれでも ERROR LED、LCD は真っ赤のまま。DISK1 の LED も点滅している。。。
Buffalo さん、あかんのちゃうの?
まずは telnet
yasunari@sil:~$ !tel telnet 192.168.2.70 Trying 192.168.2.70... Connected to 192.168.2.70. Escape character is '^]'. BUFFALO INC. TeraStation series TS-WXL3B3 login: root Last login: Sat Feb 27 07:43:47 +0900 2010 on ttyS0. No mail. root@TS-WXL3B3:~#
続いて、シリアルコンソール
BUFFALO INC. TeraStation series TS-WXL3B3 login: 3 USB_DEVICE=none 4 USB_DEVICE=none 5 USB_DEVICE=none KERNELMOn (PSW_on) Shutting down pwrmgr: BUFFALO INC. TeraStation series TS-WXL3B3 login: root Last login: Sat Feb 27 07:55:19 +0900 2010 on pts/0. No mail. root@TS-WXL3B3:~#OK
|
← ファームウェア アップデータ Ver.1.30 へのアップデート |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ 実験用 HDD の再作成 |