Checksum a DVD

Sometimes you get a DVD that you would like to checksum. For example one to install a new operating system.

A constant question is whether the content on this DVD is legitimate or not. Luckily, checksumming a DVD or CDROM is not so hard.

Get size of DVD image:

cd pub/FreeBSD/ISO-IMAGES-amd64/10.0

We observe that the size of the DVD image is:


Copy entire DVD content to harddisk:

dd if=/dev/cd0 bs=2k count=`dc -e "2484742144 2048 / p"` of=/tmp/dvdcopy

Checksum the create file and compare with pubilshed hashes:

sha256 /tmp/dvdcopy

Byte-by-byte comparison:

cmp /dev/cd0 FreeBSD-9.1-RELEASE-amd64-dvd1.iso