How to check if two DVDs are exactly the same?

19

2

I have two DVDs and if I open the DVDs and copy the content to the HDD and compare the respective files on the HDD it shows no difference. As I know DVD does also have some additional content (this content includes information saying if the DVD is bootable and some formating information I guess).

How can I check also this additional content?

Is it somehow possible without additional programs, using Windows or Ubuntu?

Mega

Posted 2014-06-10T20:14:59.973

Reputation: 191

1Are you comparing store bought movie DVDs or another type of DVD? – pacoverflow – 2014-06-10T21:06:50.363

Not sure if it would work...You could try 'dd if=/dev/cdrom of=file1.img' and 'dd if=/dev/cdrom of=file2.img' and then 'diff file1.img file2.img'. – BenjiWiebe – 2014-06-10T21:18:44.950

2Yeah, although it involves unnecessary steps, you could always compare images. There should be free software to create them on Windows, too. But if you don’t want extra software... – Daniel B – 2014-06-10T21:31:01.293

5

You can usually read the Burst Cutting Area to find that information out. It is effectively a serial number for DVDs, truly duplicate DVDs will have identical BCAs.

– Andon M. Coleman – 2014-06-11T07:30:48.000

define "exactly". Down to molecular level they're never going to be the same... – jwenting – 2014-06-12T08:05:26.063

How can you possibly perform this or any task without programs? All the OS provides is a low level AHCI/legacy driver here... Anything that does any analysis or functionality over this is an 'additional program'... – Vality – 2014-06-12T09:02:49.280

Answers

33

The easiest way to determine if 2 discs are the same is to run a hash of both of them:

sudo md5sum /dev/cdrom

If the hashes match, the disks are exactly the same. However this will not tell you what is different about them. Even if a single bit is different you would get a totally different hash.

You can check the partition table of a disc with fdisk:

sudo fdisk -l /dev/cdrom

mtak

Posted 2014-06-10T20:14:59.973

Reputation: 11 805

he's using windows, not linux. – LPChip – 2014-06-10T20:19:30.103

how does this help him on windows? he didnt say he had cygwin – Keltari – 2014-06-10T20:19:33.053

37In the question it says using Windows or Ubuntu... – mtak – 2014-06-10T20:19:58.070

ah, it does, just looking at the tags tho, you dont see it. and he edits it right as i type this. +1 – Keltari – 2014-06-10T20:20:48.443

1If you feel like ripping the disks to ISOs that are bit-by-bit matching with the disks, you can use HxD and do a file-compare. – Cole Johnson – 2014-06-10T23:56:15.120

5O_O Never thought that CDs use a usual MBR. Just checked this on kubuntu iso image, and fdisk -l indeed appeared to print some sensible data. Looking with xxd at first 512 bytes also gave very similar structure to that of HDD MBR. +1 for enlightening :) – Ruslan – 2014-06-11T10:55:06.340

You can also do what @ColeJohnson suggested with the ISO but use comp (Windows) or diff (*nix) to do the comparison, since those tools are standard. – Bob – 2014-06-11T12:32:40.910

If the hashes match, the disks are exactly the same. - Nope, that's not true. In most cases, this assumption will be sufficient, but two same hashes do not guarantee exact same source data (i.e. data on a disc). – Dennis – 2014-06-11T13:42:56.247

2

@Chips_100 If you are talking about a hash collision, the chance of that are astronomically small. (Probability of two hashes accidentally colliding is 1/2^128 which is 1 in 340 undecillion 282 decillion 366 nonillion 920 octillion 938 septillion 463 sextillion 463 quintillion 374 quadrillion 607 trillion 431 billion 768 million 211 thousand 456, source)

– mtak – 2014-06-11T13:45:35.713

2@Chips_100 Sure, you're right, but we're talking about MD5. Yes, collisions have even found, but they aren't random collisions, they are generated by a program that does an exotic thing called maths for a couple hours. Needless to say, to hash, you read the entire file and do math operations on the data. If you're gonna use hashing to compare files, you might as well just do a byte-by-byte comparison. – Cole Johnson – 2014-06-11T15:12:22.450

2

@mtak Speaking of numbers in the undecillion range.

– Cole Johnson – 2014-06-11T15:13:45.737

@ColeJohnson - there are 3rd party hashing programs. – Keltari – 2014-06-11T16:54:27.290

1@ColeJohnson that is amazing :) – mtak – 2014-06-11T17:42:48.950

1@ColeJohnson That's why the FSF uses the name GNU/Linux, which has at least all GNU coreutils built in (including md5sum), making a barely usable system :) – mtak – 2014-06-11T17:51:43.043

@ColeJohnson All Im saying is that Windows does not ship with anything that does md5 hashes. However, with WMF5, which comes with Win8(.1?) and Server 2012, powershell has SHA hashes available. – Keltari – 2014-06-11T17:55:20.667

@Keltari Windows 8*. Correct, but you still need to enable Powershell. Your original comment is correct. I was just confused by it at 7 in the morning. – Cole Johnson – 2014-06-11T18:14:04.103

7

Just comparing the folders and files misses other things about the disc. If you create an .ISO image file from each disc and byte compare them you'd have a better idea of the discs are really the same or not.

Dithermaster

Posted 2014-06-10T20:14:59.973

Reputation: 299

Instead of byte compare, you could use a checksum or hash. – Ryan – 2014-06-11T17:35:10.630

1As @colejohnson says on a reply to another answer: "Needless to say, to hash, you read the entire file and do math operations on the data. If you're gonna use hashing to compare files, you might as well just do a byte-by-byte comparison". – That Brazilian Guy – 2014-06-11T21:22:21.207

5

When using Windows you can use the Microsoft File Checksum Integrity Verifier to get hash values of files on the disk.

The Microsoft File Checksum Integrity Verifier tool is an unsupported command line utility that computes MD5 or SHA1 cryptographic hashes for files.

Moses

Posted 2014-06-10T20:14:59.973

Reputation: 10 813

3-1 this way it will compare only files and folders, and only for the current recording session. – That Brazilian Guy – 2014-06-11T21:08:15.167

1

To compare the content of the files one can use tools such as freefilesynch. But it is not possible to compare the format tables of boot sector of those DVDs

guest

Posted 2014-06-10T20:14:59.973

Reputation: 11