[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Copying a CD



On Tuesday 14 September 2004 13:05, Marvin Aguero wrote:
> Hi guys,
>
> I have little experience burning CDs with Linux, but I have managed to burn
> some data and audio CDs with no problems at all.
>
> I now face a new challenge: I'd like to duplicate a CD. The CD I am trying
> to duplicate is bootable, so, I'd like to make an exact copy of it, not
> just copy the files.
>
> Can anyone share some ideas as how to achieve this?
>
> TIA,
>
> -Marvin

Marvin,

If you mean an exact copy of the original iso, you need to account for the 
possibility of some padding sectors on your cd (if it was burnt, maybe a 
different story if it was pressed).

Assuming /cdrom is your burner/reader and 0,0,0 is your dev for cdrecord etc.

mount /cdrom
df
You get a readout of 1k blocks for all mounted devices, get the figure for 
/cdrom. Divide it by 2 to get the number of 2k sectors. 
umount /cdrom
Copy the iso thus:
readcd dev=0,0,0 f=copy.iso sectors=0-thenumberofsectors

alternatively
dd if=/dev/cdrom of=copy.iso bs=2k count=thenumberofsectors

dd works on some hardware, readcd works on most. They tend to be mutually 
exclusive, dd working on devices that readcd won't and vice versa.

then burn it:
cdrecord dev=0,0,0 speed=?? copy.iso

Copying as above you will get an iso that exactly matches the one that 
produced the cd so you do an md5sum check on it if required.

Bob



Reply to: