Friday, April 26, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 2263  / 2 Years ago, fri, january 14, 2022, 1:49:37

I accidentally killed my MacBook by water damage, and now I'm to primarly extract my images.



I mounted the drive (HFS+ formated) on my stationary PC using the Storage Device Manager.



I'm able to browse the drive and copy the picures of some directories within the Picures folder of the mac drive, but for other directories, for example this one containing three pictures, i get the follwing when running ls -l



ls: cannot access DSC00001.JPG: Input/output error
ls: cannot access DSC00002.JPG: Input/output error
ls: cannot access DSC00003.JPG: Input/output error
ls: reading directory .: Input/output error
total 3
drwxrwxrwx 1 501 dialout 1957 2011-12-11 18:22 ./
drwx------ 1 501 dialout 82 2012-01-18 20:51 ../
-????????? ? ? ? ? ? DSC00001.JPG
-????????? ? ? ? ? ? DSC00002.JPG
-????????? ? ? ? ? ? DSC00003.JPG


...so... are these files all toast, or is there something I can do?



UPDATE:
I tried using ddrescue on a file, but got an Input/output error there aswell.


More From » files

 Answers
6

First off, I strongly suggest you attempt to do an entire drive image copy of the damaged drive. You'll need a hard drive at least as large as the partition you are trying to recover. Assuming the partition of that drive is listed in /dev as /dev/sda2, you would mount the backup drive to (say) /mnt/restore



From there, you'd use the command: dd bs=4096 if=/dev/sda2 of=/mnt/restore/sda2.img conv=noerror,sync



This creates an image of the hard drive, including it's 'bad' blocks (if any, as it sounds there are.)



Next, disconnect the drive; a damaged drive only gets worse as it's used.



Next, you'll need to install testdisk:



sudo apt-get install testdisk



Accept it's request for untrusted sources (if you're so inclined.)



Finally, run test



From here, you'll need to use testdisk to find and recover files:



testdisk /mnt/restore/sda2.img



The menu is pretty self-explanatory, but using test disk is probably beyond the scope of this 'answer.' Here's a good place to get started:



http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step



http://www.howtoforge.com/data_recovery_with_testdisk



These should help you recover your files, and won't do any more damage to your hard drive than necessary. Once you've done as much recovery as you can from the image file, you can safely delete it. You could then try running test disk on the damaged drive directly, and try recovering only the files that are absolutely missing.



Best of luck to you.


[#40367] Friday, January 14, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
itchlos

Total Points: 486
Total Questions: 115
Total Answers: 110

Location: Macau
Member since Fri, Apr 28, 2023
1 Year ago
;