20

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?

deltab
  • 199
  • 6
Mega
  • 201
  • 2
  • 3
  • 1
    Are you comparing store bought movie DVDs or another type of DVD? – pacoverflow Jun 10 '14 at 21:06
  • 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 Jun 10 '14 at 21:18
  • 2
    Yeah, 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 Jun 10 '14 at 21:31
  • 5
    You can usually read the [Burst Cutting Area](http://www.multimediadirector.com/help/technology/dvdintro/dvd_specs.htm#BurstCuttingArea) to find that information out. It is effectively a serial number for DVDs, truly duplicate DVDs will have identical BCAs. – Andon M. Coleman Jun 11 '14 at 07:30
  • define "exactly". Down to molecular level they're never going to be the same... – jwenting Jun 12 '14 at 08:05
  • 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 Jun 12 '14 at 09:02

4 Answers4

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
  • 16,513
  • 2
  • 52
  • 64
  • he's using windows, not linux. – LPChip Jun 10 '14 at 20:19
  • how does this help him on windows? he didnt say he had cygwin – Keltari Jun 10 '14 at 20:19
  • 37
    In the question it says *using Windows or Ubuntu*... – mtak Jun 10 '14 at 20:19
  • ah, it does, just looking at the tags tho, you dont see it. and he edits it right as i type this. +1 – Keltari Jun 10 '14 at 20:20
  • 1
    If 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 Tobin Jun 10 '14 at 23:56
  • 6
    O_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 Jun 11 '14 at 10:55
  • 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 Jun 11 '14 at 12:32
  • 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 Jun 11 '14 at 13:42
  • 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](http://stackoverflow.com/a/288519/2992519)) – mtak Jun 11 '14 at 13:45
  • 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 Tobin Jun 11 '14 at 15:12
  • 2
    @mtak [Speaking of numbers in the undecillion range](http://what-if.xkcd.com/96/). – Cole Tobin Jun 11 '14 at 15:13
  • @ColeJohnson - there are 3rd party hashing programs. – Keltari Jun 11 '14 at 16:54
  • 1
    @ColeJohnson that *is* amazing :) – mtak Jun 11 '14 at 17:42
  • 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 Jun 11 '14 at 17:51
  • @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 Jun 11 '14 at 17:55
  • @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 Tobin Jun 11 '14 at 18:14
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
  • 299
  • 1
  • 4
  • Instead of byte compare, you could use a checksum or hash. – Ryan Jun 11 '14 at 17:35
  • 1
    As @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 Jun 11 '14 at 21:22
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.

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

That Brazilian Guy
  • 6,834
  • 10
  • 64
  • 102
guest
  • 11
  • 1