I have a 4GB SD card with some family pictures on it that I need to recover. When I insert the card into my card reader, it shows up as an unknown 32MB device (as /dev/sde
) and cannot be mounted. When inserting back into the camera (a Nikon D60), it says the cards needs to be formatted (as does inserting it into a Windows machine). I want to recover all of the pictures on the card (there were others before the family pictures) because I don't know how many I took or their exact sizes (but I believe they were all JPEGs). The card should be formatted as a FAT32 filesystem.
What Linux or Unix utilities are available to recover the files? Can I do it myself or do I need to seek professional help?
Edit: It appears that my card reader has damaged the card in some way, making it unreadable and and unformattable. When I checked another card that was the exact same (save for no files), it "ruined" the second one. I would like to use the second card again, so is there a tool to format a damaged card that doesn't know (or cannot report properly) how large it is?
ddrescue
. You don't need to know anything about cylinders/heads/sectors. – Gilles 'SO- stop being evil' Jun 08 '11 at 00:02-dr3
option stands for-d
, which means "use direct disc access", bypassing any kernel caches of the disc contents, and-r3
, which means to retry reading 3 times if it gets an error for a bad sector. – Sean Dec 08 '19 at 10:54d
leads toCan't open input file: Invalid argument
exits, when you try to do ddrescue for a phone (mtp, smth like /run/user/1000/gvfs/mtp:host=Sony_...). – BairDev Nov 05 '21 at 07:52