Your old CDs – especially ones you’ve burned yourself – degrade over time, to the point that they’re unreadable. We’ll show you how to squeeze as much data out of them as you can, before it’s too late!
The tool we’re going to use to do this is called ddrescue, which can be easily accessed from the Live CD environment. ddrescue can make .iso files out of your CDs, which can then either be burned to a more reliable CD, or can be mounted and accessed in all modern operating systems.
Boot into the Ubuntu Live CD environment using a burnt CD or a prepared flash drive.
First, we’ll install ddrescue. Open up the Synaptic Package Manager (System > Administration > Synaptic Package Manager).
In the Synaptic Package Manager window, click on Settings > Repositories.
Add a check in the box whose label ends with “universe” to enable Ubuntu’s universe repository. Click Close.
Back in the main Synaptic window, click the Reload button to reload the list of available packages.
Once the search index has been rebuilt, enter “ddrescue” in the Quick search text field. Two different packages will come up; make sure that you choose “gddrescue” and not “ddrescue,” which operates slightly differently.
Right click on “gddrescue” and select Mark for Installation. Click the Apply button, and follow the prompts to install ddrescue.
Next, we need to select a location to save the .iso file that will be produced by ddrescue. In our case, we’ll use an internal NTFS hard drive. To mount it, we’ll click on Places and then select the hard drive we want to use.
The rest of this guide will be done in a terminal window, so open one through Applications > Accessories > Terminal.
Navigate to the location in which you will save the .iso file. In our case, it’s a newly mounted hard drive, so we’ll first change to the /media directory, and then use tab completion to change to the directory that represents our hard drive.
Once you’re in the right directory, you’re ready to run ddrescue! ddrescue is neat because you can try to pull data off of a CD multiple times, and each time it will add to the same image file whatever new data is manages to recover.
Because of that, for the first pass, it’s best to start with recovering the easy parts first, and then drilling down into problem areas later.
For the first pass, the terminal command is:
ddrescue –n –b 2048 /dev/cdrom <ISO file> <log file>
In our case, the CD we’re trying to recover is a 13 year old CD with Red Hat Linux 4.2 on it, so we’re going to call the image RedHat.iso, and the log file RedHat.log.
The “-n” flag ensures that this first pass won’t take too long, but will still recover the easy-to-read parts of the CD. The “-b” flag is important because CDs have block sizes of 2048 bytes.
Eventually ddrescue will finish, possibly with some errors.
In our case, there were around 80 MB of data that were not recovered due to errors. Let’s try a second, more in-depth run to try to recover as much data as possible.
The terminal command for this second run is very similar to the first, except that instead of using the “-n” flag we will use the “-d” flag to tell ddrescue to go into direct mode and read as much data from the CD as possible. For more information about command line parameters ddrescue recognizes, see its manual.
ddrescue –d –b 2048 /dev/cdrom <ISO file> <log file>
Make sure that the .iso and .log files are the same as you used in the first step.
We let ddrescue run overnight, and in the morning…
we had recovered over 55 MB of the data we hadn’t recovered before! If we left it longer, we may have been able to recover even more.
It’s a good idea to try to save your CDs now, before they degrade any further. Hard drive space is cheap; buying an external drive is small investment if it means you can save your old CDs (and then you can throw them away to save some space on your shelves).
And while ddrescue is a great tool for doing this, it can also be used to pull data from other devices like hard drives and floppy disks. If you tried to make a drive image with dd and it gave you errors, then give ddrescue a try instead!
Trevor is our resident Linux geek, but always keeps his eyes open for neat Windows tricks too.
- Published 07/13/10