Need help - Will Pay $ - Someone Familiar with Repairing CR2 files?


Recommended Posts

Tried this, can't find that address or sequence,,,

I presume that you're getting this error when running the dd command as per my instructions above? Note that in the command, the "if=" bit refers to the input file/device and the "of=" bit refers to the output file/device. In the command I pasted I simply used examples, you need to use the file manager to see what the actual names are for your devices, much like specifying the correct drive letter in Windows! I assume that's where you're going wrong.

Specifically, in the command I wrote, /dev/hda is kind of the equivalent of specifying c:\ in Windows. You need to change this to point to the memory card. Whatever you do don't mess things up and overwrite things on the card else you'll never get the pics back. /dev/hdb refers to the drive on which to store the image file you're creating. image.dd is the name of this image file we're creating.

Actually, I made a mistake, here's the correct command:

sudo dd if=/dev/hda of=/dev/hdb1/image.dd bs=512 conv=noerror,sync
Note, you still need to replace the example references with the correct ones as I just described above. If not done correctly, you could end up overwriting data and screwing things up, so be careful!

 

To help you with getting the correct references:

Understanding device/partition references

A physical storage device (disk/drive/memory-card) will contain one or more "partitions". A partition is simply a portion of the device's storage space which will contain a file system. A device could have just one or could have multiple. Each drive letter in Windows (like C:\) is linked to a specific "partition" and therefore its file system. References to the physical drive itself in Windows are a little more obscure and I won;t go into. In Linux, /dev/hda (hard disk/drive A) is an example reference to a physical device. The 'hd' bit can change; 'hd' is for "IDE" connected disks (considered old now) and 'sd' is for SATA/SCSI connected disks. (USB connected devices you may find referenced with 'sd' also). The letter 'a' on the end means this is the first such device, and with additional devices you'll find 'b', 'c', etc. References to partitions and the file system they contain, in Linux, start with the device reference and simply add a number on the end to reference the specific partition. For example /dev/hda1 refers to the first partition of the first 'hd' connected disk.

