実験用 HDD の作成

LS410D

なぜ Debian が起動しないかなど、 色々調べるために、実験用 HDD を作成する。

Hack BBS で INFINITI さんが HDD の交換に成功 されているので、同じように tftp BOOT の方法をとることにする。

ごそごそ

ファームウェアの展開

ls400-111.exe を実行して作成される C:\BUFFALO\ls400-111 を Windows のエクスプローラを使って tftp サーバである LS-QL に転送する。

initrd.img を unzip する。

yasunari@qube:~$ cd /mnt/disk1/tmp/ls400-111
yasunari@qube:/mnt/disk1/tmp/ls400-111$ ls
LSUpdater.exe  hddrootfs.img  initrd.img               linkstation_version.txt  uImage.img  update.html
LSUpdater.ini  img            linkstation_version.ini  u-boot.img               update.BAK
yasunari@qube:/mnt/disk1/tmp/ls400-111$ unzip uImage.img
Archive:  uImage.img
[uImage.img] uImage.buffalo password:
password incorrect--reenter:
  inflating: uImage.buffalo
yasunari@qube:/mnt/disk1/tmp/ls400-111$
つづいて、initrd.img も unzip する
yasunari@qube:/mnt/disk1/tmp/ls400-111$ unzip initrd.img
Archive:  initrd.img
[initrd.img] initrd.buffalo password:
  inflating: initrd.buffalo
yasunari@qube:/mnt/disk1/tmp/ls400-111$
これらを tftp サーバのディレクトリに置く。
yasunari@qube:/mnt/disk1/tmp/ls400-111$ ls /srv/tftp/
HS-DHGL_1.20   LS-CL_1.07    LS-QL_1.05+telnet  LS-VL+X             LS-XHL_1.10     ls_series-157
LS-CHL_1.10    LS-CL_1.11    LS-QL_1.07b        LS-WSGL_1.06        SheevaPlug_1.2  ls_series-160
LS-CHL_1.20    LS-GL_1.15    LS-QL_1.10b        LS-XHL_1.02         TS-WXL_1.06     ls_series-160_88f5182
LS-CHL_1.21    LS-HGL_1.07b  LS-SL_1.11         LS-XHL_1.02+telnet  initrd.buffalo  uImage.buffalo
LS-CL+HackKit  LS-LGL_2.01   LS-SL_1.24         LS-XHL_1.04b        ls_series-156
yasunari@qube:/mnt/disk1/tmp/ls400-111$ mkdir /srv/tftp/ls400-111
yasunari@qube:/mnt/disk1/tmp/ls400-111$ mv initrd.buffalo uImage.buffalo !$
mv initrd.buffalo uImage.buffalo /srv/tftp/ls400-111
yasunari@qube:/mnt/disk1/tmp/ls400-111$ cd !$
cd /srv/tftp/ls400-111
yasunari@qube:/srv/tftp/ls400-111$ ls
initrd.buffalo  uImage.buffalo
yasunari@qube:/srv/tftp/ls400-111$ cd ..
yasunari@qube:/srv/tftp$ ls -l initrd.buffalo uImage.buffalo
-rw-r--r-- 2 yasunari yamasita 9617733 2012-06-18 18:58 initrd.buffalo
-rw-r--r-- 2 yasunari yamasita 2135044 2012-06-08 11:01 uImage.buffalo
yasunari@qube:/srv/tftp$ rm initrd.buffalo uImage.buffalo
yasunari@qube:/srv/tftp$ ln ls400-111/initrd.buffalo .
yasunari@qube:/srv/tftp$ ln ls400-111/uImage.buffalo .
yasunari@qube:/srv/tftp$ !ls
ls -l initrd.buffalo uImage.buffalo
-rwxr-xr-x 2 yasunari yamasita 11886884 2013-07-04 22:18 initrd.buffalo
-rwxr-xr-x 2 yasunari yamasita  2894416 2013-07-04 22:18 uImage.buffalo
yasunari@qube:/srv/tftp$

パーティションを削除した HDD を用意する

