SDカードが認識されているものの、I/Oエラーが発生しており、データの救出が難しい状況
time fsck -p /dev/sdb1
fsck from util-linux 2.39.3
fsck.fat 4.2 (2021-01-31)
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
65:01/00
Not automatically fixing this.
Read 32 bytes at 9129984:Input/output error
real 0m50.943s
user 0m0.197s
sys 0m0.770s
sudo apt install gddrescue
ddrescue -d /dev/sdb1 sd_card.img sd_card.log
- d: ダイレクトアクセスモード(RAWデバイスアクセス)
- -r3: エラー発生時に最大3回リトライ(必要に応じて調整)
オプション説明:
- sd_card.img: 出力イメージファイル
- sd_card.log: 進捗ログ(途中で中断しても再開可能)
sudo mount -o ro,loop sd_card.img /mnt
cp -rip /mnt/* バックアップ先ディレクトリ/.
sudo testdisk sd_card.img
パーティションが壊れている場合、このツールで修復可能なことがあります。
sudo photorec sd_card.img
ファイルシステムが壊れていても、ファイル単位でスキャン可能。