CD-ROM drives are commonly used for duplicating existing CDs, and for making CD data backups of hard disk files. This article demonstrates how both tasks can be accomplished using cdrecord on the Solaris[tm] Operating Environment.
A simple command line program, cdrecord, means burning CDs using Solaris software is quick, simple, and cost-effective. The cdrecord program, which works for both SPARC[tm] and Intel Architecture systems, is included on the Solaris Software Companion CD (Update 2 and higher), and is also available for free download from www.sun.com/software/solaris/freeware/download.html.
While optional, configuring a cdrecord startup file, /etc/default/cdrecord, will save time in the future. This startup configuration file can hold information that cdrecord will need every time it's used, such as the CD recorder's speed, device name, the preferred buffer size, and so on. Alternately, these options can be entered into the command line before every use.
The first step is to identify the cd recorder device name, which can be found by scanning the device buses. In order to scan the devices, however, the volume management must be turned off.
Log in as root
Turn off volume management by typing /etc/init.d/volmgt stop
Discover the CD recorder and CD-ROM drive device names by typing cdrecord -scanbus at the root prompt. The command output should be similar to:
# cdrecord -scanbus
cdrecord 1.9 (i386-pc-solaris2.
Copyright (C) 1995-2000
1,0,0 100) 'CREATIVE' 'CD5233E ' '1.00' Removable CD-ROM
2,4,0 204) 'PLEXTOR' 'CD-R PX-R820T' '1.05' Removable CD-ROM
The device ID is the first three numbers listed in each entry -- in this case, device 2,4,0 is the CD recorder, for example. The configuraiton file can also include a recording speed (for example, 8 times), and a buffer size (for example, 8 megabytes) to help avoid under runs. To create the configuration file, located in /etc/default/cdrecord, type:
# cat /etc/default/cdrecord
CDR_FIFOSIZE=8m
CDR_SPEED=8
CDR_DEVICE=USCSI:2,4,0
The cdrecord program startup configuration file is now set up for the future!
CD to CD
To duplicate an existing CD, insert the CD into the CD-ROM drive. (Remember, duplicating CDs might require certain copyright and license permissions!) Then:
Determine the controller and target numbers. These are listed in the cdrecord -scanbus output (from before): 1,0,0 100) 'CREATIVE' 'CD5233E ' '1.00' Removable CD-ROM. The first number is the controller number, and the second number is the target number. In this case, they are one and zero, respectively. Also note that in the Solaris 8 platform, the IDE CD-ROM drive device names are very similar to SCSI device names -- both contain target numbers.