Someone ask me how to image a CD/DVD ROM and generate hash value in the same time. A small tool called "dcfldd" could achieve this goal. Compared to dd, dcfldd allows for more than one output file, supports simultaneous multiple checksum calculations, provides a verification mode for file matching, and can display the percentage progress of an operation.
Download dcfldd and install in your Linux workstation. The if(input file) is /dev/sr0. If you‘re not sure about this, all you need to do is take a look at mount result as below.
What about of(output file)? You could create any output filename you want. My output file name is cd.iso. Also specify the hash method and block size. Here we go. When finished you could see the md5 hash value.
Of course you could use another forensic tool to verify the hash value of this evidence file. I use FTK Imager Lite to add cd.iso as evidence. The verification result is as below.