(The above isn't strictly a completely perfect and accurate description, but good enough for this).

Note that in the dd command I gave you a couple weeks ago, I made a mistake when specifying the output file; I used a device reference instead of a partition reference (forgot the '1'). (A file needs to be stored within a filesystem of a partition). This is fixed above.

Finding the correct references

The file manager might not actually be the best solution for finding the references you need for the command, as I had suggested above.

In the terminal, try the command:

lsblk
This will list devices and their partitions. Hopefully you'll have no trouble identifying the device reference for the memory card (disk/device reference not partition reference please).

You should hopefully have no trouble also identifying the partition reference for the file system in which you need to save the drive image that needs to be created. This partition needs to be "mounted" though (opened for reading/writing). See below!

Mounting

Note, the memory card does NOT need to be mounted, we're going to be reading from the raw device, we don't need to interact with the filesystem it contains as you normally would!

If there's already a "mount point" specified under the respective column in the output of the above command (lsblk) for the partition on which you want to save the disk image we're creating, then it's already mounted. If it's mounted you can browse to that location with the file manager to confirm it's the partition you think it is if you need to.

If it's not mounted, do the following:

sudo mkdir /tmp_mount_1
sudo mount /dev/sdb1 /tmp_mount_1
Replacing the partition reference here with the one for the partition needing to be mounted. This will mount the partition and therefore allow files to be written to it.

--

Note, 'sudo' at the start of a command essentially means run the following command as root (i.e. essentially with admin prvileges).

  • 5 months later...

getting there

 

TQPLrXf.png

vcfan, have you managed to get a full color JPEG or CR2 image? I have the same problem.... I only manage to get a black&white Jpeg image from my cr2 files with Photomechanics or other convert software. When load the cr2 in Camera Raw appear in color but corrupted like this image. I am curious if there is something that can be done in a HEX editor to obtain a color Jpeg image.

 

Thanks! 

I'm using XVI32 to view the files, find the second instance of FF E0 in each one, and delete up to that point.

http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm

http://www.mikekunz.com/image_file_header.html

XVI32 is scriptable, so check out the documentation on their site.

Hi, zhangm. What is the second instance? I opened the cr2 in HEX editor XVI32 and searched for FF E0 but nothing appears.

If you want to get a raw byte-by-byte image of the entire memory card to me, perhaps from that I could attempt to repair the filesystem and see if we can get the entire set of files restored.

Hi, theblazingangel.

Can you tell me please, is there any possibility to recover overwritten cr2 files from a 32Gb Compact Flash memory card? If no, then is there any possibility to repair a corrupted cr2 file?

Thank you! 

This topic is now closed to further replies.
  • Posts

    • NASA: This asteroid may not kill us but it probably won't be far off either by Sayan Sen Image by Zelch Csaba via Pexels New observations by NASA's James Webb Space Telescope have eliminated the last remaining impact threat posed by asteroid 2024 YR4, ruling out the possibility that the near-Earth object could strike the Moon in December 2032. NASA said observations collected by Webb on February 18 and 26, 2026, enabled scientists to refine the asteroid's orbit enough to "rule out a chance of lunar impact on Dec. 22, 2032." Instead, asteroid 2024 YR4 is now expected to pass the Moon at a distance of about 13,200 miles (21,200 km). The agency stressed that the update "reflects improved precision in our understanding of where the asteroid is expected to be in 2032 rather than a shift in its orbital path." The announcement closes a remarkable chapter in planetary defence that began in late 2024, when the approximately 60-metre-wide asteroid briefly became the most closely watched near-Earth object in the world. Discovered on December 27, 2024, by the ATLAS telescope in Chile, 2024 YR4 initially appeared to have a small chance of colliding with Earth on December 22, 2032. As astronomers gathered more observations, the impact probability briefly climbed to around 3%—the highest ever recorded for an asteroid of its size—before steadily falling as its orbit became better understood. By early 2025, international observations had ruled out any significant risk to Earth. However, astronomers were left with another possibility: a roughly 4% chance that the asteroid could instead strike the Moon. "The probability that asteroid 2024 YR4 will strike the Moon on 22 December 2032 is now approximately 4%," the European Space Agency (ESA) had said last year, noting that "there is a 96% chance that the asteroid will not impact the Moon." ESA said such an impact, while unlikely, would have presented an extraordinary scientific opportunity. "It is a very rare event for an asteroid this large to impact the Moon – and it is rarer still that we know about it in advance. The impact would likely be visible from Earth, and so scientists will be very excited by the prospect of observing and analysing it," said Richard Moissl, Head of ESA's Planetary Defence Office. "It would certainly leave a new crater on the surface. However, we wouldn't be able to accurately predict in advance how much material would be thrown into space, or whether any would reach Earth," he added. The asteroid also exposed an important blind spot in planetary defence. Because 2024 YR4 approached Earth from the direction of the Sun, it remained hidden from ground-based telescopes until after its closest approach. "We looked into how Neomir would have performed in this situation, and the simulations surprised even us," Moissl said. "Neomir would have detected asteroid 2024 YR4 about a month earlier than ground-based telescopes did. This would have given astronomers more time to study the asteroid's trajectory and allowed them to much sooner rule out any chance of Earth impact in 2032." He added, "As an infrared telescope, like Webb, Neomir would have also immediately given us a much better estimate for the asteroid's size, which is very important for assessing the significance of the hazard." The latest NASA observations underscore the value of space-based infrared telescopes in tracking faint asteroids. According to NASA, Webb made "among the faintest ever observations of an asteroid," extending the object's observational record by nearly eight months at a time when it had become too faint for other telescopes. That additional data allowed scientists to eliminate the remaining uncertainty surrounding its 2032 flyby. Although asteroid 2024 YR4 is now confirmed to pose no threat to either Earth or the Moon, scientists say its discovery remains one of the most significant real-world tests of the international planetary defence system, demonstrating how continued observations can rapidly transform an object once considered hazardous into one whose future path is known with high confidence. Source: NASA, ESA This article was generated with some help from AI and reviewed by an editor. Under Section 107 of the Copyright Act 1976, this material is used for the purpose of news reporting. Fair use is a use permitted by copyright statute that might otherwise be infringing.
    • Yup. Google is just scraping the entire internet for their own ad profits without sharing revenue with the sources. It's obviously stealing, but since these sites depend upon Google's search scraps to survive... As for me, I just stopped using Google for anything except Reddit searches. If Reddit's own search wasn't complete crapola, I'd never use Google search again.
    • I had a feeling this was coming. Picked up my first Mac ever last Saturday. Glad I did.
    • In a major surprise there is actually some good deals for the first time in years. At least for me.
  • Recent Achievements

    • Conversation Starter
      Admir earned a badge
      Conversation Starter
    • First Post
      The_Focal_Point earned a badge
      First Post
    • Apprentice
      daryld went up a rank
      Apprentice
    • Contributor
      Carltonbar went up a rank
      Contributor
    • One Month Later
      The_Focal_Point earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      419
    2. 2
      +Edouard
      170
    3. 3
      PsYcHoKiLLa
      130
    4. 4
      Xenon
      69
    5. 5
      neufuse
      69
  • Tell a friend

    Love Neowin? Tell a friend!