Aug9
Recover lost pictures from a memory card on Mac OS X
Closed
Lifehacker posts this article about recovering lost pictures on memory cards. Mac OS X owners may want to try these two commands before purchasing additional software: dd and fsck. Linux users most likely already know what to do
— if not, the instructions below are 98% the same…
- Find the device id: Connect your camera using the USB cable, or mount the card in a reader. Then you can type on the console the command
mount, to see the mounted volumes. Look at the output for a line that contains/Volumes/name_of_your_card. On the same line, you will see a device identifier, something like/dev/s1d0. Take note of it, exactly. Then eject the card (you can drag it to the trash) - Backup your card: The command makes a low level block copy of your card. Type
sudo dd if=/dev/the_id_you_wrote_down of=~/backup.hex
You’ll need to enter your password to run this command under sudo. It will create a file on your home directory with the card contents, so if you have a 1GB card, you’ll have a 1GB file, even if the card has no contents - Attempt recovery: The proper step here is to attempt recovery on the image. It’s a bit more involved, as Mac OS usually doesn’t allow to mount a file as a loopback as Linux does. I’ve had success using the dangerous route of working directly on the card:
sudo fsck_msdos -p -f /dev/the_id_you_wrote_down
The problem with this is, it will modify your memory card contents, so further attempts to use recovery tools are more likely to fail.