I am starting to make backups of my movie DVDs at home. I am using DD to make ISO images of my DVD as follows:

dd if=/dev/dvd of=~/dvd/abc.iso

However, even though the content of the DVD is only, for example, 5.4GB (I check this with du -sh), the resulting image is still 7GB, so it seems as if it is making an ISO image of the entire disc, even the unused portion.

Is there a way to make an ISO backup of the DVD using dd that is only as large as the used portion of data on the disc?

  • Are you sure that problem is in dd? I think, problem is in your disks: for example, if it is DVD+RW, it can contain additional structures for multisessional writing.
    – Eddy_Em
    May 6 '13 at 5:23
  • Well, this is a purchased DVD, i.e. one with a movie on it. (Sorry, I will update my question to clarify that). What type of DVDs are those? May 6 '13 at 6:07

There are three sizes involved:

  • The size of the media.
  • The size of the filesystem.
  • The extent of the data.

In principle, these sizes are in decreasing order (the filesystem should fit on the media, and the data should be within the filesystem boundaries). Furthermore the filesystem on an optical disc is typically adjusted to the data, so copying the filesystem should be just right.

The Linux utility suite comes with the isosize utility to print the size of an iso9660 filesystem.

head -c $(isosize /dev/dvd) </dev/dvd >~/dvd/abc.iso

(You can use dd, but head is just as good. Despite popular myths, dd is not more suitable for accessing devices (the magic is in /dev/dvd, not in dd), and it typically isn't even faster.)

Some DVDs have a crude copy protection method where the size of the filesystem is wrong, so that if you copy the filesystem, part of the data will be missing. If you have a movie DVD that is a lot smaller than the format would permit, there's a chance you're seeing this. In this case, you do need to copy the whole disk image.

dd if=/dev/dvd bs=2048 count=`isosize -d 2048 /dev/dvd` conv=notrunc,noerror > disc.iso

answer website: http://www.noah.org/wiki/Dd_-_Destroyer_of_Disks

  • This doesn't work on some disks due to the deliberate I/O error problem. Does anyone have a solution to this? Jan 7 '15 at 0:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.