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.htmlcat /dev/sr0 > image.iso
Use of
dd
to do so (apparently the most widely used): http://www.linuxjournal.com/content/archiving-cds-iso-commandlinedd if=/dev/cdrom bs=blocksize count=count of=/path/to/isoimage.iso
Use of just
pv
to accomplish this: Seeman 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/zero > /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!
cmp file1 file2
? did you usedd
with the wrongcount=
(or really any count at all which is not necessary if you want the whole thing?). Read errors in dmesg?dd
command that you used (what blocksize? what count?), (2) the sizes and checksums of all outputs, and (3) any independent information you have regarding the amount of data on the source optical disc. … … … … … … P.S. Why are you usingcount=
ondd
? You want to copy the entire disk image, don't you?count=
says "copy this many and then stop".isoinfo -d -i /dev/cdrom
to know the count number and use it -- in fact, he says one shouldn't use justdd
. "In any case, if you want a proper ISO image of that CD you need to get the blocksize and blockcount correct before you create your image."