Why do people use “notrunc” when making an ISO from a DVD

dddvd

There are many articles on the web that describe a command-line to make an ISO image from a DVD-Video disc like this:

dd if=/dev/sr0 of=mydvd.iso conv=noerror,sync,notrunc

I'd like to uderstand why notrunc is necessary. From my knowledge, and from the man page for the command, notrunc prevents the output file from being truncated. This basically means that, if the file exists, dd just overwrites what is already there; if there is content there that dd doesn't touch (perhaps by seeking to another point in the file) then that original content is left intact.

When making an ISO, surely you want to start with a new, clean, empty file ?

The only thing I can think of is in the case of a really bad disc, using notrunc enables you to run the same dd command several times over the same output file to hopefully fill in different bits each time. If the output file doesn't exist then notrunc has no effect.

Is that it, or is there some other reason everyone specifies notrunc ?

(I am not asking how to get around CSS, ARccOS, or anything else; just about dd usage)

Best Answer

It is not needed if you want to copy a whole DVD to a file which shall afterwards contain only the payload of that DVD. Actually notrunc is a risk for privacy and can cause media overflow if you overwrite an old file that is larger than the DVD payload. In this case the surplus blocks of the old file will stay appended to the copied DVD content. So they would be copied to a new DVD together with the filesystem.

Quite helpful is the advise in the comment of starfry to copy only the blocks of the ISO 9660 filesystem (if it is actually ISO 9660) because the DVD medium might deliver more blocks than those of the filesystem.

Related Question