Google
 

23 giugno 2007

How to recover files from a damaged CD/DVD



If you, just like me, have had enough of I/O errors reading your optical media, this post is for you.
This method allows for recovering files from damaged CD/DVD by copying them byte to byte, using the Unix command dd.

WARNING: dd is a very powerful program, and if misused, can literally erase everything on your hard drives. And worst, dd is a no-warning, no-second-think, advanced-users only, Unix-style mean and lean program. See dd entry on Wikipedia for details.

This is the command you should run:
dd if=/Volumes/MY_DYD/File_to_retrieve.ext of=/Users/myuser/myfolder/File_retrieved.ext bs=512 conv=noerror, sync

dd: the command
if: input file
of: output file
bs: bytes size [512 bytes]
conv: conversion options [noerror, don't halt on errors; sync, pad with blanks the block containing the error]

If you specify a bs so small (512), in case of a large bad chunk on the medium you will obtain a lot of error logs. Let it go until you have the prompt again.

This method is expecially useful to recover damaged movies, because unless you have the file 50% corrupted (not very likely even in worst cases), you probably will strip a couple of frames from the movie, and the result will be perfect.
Of course if you are recovering file working as a whole, as a compressed archive or a RDBMS datafile, maybe padding the error with spaces may render useless the resulting file. As usual, YMMV.

dd is available under OSX and Linux (any). If you are running Windows, well, probably you are not an advanced user anyway, so why bother (and no, neither Robocopy nor NtBackup have the same functions of dd). Just in case, you can run dd under Windows via Cygwin. And if you don't know Cygwin, aka Unix shell for Windows, you better read the tutorial on Lifehacker.

dd MAN Page




Powered by ScribeFire.

12 commenti:

Unknown ha detto...

Is there an easier, faster command than dd (I already know about dd_rescue)

I read about and used (to recover a DVD) another command similar to dd, but it ignored errors with no difficulty. It had the name dm or ddm or something like that. Have you ever heard of such a command?

I worked like a charm, and did not take nearly as long as dd is taking on my computer.

Decio Biavati ha detto...

Thanks for your useful comment and for stopping by.

Do you refer to sdd command? I never used it (I don't know dm or ddm either), although dd is very time expensive when deling with errors.

I will update the post if I will find some news.

Anonimo ha detto...

You should see dd_rescue at http://www.garloff.de/kurt/linux/ddrescue/.

Cheers!
emdmarques@gmail.com

Decio Biavati ha detto...

@emdmarques: thank you for the hint! I will try dd_rescue any time soon.

Thanks for stopping by.

Kiran R ha detto...

I am using cygwin on windows xp to try and recover my DVD that is not being recognized in Windows

Unfortunately when I try:
ddrescue -n -b 2048 /cygdrive/c /dvd/a.iso /dvd/a.log
It shows up as
"Medium not found"

is there any way to make this work

Decio Biavati ha detto...

@Kiran: I never tried on cygwin, I don't know if there are issues regarding ddrescue...
I will try and be back with results in few days.

Thanks for asking.

SanskritFritz ha detto...

Thanks for the useful tip. I just recovered a CD with a movie on it, so I could watch it with my son, as I promised him earlier. He sends his thanks ;-)
I reckon you are using GoboLinux?

Makis ha detto...

Thank you for this! I have had exactly the same problem with some disks, with your help it seems like I can also rip them.

Unknown ha detto...

A great post and informative tutorial.
well, does this tool works in iMac?

Aven, see also how to open dvd files in imovie for mac

Brano - 2ge ha detto...

noerror, sync should be together.

Unknown ha detto...

Try this application to recover CD data.
http://www.undeletepcfiles.com/cdrom-data-recovery-software.html

Unknown ha detto...

Hey guys might wanna try this software that I've been using to recover deleted files in CD-R, CD-RW, DVD+/-RW, DVD, DVD-ROM, here's the link on how to get it, dvd data recovery software Hope it helps.