Is it better to use cat, dd, pv or another procedure to copy a CD/DVD?
65
votes
3
answers
69334
views
## Background ##
I'm copying some data CDs/DVDs to ISO files to use them later without the need of them in the drive.
I'm looking on the Net for procedures and I found a lot:
- Use of
cat
to copy a medium: http://www.yolinux.com/TUTORIALS/LinuxTutorialCDBurn.html
cat /dev/sr0 > image.iso
- Use of dd
to do so (apparently the most widely used): http://www.linuxjournal.com/content/archiving-cds-iso-commandline
dd if=/dev/cdrom bs=blocksize count=count of=/path/to/isoimage.iso
- Use of just pv
to accomplish this: See man pv
for more information, although here's an excerpt of it:
Taking an image of a disk, skipping errors:
pv -EE /dev/sda > disk-image.img
Writing an image back to a disk:
pv disk-image.img > /dev/sda
Zeroing a disk:
pv /dev/sda
I don't know if all of them should be equivalent, although I tested some of them (using the md5sum
tool) and, at least, dd
and pv
are *not* equivalent. Here's the md5sum
of both the drive and generated files using each procedure:
md5 of dd procedure: 71b676875b0194495060b38f35237c3c
md5 of pv procedure: f3524d81fdeeef962b01e1d86e6acc04
**EDIT:** That output was from another CD than the output given. In fact, I realized there are some interesting facts I provide as an answer.
In fact, the size of each file *is different* comparing to each other.
So, is there a best procedure to copy a CD/DVD or am I just using the commands incorrectly?
----------
## More information about the situation ##
Here is more information about the test case I'm using to check the procedures I've found so far:
isoinfo -d i /dev/sr0
Output: https://gist.github.com/JBFWP286/7f50f069dc5d1593ba62#file-isoinfo-output-19-aug-2015
dd
to copy the media, with output checksums and file information
Output: https://gist.github.com/JBFWP286/75decda0a67605590d32#file-dd-output-with-md5-and-sha256-19-aug-2015
pv
to copy the media, with output checksums and file information
Output: https://gist.github.com/JBFWP286/700a13fe0a2f06ce5e7a#file-pv-output-with-md5-and-sha256-19-aug-2015
Any help will be appreciated!
Asked by user129371
Aug 19, 2015, 07:20 PM
Last activity: Jan 24, 2021, 10:12 AM
Last activity: Jan 24, 2021, 10:12 AM