cdrecord – writing your own CDs
While I was at BSDCon
2000, I was able to make a number of purchases. These were wholly/partly funded
by donations and from ad revenue.
One of the items was a Plextor CD-RW internal SCSI
drive. I chose SCSI because of advice I was given regarding SCSI reliability
with respect to CDRW drives. I chose Plextor because of the recommendations of
others. Plextor has also donated several drives to the cdrecord author (see
for details), including the drive model I bought. That’s a good marketing move by
Plextor. It ensures the author can test and work with their hardware, thereby
ensuring the software works well with that drive.
NOTE: In this article, I specify the speed which should be used to write
to the CD. You should adjust that value to suit your CD drive.
The sharp eyed amongst you may notice that the device used in this article
differs from that used in the cdrecord –
writing multiple sessions article. That’s not magic. And it’s not a
mistake. When I wrote this article, I had two SCSI cards in the box. I’ve
since returned one to it’s owner and put the CDRW on the same card as the two SCSI drives.
If you are using an IDE CD-RW, you may find Burning CDs on an IDE CD-RW helpful.
The home page for cdrecord is
The FAQ and How-To are at:
cd /usr/ports/sysutils/cdrtools make install
You will also need mkisofs (as in Make ISO File System) for creating an ISO
image. It is also in sysutils/cdrtools. In previous times, it was found in sysutils/mkisofs.
The notes for FreeBSD users (see above link) suggest that you include the
following options in your kernel:
options P1003_1B #Posix P1003_1B real-time extensions options _KPOSIX_PRIORITY_SCHEDULING # # The above two POSIX options were already in my kernel. # I added the following for cdrecord. # options _KPOSIX_VERSION=199309L
Know your CD drive
In order to use cdrecord, you need to know where your CD drive is installed.
Here’s an extract from dmesg on my box:
cd0 at ahc0 bus 0 target 5 lun 0 cd0: <PLEXTOR CD-R PX-W124TS 1.05> Removable CD-ROM SCSI-2 device cd0: 10.000MB/s transfers (10.000MHz, offset 8) cd0: cd present [332860 x 2048 byte records]
cdrecord needs the bus, target, and lun values (in the above case, that’s
But beware, cdrecord did not recognize the above. Witness the following
failure (I’ll explain what I was doing in the next section):
# cdrecord -dummy -eject blank=all dev=0,5,0
Cdrecord 1.9 (i386-unknown-freebsd4.2)
Copyright (C) 1995-2000 J