create .iso images?

Robert Parker bposs at dodo.com.au
Fri Jan 28 15:32:43 UTC 2005


On Friday 28 January 2005 17:08, Ed Fletcher wrote:
>
> I tried this with a small (1.6GB) dvd.  I used the command:
>
> dd bs=2048 if=/dev/dvd of=name.iso
>
> It always copies just a few bytes and then dies with an error:
>
> dd: reading `/dev/dvd': Input/output error
> 384+0 records in
> 384+0 records out
> 786432 bytes transferred in 0.016091 seconds (48873878 bytes/sec)

The results you get are not uncommon. On one box of mine the dvd burner is 
totally reliable using dd but the cd burner is not.

First make sure the /dev/dvd is unmounted. The default for the Gnome desktop 
is to mount the dvd automatically when the tray closes.

If dd still fails you will need to use readcd, it is part of the cdrtools 
package and is automatically installed with Wart IIRC.

Use cdrecord thus:
mount /dev/dvd /cdrom1 or whatever mount point.
df
Get the number of 1k blocks in the line that has /dev/dvd (or /dev/hdc)
Divide that number by 2 to get 'number of sectors' used by the iso.
umount /dev/dvd

then:
readcd dev=/dev/dvd f=your.iso sectors=0-'number of sectors'

Incidently on a box that does work with dd the preferred format should be:

dd if=/dev/dvd of=your.iso bs=2048 count='no of sectors'

The reason is that often burnt cds/dvds have a number of null sectors 
appended to the actual iso on the disc. If you simply use dd without a block 
count the resulting iso will not be identical to the iso from which the dvd 
was produced. The same remarks apply to the use of cat /dev/dvd > your.iso.
Not to say that the result won't work, it might. But if you do `md5sum 
your.iso` the sum will not match that of the original iso if the there are 
any blocks of padding copied up.

My experience has been, where dd fails readcd succeeds, and sometimes the 
reverse.

HTH
Bob Parker




More information about the ubuntu-users mailing list