Re: cd burning not going well
On Wed, Jun 25, 2008 at 5:37 PM, Florian Kulzer
> md5sum -b /dev/scd0
> The output should match the md5sum of the ISO image.
Not _strictly_ true (due to blank/null padding which is sometimes
added to the end of iso disk images, and issues with the infamous
read-ahead bug in Linux).
Here's a method that's _always_ worked for me (but it is a little lengthy)...
Firstly find out how big your iso image thinks it should be. Do this using
isoinfo -d -i <yourIsoFile>
Search in the page of output for 2 fields: "Logical block size" and
The "Logical block size" should ALWAYS be 2048 for any iso image, and
the "Volume size"
tells you how many blocks (of 2048 bytes each) the ISO file should take up.
(If you want, you can now use "ls -al <yourIsoFile>" to see if it's
exactly the correct size according the ISO header - if the size in
bytes is different to 2048*"Volume size" then any difference should
only be blank padding. If you want to, you can check that any padding
is really blank using "split" and "hexdump", but that's another
I use wodim (debian's replacement for cdrecord) to burn my isos to disk thus:
wodim -v -dao -pad padsize=63s dev=/dev/<rawDiskDevice> <isoFileToBurn>
This adds enough padding to the end of the cd/dvd to avoid linux's
Now you can compare md5sums for the original file and your (freshly burnt) disk:
dd if=<yourIsoFile> bs=2048 count=<VolumeSize> | md5sum
dd if=/dev/<rawDiskDevice> bs=2048 count=<VolumeSize> | md5sum
Also, I normally have a spare root terminal running "tail -f
/var/log/syslog" while the dd of the disk is running to check for
"slight" problems (like re-reads).
If the 2 md5sums are the same, all is well and good. Like I said, it
is lengthy, but it's never failed me yet. Hope this helps. Jaime