Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Cloning movie DVDs with dd - only works after accessing disk with another command?
Date: Tue, 11 Aug 2009 04:43:25
Message-Id: E2A001A4-43EE-4CAC-BFFA-859DA5D9BF7A@stellar.eclipse.co.uk
1 Hi there,
2
3 Now I've got this new machine with all this space on it (or rather:
4 now I seem to be more interested in doing stuff with this machine I
5 built a while ago), I'm starting on the process of ripping all my DVDs.
6
7 In the past I tried media-video/undvd for DVD ripping, but its .mp4
8 support now is broken, and probably won't be fixed.
9
10 This week I've been trying HandBrakeCLI, and it seems to work pretty
11 darn lovely.
12
13 But the difference is that undvd has a simple --clone option which
14 copies the DVD to disk first, and HandBrakeCLI doesn't.
15
16 To save wear & tear on my optical drive I have been cloning the DVD to
17 disk before ripping, and I've noticed that it doesn't seem to work if
18 I just do `dd if=/dev/cdrom of=disc.iso`. It seems like I have to
19 access the disk using some other command first, then dd works just
20 fine (in exactly the way I tried a moment before).
21
22 Can anyone explain this, please?
23
24 I'm guessing it has something to do with DeCSS encryption, but firstly
25 I don't understand how that applies to dd, because I'd have assumed
26 that treats the drive as a block device. Secondly, if this is related
27 to DeCSS, I don't understand why accessing the disk with one command
28 leaves it unlocked for another command to access the disk a minute
29 later.
30
31 Anyone got any thoughts, please?
32
33 I haven't looked into this deeply myself, yet, so I'm not able to give
34 a full analysis of how exactly the behaviour is manifesting itself. I
35 tried dd'ing one disk and it didn't work, so I started undvd working
36 with the --clone option and cancelled when the cloning had finished
37 (and the rip began). I basically wanted to see if it worked or failed,
38 and it worked just fine, so I looked through undvd's source and it
39 _seems_ (I say "seems" lest I'm reading undvd's perl code wrongly)
40 just to use dd itself. So next I tried `dd if=/dev/cdrom
41 of=disc_manual_dd.iso` myself and not only did it work just fine, but
42 the md5sums of the two images (the one produced by undvd & the one
43 produced by my manual dd) were identical.
44
45 So I tried with a different disk - take a look at the attached
46 cloning.txt - and dd fails repeatedly at 770kB. Then I run scandvd on
47 the disk and after that dd works perfectly, "8027521024 bytes (8.0 GB)
48 copied". scandvd is a tool which is packaged with undvd and it runs
49 mplayer (I'm sure) on the disk, then shows the number of tracks on the
50 disk in a pretty format.
51
52 This is no kind of a show-stopper for me, because I've described the
53 workaround above, it's just a curiosity. I guess I'm not alone on here
54 in wanting to know how these computer things work.
55
56 I'd be really interested if anyone else's DVD drives show the same
57 behaviour. Does dd fail for you when you try it on a new movie? If you
58 don't have undvd installed, just run `mplayer dvd://`, cancel it and
59 then try dd again.
60
61 Sorry if I've been a little verbose with my explanation, BTW. It's a
62 little late here, I'm a little tired, and with these weird things that
63 I almost don't believe myself I always like to explain
64 comprehensively, and it prolly reads like I'm blabbering.
65
66 Thanks for any thoughts,
67
68 Stroller.

Replies