dd command to copy a cd to a hard disk - Input/output error

Simon Burton simonb at webone.com.au
Sat Mar 30 13:36:47 EST 2002


Daniel,
i just tried it,
the dd trick seems to only work with data CDs,
not audio CDs (which the CD would treat differently i presume).

also i think the for loop needs some semi-colons,
try a loop on your cmd line, e.g.
$ for i in .; do ls $i; done;

oh wow, it works!
just put a ; after the list of nums.

let me know what else you find,

simon burton


Daniel wrote:

> Hello All,
> I wonder if anyone can help me please:
> I have tried to copy a cd to hdd on Mandrake 8.1 and Redhat 7.2 (I've 
> done it before, but this time it's not working):
> 
> dd if=/dev/cdrom of=Mandrake82-cd1-inst.i586.iso
> dd: reading '/dev/cdrom': Input/output error
> 1332304+0 records in
> 1332304+0 records out
> 
> The original cd works, so perhaps the problem lies with the block size 
> which I should specify in the format:
> dd if=/dev/cdrom ibs= ???k of=Mandrake82-cd1-inst.i586.iso obs=???k
> 
> Am I on the right track?  Is there an easier or more logical way of 
> figuring out the correct input or output block sizes?
> Do both need to be specified?
> At: http://www.linuxdoc.org/HOWTO/CD-Writing-HOWTO-4.html
> I found what follows.  I have created the file and made it executable 
> and as bash isn't in the path done 'sh file.sh' and I get an error on 
> 'do'.  Perhaps there's an alternative?
> +++++++++++++++
> #! /bin/bash
> 
> RD=/dev/cdrom
> for i in 32768,7   32776,32 32808,32 32958,128 33086,128 33214,128 
> 33342,128 33470,32 33581,16 33598,16  33615,16  33632,16
> do
>     old_IFS="$IFS"
>     IFS=","
>     set -- $i
>     IFS="$old_IFS"
>     OFFSET=$1
>     LENGTH=$2
>     echo "*`dd if=$RD bs=1 skip=$OFFSET count=$LENGTH   2> /dev/null`#"
> done
> ++++++++++++++++
> Any help would be greatly appreciated.
> Thanks,
> Daniel.
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> 






More information about the linux mailing list