Canon-Cr2 can't save file?

Bug #257979 reported by Gabriel Fonseca Engel
4
Affects Status Importance Assigned to Milestone
magicrescue (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: magicrescue

I have installed many exifs and everything else. I'm trying to recover 70 CR2 files in a 20Gb partition.
Is there any extra package to be installed for the canon-cr2 recipe to work?

# magicrescue -r canon-cr2 -d /media/disk/Photos/bkp3 /dev/sda1 -M io
i /dev/sda1
Found canon-cr2 at 0x9193000
Cannot decode file /media/disk/Photos/bkp3/000009193000-0.CR2
No output file
Found canon-cr2 at 0x99A3000
Cannot decode file /media/disk/Photos/bkp3/0000099A3000-0.CR2
No output file
Found canon-cr2 at 0xAF0C000
Cannot decode file /media/disk/Photos/bkp3/00000AF0C000-0.CR2
No output file
Found canon-cr2 at 0xB813000
Cannot decode file /media/disk/Photos/bkp3/00000B813000-0.CR2
No output file
Found canon-cr2 at 0xC009000
Cannot decode file /media/disk/Photos/bkp3/00000C009000-0.CR2
No output file
Found canon-cr2 at 0xE802000
Cannot decode file /media/disk/Photos/bkp3/00000E802000-1.CR2
No output file
Found canon-cr2 at 0xFC13000
Cannot decode file /media/disk/Photos/bkp3/00000FC13000-0.CR2
No output file
Found canon-cr2 at 0x10101000
Cannot decode file /media/disk/Photos/bkp3/000010101000-0.CR2
No output file
Found canon-cr2 at 0x11BAB000
Cannot decode file /media/disk/Photos/bkp3/000011BAB000-0.CR2
No output file
Found canon-cr2 at 0x129E2000
Cannot decode file /media/disk/Photos/bkp3/0000129E2000-0.CR2
No output file
Found canon-cr2 at 0x13727000
Cannot decode file /media/disk/Photos/bkp3/000013727000-0.CR2
No output file

magicrescue: killed by signal 2 at offset 0x1E65E690 in file /dev/sda1

---------------------------

Added a printf to extract.c to check which program was being used:

magicrescue-20080803# ./magicrescue -r canon-cr2 -d /media/disk/Photos/bkp3 /dev/sda1
Found canon-cr2 at 0x9193000
Cannot decode file /media/disk/Photos/bkp3/000009193000-0.CR2
dd bs=1024k count=30 of="$1" 2>/dev/null; dcraw -i "$1" || rm -f "$1"
No output file
Found canon-cr2 at 0x99A3000
Cannot decode file /media/disk/Photos/bkp3/0000099A3000-0.CR2
dd bs=1024k count=30 of="$1" 2>/dev/null; dcraw -i "$1" || rm -f "$1"
No output file

The question is... I do have dcraw install in my ubuntu. Still debuging...

description: updated
Revision history for this message
Gabriel Fonseca Engel (gabrielfengel) wrote :

OK.. Kind of understood. Dcraw couldn't process the file and deleted (acording to the command: dcraw -i "$1" || rm -f "$1", "do or die")

I removed the rm -f part, just to save the raw information... Maybe one day I can recover the pictures. Maybe I'll try with ufraw.

=/

Thanks for the program. Simply great!

Changed in magicrescue:
status: New → Invalid
Revision history for this message
Daniel J Blueman (danielblueman) wrote :

This message is output from 'dcraw' [1], used to check for a valid CR2 file - so you have all the right files installed.

If the CR2 files from your camera are normally larger than 30MB, then you'll need to increase this limit in /usr/share/magicrescue/recipes/canon-cr2 - the only other problem here, would be if dcraw can't recognise your CR2 files.

Can you check both cases?

--- [1]

$ strings /usr/bin/dcraw | grep 'Cannot decode file'
Cannot decode file %s

Revision history for this message
Gabriel Fonseca Engel (gabrielfengel) wrote :

ufraw didn't budge.. same error.

Revision history for this message
Gabriel Fonseca Engel (gabrielfengel) wrote :

Thanks for the help Daniel!
Just set the count to 50... but I don't think I'll recover my files =/

All my best pictures from Dublin!! *snif*

Revision history for this message
Daniel J Blueman (danielblueman) wrote :

The key things here are:
 - if your CR2 files are normally <30MB (likely)
and
 - if dcraw normally decodes your CR2 files from that hardware
then the only conclusion, is that the files are corrupted beyond recovery.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.