File Recovery Hero/Guides/Emergency

Emergency · camera card attached to Linux

Recover an SD card on Linux by imaging it first

How should I recover an SD card on Linux?

Short answer

Image it first, without mounting: create an uncompressed sector image with dd or ddrescue and verify it with a checksum, since mounting or running fsck can change the card. File Recovery Hero does not run on Linux, but it can open that IMG or DD image on macOS or Windows if the card used exFAT or FAT32.

The situation

The source needs preservation on Linux before it can be examined with a supported desktop workflow.

Linux is an excellent place to preserve a card and a poor place to finish the job with this software. Read the card once into an uncompressed image, verify it, and carry that image over to a macOS or Windows machine for the actual scan.

01 / Diagnose

Work out what actually disappeared

Most Linux desktops mount a removable card automatically, and a mount writes journal and timestamp data even when nobody opens a file. Running fsck goes further and edits the file system outright. A block-level image taken before either happens keeps the card exactly as it was at the moment of the loss.

A read-only block image can preserve the current card state, while mounting or file-system repair can change it.

Check the last known path, trash and backups without writing to the original device.

02 / Protect the source

Preserve the best recovery chance

  1. 1

    Identify the device with lsblk and unmount every partition on it, so nothing touches the card while you work.

  2. 2

    Read the whole device, not a partition, into an uncompressed IMG file with dd or, for a shaky card, ddrescue with a map file.

  3. 3

    Take a checksum of the image and of the card with sha256sum and compare them, so you know the copy is faithful.

  4. 4

    Move the image to a Mac or a Windows computer and scan it there, leaving the original card switched off and unused.

Avoid this now

Do not run fsck, do not let the desktop mount the card read-write, and do not compress the image into a gz or zip archive. Repair tools rewrite metadata, an automatic mount writes to the source, and a compressed image cannot be scanned directly.

03 / Choose the method

Match the tool to the source

For stable, readable exFAT, NTFS and FAT16/FAT32 or uncompressed IMG, DD, RAW and BIN images.

Unconfirmed exports are marked .UNVERIFIED.

File Recovery Hero has no Linux build, so the scanning step happens on macOS or Windows. It opens uncompressed IMG, DD, RAW and BIN images containing exFAT, NTFS or FAT16/FAT32, and an image of an ext4 or encrypted card stays unreadable to it.

Raw volumes, MBR/GPT and full product limits

04 / Verify

Check the recovered content, not just its name

The image is sound when its size equals the device size reported by lsblk and the two checksums agree; with ddrescue the map file should additionally show no unread areas. Only then does a scan result say anything about the card rather than about a faulty copy.

Keep the source until two verified copies exist. One working preview is not enough.

Sources and technical references

FAQ

Questions about this recovery case

Can camera card attached to Linux be recovered in this situation?+

Linux is an excellent place to preserve a card and a poor place to finish the job with this software. Read the card once into an uncompressed image, verify it, and carry that image over to a macOS or Windows machine for the actual scan. The result still depends on what remains readable on the source.

What should I avoid before scanning?+

Do not run fsck, do not let the desktop mount the card read-write, and do not compress the image into a gz or zip archive.

Does scanning write to my memory card?+

Your memory card is only read. Nothing is saved to it.

How do I know whether the result is complete?+

The image is sound when its size equals the device size reported by lsblk and the two checksums agree; with ddrescue the map file should additionally show no unread areas.

Stop! Your files aregone.Back!

Scan for free first, then decide.

DownloadBuy license