# clone DVD 1:1



## ccc (Apr 29, 2010)

hi

Howto clone DVD 1:1 (just as a backup) on freeBSD 7.0 with KDE?


----------



## phoenix (Apr 29, 2010)

If you just want an .ISO file that can be used to create copies of the DVD:
`# dd if=/dev/acd0 of=/home/whatever/mymovie.iso bs=2K`

Or, fire up K3B and use the Clone DVD function in there.


----------



## aragon (Apr 29, 2010)

I use sysutils/dvdbackup.


----------



## ccc (May 1, 2010)

Thx, but after the cloning process, how do you compare the contents of two DVDs, I mean copy and the original?
Is it *md5sum* the best way?


----------



## Carpetsmoker (May 2, 2010)

Yes.
It's called *md5* on FreeBSD, md5sum is the GNU utility.
Also, *sha256* is the new "better" replacement for md5.


----------



## ccc (May 2, 2010)

Carpetsmoker said:
			
		

> Yes.
> It's called *md5* on FreeBSD, md5sum is the GNU utility.
> Also, *sha256* is the new "better" replacement for md5.



Thx, but how it works to compare DVD copy to the original DVD using sha256?


----------



## aragon (May 2, 2010)

All you can do is rip the DVD twice, check for errors, and compare the two copies with md5 or sha256.


----------



## ccc (May 2, 2010)

Is it any way to display file differences between copy and the original?


----------



## aragon (May 2, 2010)

Like I said, all you can do is rip it twice and check for differences between the two copies.


----------



## jalla (May 2, 2010)

ccc said:
			
		

> Is it any way to display file differences between copy and the original?



Mount both the dvd and the image and do a recursive diff

```
diff -rq /mnt1 /mnt2
```


----------



## Carpetsmoker (May 2, 2010)

> Like I said, all you can do is rip it twice and check for differences between the two copies.



Can't you just run md5/sha256 on the cd device (/dev/acd0 or /dev/cd0)?


----------



## aragon (May 2, 2010)

Carpetsmoker said:
			
		

> Can't you just run md5/sha256 on the cd device (/dev/acd0 or /dev/cd0)?


If the OP uses dvdbackup the copy will be decrypted, so it won't match what's on the disc.

Regardless, doing a verification is identical to ripping a second time.  The data is read again and compared to the first read.


----------



## FBSD (May 3, 2010)

2 other useful DVD backup/duplication programs are 

- K9copy - http://k9copy.sourceforge.net/   - \usr\ports\multimedia
- Handbrake - http://handbrake.fr/ -   \usr\ports\multimedia


----------



## emka81 (May 17, 2010)

Hi,

i use two things

1.) Video DVD 

`# dvdbackup -M -i /dev/acd0 -o *where* -n *name_of_file*`

it makes a whole copy, and if the DVD is too big you can shrink it down with k9copy

2.) File DVD

`# dd if=/dev/acd0 of=/*name_of_file*.iso bs=[for example 1024]`


----------



## free-and-bsd (Sep 30, 2017)

emka81 said:


> `# dd if=/dev/acd0 of=/*name_of_file*.iso bs=[for example 1024]`


LOL, 7 years ago, right? And the command is still useful, therefore here is my correction to the above:

This good old many times tested dd commands above NOW gives me error "dd: /dev/cd0: Invalid argument" unless I give it "bs=2048".

This is indicated in the manual, I think, in this line:

```
To create an image of a Mode-1 CD-ROM, which is a commonly used format
     for data CD-ROM disks, use a block size of 2048 bytes:
```

I don't remember if I ever cared about the bs when dd-copying, but now it seems to matter.


----------



## aragats (Oct 1, 2017)

Yes, I noticed that too ― when tried to copy u-boot files to an SD card.
So now dd allows using only the formal block size of a device. While 2048 is the actual block size of a CD, and 512 (used to be) ― of an HDD, it's really doesn't make much sense. For example, many disk drives use 4096 blocks and SD cards up to 2M...


----------



## free-and-bsd (Oct 16, 2017)

Small correction is due: it actually looks like dd doesn't like in particular the (default) 512 value. It has no objection against bs=1M at that.


----------

