2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All rights reserved.
3 .\" Copyright 2012 Marcel Telka <marcel@telka.sk>
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH CDRW 1 "Dec 1, 2012"
9 cdrw \- CD read and write
13 \fBcdrw\fR \fB-i\fR [\fB-vSCO\fR] [\fB-d\fR \fIdevice\fR] [\fB-p\fR \fIspeed\fR] [\fIimage-file\fR]
18 \fBcdrw\fR \fB-a\fR [\fB-vSCO\fR] [\fB-d\fR \fIdevice\fR] [\fB-p\fR \fIspeed\fR] [\fB-T\fR \fIaudio-type\fR] \fIaudio-file1\fR
19 [\fIaudio-file2\fR]...
24 \fBcdrw\fR \fB-x\fR [\fB-v\fR] [\fB-d\fR \fIdevice\fR] [\fB-T\fR \fIaudio-type\fR] \fItrack-number\fR \fIout-file\fR
29 \fBcdrw\fR \fB-c\fR [\fB-vSC\fR] [\fB-d\fR \fIdevice\fR] [\fB-p\fR \fIspeed\fR] [\fB-m\fR \fItmp-dir\fR]
30 [\fB-s\fR \fIsrc-device\fR]
35 \fBcdrw\fR \fB-b\fR [\fB-v\fR] [\fB-d\fR \fIdevice\fR] all | session | fast
40 \fBcdrw\fR \fB-L\fR [\fB-v\fR] [\fB-d\fR \fIdevice\fR]
45 \fBcdrw\fR \fB-M\fR [\fB-v\fR] [\fB-d\fR \fIdevice\fR]
50 \fBcdrw\fR \fB-l\fR [\fB-v\fR]
61 The \fBcdrw\fR command provides the ability to create data and audio CDs. This
62 command also provides the ability to extract audio tracks from an audio CD and
63 to create data DVDs. The CD or DVD device must be MMC-compliant to create a CD
64 or DVD with the \fBcdrw\fR command.
67 \fBcdrw\fR searches for a CD or DVD writer connected to the system, unless you
68 specify a device with the \fB-d\fR option. If \fBcdrw\fR finds a single such
69 device, it uses that device as the default CD or DVD writer for the command.
72 When more than one CD or DVD writer is connected to the system, use the
73 \fB-d\fR option to indicate which device is desired. The device name can be
74 specified in one of the following ways: /dev/rdsk/cNtNdNsN, cNtNdNsN, cNtNdN,
75 or a name used by volume manager, such as \fBcdrom\fR or \fBcdrom1\fR. Using
76 the \fB-l\fR option provides a list of CD or DVD writers.
79 For instructions on adding a USB-mass-storage-class-compliant CD-RW or DVD-RW
80 device to your system, see \fBscsa2usb\fR(7D).
81 .SS "Creating Data CDs"
84 When creating data CDs, \fBcdrw\fR uses the Track-At-Once mode of writing. Use
85 the \fB-i\fR option to specify a file that contains the data to write on CD
86 media. If you don't specify this option, \fBcdrw\fR reads data from standard
90 In either case, the data is typically prepared by using the \fBmkisofs\fR
91 command to convert the file and file information into the ISO 9660 format
92 used on CDs. See the examples that include use of this command.
93 .SS "Creating Data DVDs"
96 \fBcdrw\fR can create single-session data DVDs on DVD+RW or DVD-RW devices
97 using images generated from \fBmkisofs\fR. These disks can be mounted as HSFS
98 file systems. When making data DVDs, \fBcdrw\fR uses Disk-At-Once (DAO) mode of
99 writing, which closes the media when writing is completed and prevents any
100 further sessions from being added. The image should be prepared in advance when
101 writing an image to the DVD media since DAO mode requires that the size of the
102 image be known in advance.
103 .SS "Creating Audio CDs"
106 Use the \fB-a\fR option to create an audio CD. Single or multiple audio files
107 can be specified with this option. All of the audio files should be in a
108 supported audio format. Currently approved formats are:
115 Sun .au files with data in Red Book CDDA form
124 RIFF (.wav) files with data in Red Book CDDA form
133 \&.cda files having raw CD audio data (that is, 16 bit PCM stereo at 44.1 KHz
134 sample rate in little-endian byte order)
143 \&.aur files having raw CD data in big-endian byte order
148 If no audio format is specified, \fBcdrw\fR tries to identify the audio file
149 format based on the file extension. The case of the characters in the extension
150 is ignored. If a format is specified using the \fB-T\fR option, it is assumed
151 to be the audio file type for all the files specified. Also, using the \fB-c\fR
152 option closes the session after writing the audio tracks. Therefore, the tracks
153 to be written should be specified in a single command line.
154 .SS "Extracting Audio"
157 \fBcdrw\fR can also be used for extracting audio data from an audio CD with the
158 \fB-x\fR option. The CD should have tracks in Red Book CDDA form. By default,
159 the output format is based on the file extension. A user can specify a
160 \fBsun\fR, \fBwav\fR, \fBcda\fR, or \fBaur\fR output format with the \fB-T\fR
165 \fBcdrw\fR can be used to copy single session data CD-ROMs and Red Book audio
166 CDs. When copying a CD, \fBcdrw\fR looks for a specified source device. If no
167 source device is specified when using the \fB-c\fR option, the current CD
168 writer is assumed to be the source. \fBcdrw\fR extracts the track or tracks
169 into a temporary file and looks for a blank writable CD-R/RW media in the
170 current CD writer. If no media is found, insert a blank writable CD media in
171 the current CD writer. If the default temporary directory does not have enough
172 space, an alternate directory can be specified by using the \fB-m\fR option.
173 .SS "Erasing CD-RW or DVD-RW Media"
176 Users have to erase the CD-RW media before it can be rewritten. With the
177 \fB-b\fR option, the following flavors of erasing are currently supported:
184 Erases the last session.
193 Minimally erases the media.
202 Erases the entire media.
207 If the session erasing type is used, \fBcdrw\fR erases the last session. If
208 there is only one session recorded on the CD-RW (for example, a data or audio
209 CD-RW created by this tool), then session erasing only erases the portion that
210 is recorded, leaving behind a blank disk. This is faster than erasing the
211 entire media. For DVD media, using the \fB-b session\fR erases the whole media.
214 The \fBfast\fR erasing type minimally erases the entire media by removing the
215 \fBPMA\fR and \fBTOC\fR of the first session. It does not erase the user data
216 and subsequent tracks on the media, but the media is treated as if it were a
217 blank disk. If a complete erase is of the media is necessary, use the \fBall\fR
221 The \fBall\fR erasing type should be used if it is a multisession disk, the
222 last session is not closed, or disk status is unknown, and you want to erase
223 the disk. With this type of erasing, \fBcdrw\fR erases the entire disk.
226 DVD+RW media does not support erasing. To re-use DVD+RW media, simply write a
227 new image onto the media. \fBcdrw\fR formats and overwrites the existing media
229 .SS "Checking device-list or media-status"
232 You can list a system's CD or DVD writers by using the \fB-l\fR option. Also,
233 for a particular media, you can get the blanking status and table of contents
234 by using the \fB-M\fR option. The \fB-M\fR option also prints information about
235 the last session's start address and the next writable address. This
236 information, along with the \fB-O\fR option, can be used to create multisession
237 CDs. Refer to the \fBmkisofs\fR(8) man page,
238 (\fB/usr/share/man/man8/mkisofs.8\fR), in the SUNWfsman package for more
243 The following options are supported:
250 Creates an audio disk. At least one \fIaudio-file\fR name must be specified. A
251 CD can not have more than 99 audio tracks, so no more than 99 audio files can
261 Blanks CD-RW or DVD-RW media. The type of erasing must be specified by the
262 \fBall\fR, \fBfast\fR, or \fBsession\fR argument. DVD+RW media does not support
263 blanking, but can be rewritten without the need for blanking.
272 Copies a CD. If no other argument is specified, the default CD writing device
273 is assumed to be the source device as well. In this case, the copy operation
274 reads the source media into a temporary directory and prompts you to place a
275 blank media into the drive for the copy operation to proceed.
284 This option is obsolete.
286 This option used to cause \fBcdrw\fR to query the drive to determine media
287 capacity. This is now the default behavior.
296 Specifies the CD or DVD writing device.
305 Help. Prints usage message.
314 Specifies the image file for creating data CDs or DVDs. The file size should be
315 less than what can be written on the media. Also, consider having the file
316 locally available instead of having the file on an NFS-mounted file system. The
317 CD writing process expects data to be available continuously without
327 Lists all the CD or DVD writers available on the system.
336 Closes the disk. If the media was left in an open state after the last write
337 operation, it is closed to prevent any further writing. This operation can only
338 be done on re-writable CD-RW media.
347 Uses an alternate temporary directory instead of the default temporary
348 directory for storing track data while copying a CD or DVD. An alternate
349 temporary directory might be required because the amount of data on a CD can be
350 huge. For example, the amount of data can be as much as 800 Mbytes for an 80
351 minute audio CD and 4.7 Gbytes for a DVD. The default temporary directory might
352 not have that much space available.
361 Reports media status. \fBcdrw\fR reports if the media is blank or not, its
362 table of contents, the last session's start address, and the next writable
363 address if the disk is open. DVD+RW does not support erasing and always has
364 some content on the media.
373 Keeps the disk open. \fBcdrw\fR closes the session, but it keeps the disk open
374 so that another session can be added later on to create a multisession disk.
383 Sets the CD writing speed. For example, \fB-p\fR \fB4\fR sets the speed to 4X.
384 If this option is not specified, \fBcdrw\fR uses the default speed of the CD
385 writer. If this option is specified, \fBcdrw\fR tries to set the drive write
386 speed to this value, but there is no guarantee of the actual speed that is used
396 Specifies the source device for copying a CD or DVD.
405 Simulation mode. In this mode, \fBcdrw\fR operates with the drive laser turned
406 off, so nothing is written to the media. Use this option to verify if the
407 system can provide data at a rate good enough for CD writing.
409 CD-R, CD-RW (not MRW formatted), DVD-R, and DVD-RW media support simulation
410 mode (\fB-S\fR). DVD-RAM, DVD+R, DVD+RW, any MRW-formatted media, and some
411 others do not support simulation mode (\fB-S\fR).
420 Audio format to use for extracting audio files or for reading audio files for
421 audio CD creation. The \fIaudio-type\fR can be \fBsun\fR, \fBwav\fR, \fBcda\fR,
440 Extracts audio data from an audio track.
445 \fBExample 1 \fRCreating a Data CD or DVD
449 example% \fBcdrw -i /local/iso_image\fR
455 \fBExample 2 \fRCreating a CD or DVD from a Directory
458 This example shows how to create a CD or DVD from the directory tree
464 example% \fBmkisofs -r /home/foo 2>/dev/null | cdrw -i -p 1\fR
470 \fBExample 3 \fRExtracting an Audio Track Number
473 This example shows how to extract audio track number \fB1\fR to
474 \fB/home/foo/song1.wav\fR.
479 example% \fBcdrw -x -T wav 1 /home/foo/song1.wav\fR
485 \fBExample 4 \fRUsing \fBwav\fR Files
488 This example shows how to create an audio CD from \fBwav\fR files on disk.
493 example% \fBcdrw -a song1.wav song2.wav song3.wav song4.wav\fR
499 \fBExample 5 \fRErasing CD-RW or DVD-RW Media
502 This example shows how to erase rewritable media.
507 example% \fBcdrw -b all\fR
513 \fBExample 6 \fRCreating a Data CD or DVD with Multiple Drives
516 This example shows how to create a data CD or DVD on a system with multiple CD,
517 DVD-R, or DVD-RW drives.
522 example% \fBcdrw -d c1t6d0s2 -i /home/foo/iso-image\fR
528 \fBExample 7 \fRChecking Data Delivery Rate
531 This example shows how to verify that the system can provide data to a CD-RW or
532 a DVD drive at a rate sufficient for the write operation.
537 example% \fBcdrw -S -i /home/foo/iso-image\fR
543 \fBExample 8 \fRRunning at a Higher Priority
546 This example shows how to run \fBcdrw\fR at a higher priority (for root user
552 example# \fBpriocntl -e -p 60 cdrw -i /home/foo/iso-image\fR
558 \fBExample 9 \fRCreating a Multi-session Disk
561 This examples shows how to create the first session image by using
562 \fBmkisofs\fR and recording it onto the disk without closing the disk.
567 example% \fBcdrw -O -i /home/foo/iso-image\fR
574 Additional sessions can be added to an open disk by creating an image with
575 \fBmkisofs\fR using the session start and next writable address reported by
581 example% \fBcdrw -M\fR
583 Track No. |Type |Start address
584 ----------+--------+-------------
586 Leadout |Data | 166564
588 Last session start address: 162140
589 Next writable address: 173464
597 example% \fBmkisofs -o /tmp/image2 -r -C 0,173464 -M \e
598 /dev/rdsk/c0t2d0s2 /home/foo\fR
606 \fBaudioconvert\fR(1), \fBpriocntl\fR(1), \fBpolicy.conf\fR(4),
607 \fBattributes\fR(5), \fBrbac\fR(5), \fBscsa2usb\fR(7D), \fBsd\fR(7D)
610 \fBmkisofs\fR(8), (\fB/usr/share/man/man8/mkisofs.8\fR), in the SUNWfsman
614 \fISystem Administration Guide: Devices and File Systems\fR
618 The CD writing process requires data to be supplied at a constant rate to the
619 drive. Keep I/O activity to a minimum and shut down any related I/O
620 applications while writing CDs.
623 When making copies or extracting audio tracks, use an MMC compliant source
624 CD-ROM drive. The CD writer can be used for this purpose.
627 Before writing a CD, ensure that the media is blank by using the \fB-M\fR
628 option. You can use the \fB-S\fR simulation mode to test the system to make
629 sure it can provide data at the required rate. \fBcdrw\fR turns on buffer
630 underrun protection for drives that support it and recovers from most stalls.
631 If the system is not able to provide data at a constant rate or frequent
632 stalling occurs, you can lower the speed by using the \fB-p\fR option. You can
633 also try to run \fBcdrw\fR at a higher priority by using the \fBpriocntl\fR(1)
637 If you know that the CD-R/RW drive can operate at different write speeds, use
638 the \fB-p\fR option. Some commercially available drives handle the drive speed
639 setting command differently, so use this option judiciously.
642 The \fBcdrw\fR command uses \fBrbac\fR(5) to control user access to the
643 devices. By default, \fBcdrw\fR is accessible to all users but can be
644 restricted to individual users. Refer to the \fISystem Administration Guide:
645 Devices and File Systems\fR for more information.
648 To burn CDs as a non-root user \fBhal\fR must be enabled and the user must be
649 on the console. \fBhal\fR, that is the \fBsvc:/system/hal\fR SMF service, is
650 enabled by default, therefore, typically this requires no special action.
653 The user must be logged onto the console. \fB/dev/console\fR is also correct.
654 Previously, users could log in remotely, for example, by using \fBtelnet\fR or
655 \fBssh\fR, and be able to burn CDs. This would work unless the administrator
656 had changed the default configuration to deny \fBsolaris.device.cdrw\fR
657 authorization. See \fBpolicy.conf\fR(4).