Command-line utility to check burned DVD?
Hello
On a bare Ubuntu 10.04 server, I used the following commands to check which device is used by the DVD burner, and then burn an ISO file: Code:
apt-get install wodim Do you know if there is one available? Thank you. |
You could use dd to copy the data back from the DVD to a file and checksum it, for example with md5sum. If you are doing this there are a couple of potential "gotchas". The DVD must not be mounted or you will get its contents not the image and you must dd the same amount of data back from the DVD using dd's count= option (divide the iso size in bytes by 512, assuming dd's default block size of 512 bytes).
|
Like catkin says, use md5sum and dd to read the burned image. No need for using another file though. :)
Here's a `rawread` command (a script) that came with some package or other, I've had it floating around for quite a while.. I don't think it currently comes with Slackware.. Anyhow, let's say your DVD drive is /dev/sr0, then you would do: Code:
root# ./rawread /dev/sr0 | md5sum Code:
#!/bin/sh Code:
sasha@reactor: /home/sasha/SCRIPTING/rawread /dev/sr0 | md5sum |
Thanks much for the tip, but although the DVD is in the drive but apparently not mounted, the above script didn't work:
Code:
root@ubuntu:/tmp# mount |
Correct that the disc does not need to be mounted. I suspect the problem using the script is that you do not have cdrtools and/or dvd+-rw_tools (approximate spelling) packages installed. So, the value of that variable is not being set correctly, and the script is failing. The script is pretty simple as you can see, so I can't imagine what else could be wrong.
Whatever package brings `isoinfo` with it. For me, I have: Code:
root@reactor: which isoinfo Otherwise, you'll have to come up with another means of determining correctly, the count= and blocksize= values you require for `dd` to correctly read back the data. |
OK, found what it was: When copy/pasting from the web page to the terminal, the "blocksize=" and "blockcount=" lines were turned into two lines. Fixing those two errors solved the problem.
Apparently, an alternative to using md5 directly is using the original ISO file as reference: http://how-to.wikia.com/wiki/How_to_...x#Command_line Thanks again. |
My goodness, it seems so complicated, but there's also:
Code:
cmp image.iso /dev/sr0 |
Thanks for the tip. Is cmp as good and reliable as the other solution?
What's padding? |
Padding = it adds zeros to the end of the disk after burning the iso. This means a direct md5sum with device and iso will fail.
As for reliable, read 'man cmp' "cmp - compare two files byte by byte" |
Thank you. "pv" makes it possible to have some progress info:
Code:
# pv myfile.iso | cmp /dev/scd0 |
Quote:
Given that any padding will be on the DVD, not in the .iso, would it be better to use pv /dev/scd0 | cmp myfile.iso? Otherwise an early EOF could indicate an error. |
I think it is correct, EOF on - means that stdin has finished, while /dev/scd0 still has padding.
As for pv: http://www.ivarch.com/programs/pv.shtml |
Quote:
And thanks for the link. |
All times are GMT -5. The time now is 11:05 PM. |