PDA

View Full Version : unix tool to copy bad sector files


phenolot
23rd April 2007, 15:09
Hi folks,

When trying to make a legal backup of my own Casino Royale DVD (on a mac), I came across this "bad sector" problem.

I suppose most software DVD players do not come along with new hardware drivers, but simply use the IO tools of the respective operating system to read video data.

If it is possile to read such crippled files with basic io functions, like those evoked by fread, fseek etc., it should be very easy to write a command line tool that copies files and replaces bad sectors with dummy data.

Are there any yet?

Cheers

awhitehead
23rd April 2007, 16:17
Hi folks,

When trying to make a legal backup of my own Casino Royale DVD (on a mac), I came across this "bad sector" problem.

I suppose most software DVD players do not come along with new hardware drivers, but simply use the IO tools of the respective operating system to read video data.

If it is possile to read such crippled files with basic io functions, like those evoked by fread, fseek etc., it should be very easy to write a command line tool that copies files and replaces bad sectors with dummy data.

Are there any yet?

Cheers

Give ddrescue (http://www.gnu.org/software/ddrescue/ddrescue.html) a try. I'll be curious if it works with ArccOS protected ODs, since it works with hard drives rather well.

From ddrescue description:

Introduction
GNU ddrescue is a data recovery tool. It copies data from one file or block device (hard disc, cdrom, etc) to another, trying hard to rescue data in case of read errors.

Ddrescue does not truncate the output file if not asked to. So, every time you run it on the same output file, it tries to fill in the gaps.

The basic operation of ddrescue is fully automatic. That is, you don't have to wait for an error, stop the program, read the log, run it in reverse mode, etc.

If you use the logfile feature of ddrescue, the data is rescued very efficiently (only the needed blocks are read). Also you can interrupt the rescue at any time and resume it later at the same point.

Automatic merging of backups: If you have two or more damaged copies of a file, cdrom, etc, and run ddrescue on all of them, one at a time, with the same output file, you will probably obtain a complete and error-free file. This is so because the probability of having damaged areas at the same places on different input files is very low. Using the logfile, only the needed blocks are read from the second and successive copies.

The logfile is periodically saved to disc. So in case of a crash you can resume the rescue with little recopying.

Also, the same logfile can be used for multiple commands that copy different areas of the file, and for multiple recovery attempts over different subsets.

Ddrescue aligns its I/O buffer to the sector size so that it can be used to read from raw devices. For efficiency reasons, also aligns it to the memory page size if page size is a multiple of sector size.

phenolot
3rd September 2007, 23:44
well, my answer comes late, but it comes. With the limited number of attempts I made with ddrescue (not too much time for this), I wasn't able to make a backup of casino royale. It is probably a matter of settings. Those I tried either led to a broken output or to ddrescue running for days without perceivable progress...

Rufus210
4th September 2007, 05:11
dd_rescue by itself is a pain to use. As you said either you get broken output or it takes forever. Try using the dd_rhelp (http://www.kalysto.org/utilities/dd_rhelp/index.en.html) wrapper. It basically automates dd_rescue to get all the good stuff first, and then will try forever like dd_rescue on the bad sectors.

setarip_old
4th September 2007, 05:15
@phenolot

Hi!

RipIt4me is indicated to work in a UNIX environment...

wildchild77
6th September 2007, 07:59
When trying to make a legal backup of my own Casino Royale DVD (on a mac), I came across this "bad sector" problem.

Have you tried Mac the Ripper

http://www.mactheripper.org/

Ripit4Me is the only way to go for ArccOS or RipGuard titles that I have been able to get working on Linux. 90% of all my back ups are now being done on Linux with DVD Rebuilder.