
The little program that could, dd, has been around for several decades. It can do a lot of stuff but today we’re going to use it to copy a cd or dvd.
Please note that this isn’t really the best way to make a backup of your DVD collection. You can read about better ways to do that here and here. Also, only use this to make legal copies of stuff that you have a right to copy.
Ready? Here we go.
Stick a cd or dvd into your drive, and figure out where you want to put the image. For this example, we’ll use /home/user/image.iso.
dd if=/dev/cdrom of=/home/user/image.iso
That’s it. If tells dd that it’s not going to take stuff from standard input but rather will be copying a file. of tells it that it won’t be dumping stuff to the screen, but rather to a file as well. You’ll have to change the path and file name after ‘of’ to reflect something that exists on your computer.
geek out.















September 6th, 2006 at 3:03 pm
Actually, if you use
dd conv=noerror if=/dev/cdrom of=~/image.iso bs=128
it will make a better attempt at reading CDs that are scratched (if it can’t read a sector, it’ll write zeros to the image, which may be alright depending on the info on the disk)
September 6th, 2006 at 5:36 pm
Great suggestion! Thanks!
geek out
August 18th, 2007 at 3:36 pm
Also, you will want to make sure an exact amount of blocks is copied in order to get an exact image (this is because if the data on the disk is smaller than disk size, dd will do some padding of NULL values, hence an md5sum of the two disks won’t be the same.
To get the number of blocks:
1. mount the disk
2. Do a ‘df’, and node the number of 1K blocks in the disk
3. unmount the disk
Then, run:
dd if=/dev/dvd of=file.iso conv=noerror bs=2048 count=”numebr of 1-K blocks divided by 2″.
You may want to look into the “readcd” program as well. Sometimes dd might fail where ‘readcd’ wont and vice/versa.