LinkStation故障→ファイル回収
まずはLinkStation(HDLAN-H160G)を分解。ほとんど玄箱と同じ。
外したHDDをIDE-USB変換ケーブルを使ってLinuxマシンに接続する。変換ケーブルはたまたま持っていたが、USB接続のCDドライブとか外付けHDDを分解しても手に入れられるので持っておくと便利。
Linuxマシンは緊急にThinkPadX31を利用。Debian-etch。USBを接続前に
tail -f /var/log/messages
としておくとUSBドライブがどのように割り当てられたか分かるので便利。
Jun 15 debianX31 kernel: usb 4-3: new high speed USB device using ehci_hcd and address 2
Jun 15 debianX31 kernel: usb 4-3: configuration #1 chosen from 1 choice
Jun 15 debianX31 kernel: Initializing USB Mass Storage driver...
Jun 15 debianX31 kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Jun 15 debianX31 kernel: usbcore: registered new driver usb-storage
Jun 15 debianX31 kernel: USB Mass Storage support registered.
Jun 15 debianX31 kernel: Vendor: WDC WD16 Model: 00AB-00DBA3 Rev: 3B75
Jun 15 debianX31 kernel: Type: Direct-Access ANSI SCSI revision: 02
Jun 15 debianX31 kernel: SCSI device sda: 312581808 512-byte hdwr sectors (160042 MB)
Jun 15 debianX31 kernel: sda: Write Protect is off
Jun 15 debianX31 kernel: SCSI device sda: 312581808 512-byte hdwr sectors (160042 MB)
Jun 15 debianX31 kernel: sda: Write Protect is off
Jun 15 debianX31 kernel: sda: sda1 sda2 sda3
Jun 15 debianX31 kernel: sd 0:0:0:0: Attached scsi disk sda
ドライブは/dev/sdaとして認識され、おそらくパーティションは3つ(sda1,sda2,sda3)ある。どのドライブがどうなっているのかはfdiskで確認。
root@debianX31#fdisk /dev/sda
The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)Command (m for help): p
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System
/dev/sda1 1 19409 155895106 83 Linux
/dev/sda2 19409 19441 262144 82 Linux swap / Solaris
/dev/sda3 19441 19457 131071 83 LinuxCommand (m for help): q
おそらく最初のパーティション/dev/sda1がもっとも容量が大きいのでここにデータが入っていると思われる。これを/mntにマウントする。
mount /dev/sda1 /mnt
ext3を明示した方がいいかもしれない(mount -t ext3 /dev/sda1 /mnt)。これで/mntを見ると以下のようになっている。
root@debianX31#cd /mnt
root@debianX31#ls
lost+found secret share share-mac
と言う感じで見事に認識。あとはデータを持って行くだけと思ったらどうもファイル名がおかしい。
root@debianX31#cd share
root@debianX31#ls
1161270096225.jpg
1162376906243.jpg
:83I:83I:83J:83~:8f:ad:94N.jpg
momoshot.tar
:83M:83:83:83:89:83:8a:81[.wmv
:83c:83:8b:83I.wmv
:83f:83W:83J:83:81:89:e6:91:9c
[:83N:83:89:83V:83b:83N] :83o:83b:83n - G:90:fc:8f:e3:82:cc:83A:83:8a:83A.mp3
ふつうのCODECではない、日本語をただ単にHEX表示しただけに見える。どうやら私の持っている初代LinkStationはsamba2でcoding system=capで設定されていたみたい。(WindowsとMacの両方で共有する場合はcapになっていると思う)
でこのファイルをどうWindowsマシンへ持って行くか、一番簡単なのはやはりLinuxマシンにsamba3を立ち上げ、文字コード変換させればOKなはず。
さっそくsamba導入。/etc/samba/smb.confの設定はこんな感じ(抜粋)。
[global]
unix charset = cp932
client code page = 932
vfs objects = cap
map to guest = Bad User
security = userworkgroup = ****
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %dencrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
invalid users = root
socket options = TCP_NODELAY[share]
comment = public folder
path = /mnt/share
browsable = yes
writable = yes
volume = public
create mode = 0774
directory mode = 0774
public = yes
guest only = yes
guest ok = yes
これで見事、Windowsからファイルをとれるようになりました。
| 固定リンク

コメント
お邪魔します^^
宣伝をさせてください。
宜しくお願いします。
ホームページが完成しました!
内容は、ショッピング・オークション・プレゼント
お得な情報満載!
来た人だけが得をする。
http://biddersshopping.web.fc2.com/
投稿: | 2008年8月26日 (火) 22時04分