Seagate Barracuda ST3320820AS を USB で LS-QL に接続、
root@qube:~# tail /var/log/messages
Sep 14 10:15:04 qube kernel: usb 2-1: configuration #1 chosen from 1 choice
Sep 14 10:15:04 qube kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Sep 14 10:15:09 qube kernel: scsi 2:0:0:0: Direct-Access     ViPowER  VP-89118(SD1)    2.10 PQ: 0 ANSI: 4
Sep 14 10:15:09 qube kernel: sd 2:0:0:0: [sdd] 625000320 512-byte hardware sectors (320000 MB)
Sep 14 10:15:09 qube kernel: sd 2:0:0:0: [sdd] Write Protect is off
Sep 14 10:15:09 qube kernel: sd 2:0:0:0: [sdd] 625000320 512-byte hardware sectors (320000 MB)
Sep 14 10:15:09 qube kernel: sd 2:0:0:0: [sdd] Write Protect is off
Sep 14 10:15:09 qube kernel: sdd: sdd1
Sep 14 10:15:09 qube kernel: sd 2:0:0:0: [sdd] Attached SCSI disk
Sep 14 10:15:09 qube kernel: sd 2:0:0:0: Attached scsi generic sg3
type 0
root@qube:~# fdisk /dev/sdd

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): p

Disk /dev/sdd: 320.0 GB, 320000163840 bytes
255 heads, 63 sectors/track, 38904 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000eb940

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1       38904   312496348+   7  HPFS/NTFS

Command (m for help): d
Selected partition 1

Command (m for help): p

Disk /dev/sdd: 320.0 GB, 320000163840 bytes
255 heads, 63 sectors/track, 38904 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000eb940

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
root@qube:~# parted -s /dev/sdd print
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Model: ViPowER VP-89118(SD1) (scsi)
Disk /dev/sdd: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags

root@qube:~#
一体これはなんの HDD だったのだろう(藁

tftp boot

HDD を LS400D にセットして起動。

E07 で起動。「ハードディスクが接続されていません」ん?

FUNC ボタンを押す。Power LED が激しく点滅。

ftp サーバにファームを取りに来る

root@qube:/var/log# tail daemon.log
	:
Sep 14 10:23:40 qube in.tftpd[1331]: connect from 192.168.11.150 (192.168.11.150)
Sep 14 10:23:40 qube tftpd[1332]: tftpd: trying to get file: uImage.buffalo
Sep 14 10:23:40 qube tftpd[1332]: tftpd: serving file from /srv/tftp
Sep 14 10:23:42 qube in.tftpd[1333]: connect from 192.168.11.150 (192.168.11.150)
Sep 14 10:23:42 qube tftpd[1334]: tftpd: trying to get file: initrd.buffalo
Sep 14 10:23:42 qube tftpd[1334]: tftpd: serving file from /srv/tftp
root@qube:/var/log#
しばらくして、Power LED が白点灯。

ファームウェアアップデータの実行

C:\BUFFALO\ls400-111\LSUpdater.exe を実行。 LS410D-EM06E が見つかり、「ファームウェア更新」

HDD のパーティション情報が確認できませんでした。
ファームウェアをアップデートすることができません。

アップデートを中止します

パーティションを切る

HDD を取り外し、再度 USB で LS-QL に接続。
root@qube:~# tail /var/log/messages
Sep 14 10:30:01 qube kernel: program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 14 10:30:01 qube kernel: program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
Sep 14 10:30:05 qube kernel: scsi 3:0:0:0: Direct-Access     ViPowER  VP-89118(SD1)    2.10 PQ: 0 ANSI: 4
Sep 14 10:30:05 qube kernel: sd 3:0:0:0: [sdd] 625000320 512-byte hardware sectors (320000 MB)
Sep 14 10:30:05 qube kernel: sd 3:0:0:0: [sdd] Write Protect is off
Sep 14 10:30:05 qube kernel: sd 3:0:0:0: [sdd] 625000320 512-byte hardware sectors (320000 MB)
Sep 14 10:30:05 qube kernel: sd 3:0:0:0: [sdd] Write Protect is off
Sep 14 10:30:05 qube kernel: sdd:
Sep 14 10:30:05 qube kernel: sd 3:0:0:0: [sdd] Attached SCSI disk
Sep 14 10:30:05 qube kernel: sd 3:0:0:0: Attached scsi generic sg3 type 0
root@qube:~#
さて、、、、 HDD の中を見た時、
root@qube:~# parted  -s /dev/sdd print
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Model: ViPowER VP-89118(SD1) (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name     Flags
 1      17.4kB  1024MB  1024MB  ext3            primary
 2      1024MB  6144MB  5119MB  ext3            primary
 3      6144MB  6144MB  394kB                   primary  bios_grub
 4      6144MB  6144MB  512B                    primary
 5      6144MB  7168MB  1024MB  linux-swap(v1)  primary
 6      7168MB  992GB   985GB   xfs             primary

root@qube:~#
だったので、同じように。

まずは、Partition Table

root@qube:~# parted -s /dev/sdd mklabel gpt
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Error: Partition(s) 16 on /dev/sdd have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
root@qube:~# parted -s /dev/sdd print
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Model: ViPowER VP-89118(SD1) (scsi)
Disk /dev/sdd: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

root@qube:~#
書けているみたい。

root@qube:~# parted -s /dev/sdd mkpart primary ext3 0 1024M
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Warning: The resulting partition is not properly aligned for best performance.
Error: Partition(s) 16 on /dev/sdd have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
root@qube:~# parted -s /dev/sdd mkpart primary ext3 1024M 5119M
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Error: Partition(s) 16 on /dev/sdd have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
root@qube:~# parted -s /dev/sdd print
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Model: ViPowER VP-89118(SD1) (scsi)
Disk /dev/sdd: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  1024MB  1024MB               primary

root@qube:~# parted -s /dev/sdd mkpart primary 6144M 6144M
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Error: Partition(s) 16 on /dev/sdd have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
root@qube:~# parted -s /dev/sdd print
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Model: ViPowER VP-89118(SD1) (scsi)
Disk /dev/sdd: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  1024MB  1024MB               primary
 2      6144MB  6145MB  1049kB               primary

root@qube:~#
ちょっと違うけど、いいか。
root@qube:~# parted -s /dev/sdd mkpart primary 6145M 6145M
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Error: Partition(s) 16 on /dev/sdd have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
root@qube:~# parted -s /dev/sdd print
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Model: ViPowER VP-89118(SD1) (scsi)
Disk /dev/sdd: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  1024MB  1024MB               primary
 2      6144MB  6145MB  1049kB               primary
 3      6145MB  6146MB  1049kB               primary

root@qube:~# parted -s /dev/sdd mkpart primary linux-swap 6146M 7166M
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Error: Partition(s) 16 on /dev/sdd have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
root@qube:~# parted -s /dev/sdd print
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Model: ViPowER VP-89118(SD1) (scsi)
Disk /dev/sdd: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  1024MB  1024MB               primary
 2      6144MB  6145MB  1049kB               primary
 3      6145MB  6146MB  1049kB               primary
 4      6146MB  7166MB  1020MB               primary

root@qube:~# parted -s /dev/sdd mkpart primary 7166M 320G
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Error: Partition(s) 16 on /dev/sdd have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
root@qube:~# parted -s /dev/sdd print
Warning: Could not determine physical sector size for /dev/sdd.
Using the logical sector size (512).
Model: ViPowER VP-89118(SD1) (scsi)
Disk /dev/sdd: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  1024MB  1024MB               primary
 2      6144MB  6145MB  1049kB               primary
 3      6145MB  6146MB  1049kB               primary
 4      6146MB  7166MB  1020MB               primary
 5      7166MB  320GB   313GB                primary

root@qube:~#
こんなトコロか。

再度 tftp boot

E07

func ボタンを押す。

再度ファームウェアアップデータを実行

LSUpdater.exe を起動。
HDD のパーティション情報が確認できませんでした。
ファームウェアをアップデートすることができません。

アップデートを中止します
あれ?



LS410D

楽天市場
Amazon


Debian をインストールする(3)再現
ハックの記録
LinkStation/玄箱 をハックしよう

実験用 HDD の作成(2)

ツイート Tweet to @yasunari_y @yasunari_yをフォロー

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