|
|
cdrecord(1) supports many options and formats that are beyond the scope of basic file archiving. This page documents the most common tasks for creating data CDs and DVDs and includes information specific to SCO OpenServer Release 5.0.7.
A list of devices similar to this is displayed (SCSI addresses are shown regardless of the controller type):
scsibus0: 0,0,0 0) 'ATAPI ' 'CD-RW 52X24X ' 'MB51' Removable CD-ROM 0,1,0 1) * 0,2,0 2) * 0,3,0 3) * 0,4,0 4) * 0,5,0 5) * 0,6,0 6) * 0,7,0 7) *In this case an ATAPI CD writer is the first device on an IDE controller (address 0,0,0).
CDR_DEVICE=ide #CDR_SPEED=40 #CDR_FIFOSIZE=4mThe CDR_DEVICE setting is actually an index into a table with a series of drive-specific defaults:
# drive name device speed fifosize driveropts # teac= 1,3,0 -1 -1 "" panasonic= 1,4,0 -1 -1 "" plextor= 1,4,0 -1 -1 "" sanyo= 1,4,0 -1 -1 burnfree yamaha= 1,5,0 -1 -1 "" ide= 0,0,0 -1 -1 burnfree cdrom= 0,6,0 2 1m ""The default entry is ide (as defined by CDR_DEVICE). Because a generic SCSI driver is used for all CD/DVD drives, the SCSI address scheme (host adapter, device, LUN) is used even with IDE controllers. At the same time, this scheme only applies to IDE controllers with CD/DVD drives (that is, the numbering of host adapters is not absolute.) For example, on a system with no SCSI adapters and two IDE controllers, the controller with the CD/DVD drive attached is host adapter 0 (even if it happens to be the secondary IDE controller).
Note the default addresses for other drives are not realistic; be sure and change the device address in second column to match the actual drive settings. The other columns (speed, buffer size, and driver options) can be set as desired. A value of -1 indicates that the device uses its own default value. The quotes in the column indicate an empty option list; burnfree allocates a larger buffer for write operations (if supported by the drive). Other options are documented in cdrecord(1).
To write this image to a disc, you would use a command like this:
dvdrecord -v -eject dev=0,0 /tmp/cdimg.iso
The -v is optional and generates verbose output. The dev= argument can also be omitted if the default drive is defined in /etc/default/cdrecord. The -eject option ejects the disc when the process is complete. In addition, cdrecord displays a nine-second countdown to give you an opportunity to abort the command.
You can also perform a test burn using the -dummy option:
dvdrecord -v -dummy /tmp/cdimg.iso
The command is executed as specified, but the laser is not activated.
If the system is relatively idle (with little or no disk activity),
it is possible to skip creating the image and
pipe the output of mkisofs directly to cdrecord:
mkisofs -r /usr/home/cforbin | cdrecord -
In this example, the contents of /usr/home/cforbin is written to the disc (the - argument takes data from the standard input).
Media | Read-Write |
---|---|
Type | Behavior |
CD-R | Existing data cannot be erased or overwritten |
Additional sessions can be appended | |
CD-RW | Entire disc can be erased/blanked |
Explicit erasing/blanking required before rewrite | |
Additional sessions can be appended | |
DVD-R | Existing data cannot be erased or overwritten |
Additional sessions can not be appended | |
DVD-RW | Entire disc can be erased/blanked |
Explicit erasing/blanking required before rewrite | |
Additional sessions can not be appended | |
DVD+R | Existing data cannot be erased or overwritten |
Additional sessions can not be appended | |
DVD+RW | Erasing/blanking unnecessary (and not supported) |
Disc can be rewritten at will | |
Additional sessions can not be appended |
Multisession support is restricted to CD media. A similar capability for DVD (``multiborder'') is not yet supported.
For DVD+RW and DVD+R media, dummy writing mode (-dummy) is not supported. In addition, a minimum of 800MB is always written to DVD+R/W media.
To finalize a CD (making it non-writable), simply omit the -multi option.
Writing a new session on a CD normally hides the previous session from view (requiring an application that allows you to select the active session). However, it is possible to import the TOC (table of contents) from the previous session and make the previously-written data available in the ISO image for the next session.
In this example, mkisofs uses the -C option to execute
the cdrecord -msinfo command on the specified drive
(-M 0,0) to read the location of the previous session
and uses the response to create the ISO image:
mkisofs -r -J -C `cdrecord -msinfo` -M 0,0 -o image.iso /usr/home/colossus
When cdrecord is used to write the image to CD, all the previous data will be accessible along with the new files (in this example, from /usr/home/colossus).
By default, the
mount(ADM)
command loads the last session. (At this time, only the first
and last sessions can be mounted.) To override the default and
mount the first session, use the syntax in this example:
mount -o session=1 /dev/cd0 /mnt
This example collects the files located in /tmp/corral
and creates a series of files named file.iso_01,
/file.iso_2, and so on. The following example writes those
same files to DVD:
dvdrecord /u/file.iso_*