Command-line cd burning.

For this we need the packages cdrtools and cdrdao. We need to know the Bus ID of the cd-rom drive and the cd-writer, which we obtain as follows

glynthebearded# cdrdao scanbus
Cdrdao version 1.2.2 - (C) Andreas Mueller <andreas@daneb.de>
  SCSI interface library - (C) Joerg Schilling
  Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

Using libscg version 'schily-0.8'

3,0,0 : SONY , DVD RW DW-D22A , BYS1
3,1,0 : SONY , CD-RW CRX230ED , 4YS1

Recipes follow for:-

  1. Creating and burning a data CD
  2. Copying a CD
  3. Copying an audio CD
  4. Creating and burning a custom audio CD

1. Creating and burning a data CD

First of all make a directory which will contain the files and then copy all the data files into it.

$ mkdir ~/mydatacd

Next make an iso image of the data to be burned

mkisofs -J -allow-leading-dots -R -V "Data CD" -iso-level 4 -o ./mydatacd.iso ./mydatacd

(Now you have the data iso we no longer need the mydatacd directory.)

Now burn it!

cdrecord -eject speed=48 dev=1,0,0 ~/data_cd.iso

* "eject" tells the machine to spit out the cd when it is ready. * "speed" is obvious! * dev=3,1,0 shows the burning device, as above.

2. Copying a data cd.

mkdir ~/cd_copy
cd ~/cd_copy
readcd dev=3,0,0 -clone f=super_copy

(Unreadable sectors? Try

readcd dev=3,0,0 -clone -nocorr -retries=0 f=super_copy)

cdrecord -eject dev=3,1,0 -raw96r -clone -v super_copy

3. Copying an audio CD

1. Make a directory to hold the files you want to copy.

$mkdir mysongs
$cd mysongs

2. Next type:-

cdrdao read-cd - -device 3,0,0 toc-file

First this generates a track list and then copies the tracks into your directory. Notice that we use the dvd drive for this purpose!

3. To write the new cd type:-

cdrdao write - -device 3,1,0 toc-file

Back to FreeBSD page

Last edited: Tue Aug 31 23:50:14 BST 2010