skyBuilders HomePage    howTo CD-RW/DVD-RW Linux/RedHat
Jesse Burkhardt

* See Appendix for DVD-RW information.

Getting a CD-RW to work in the linux RedHat environment has only recently become a relatively easy task. There have been difficult issues in the past concerning kernel support and SCSI emulation for IDE/ATAPI based devices. The required kernel module for this device support, without the need for SCSI emulation, is ide-cd. You may check for its existance by using the following command and response:

[cdbackup]# modprobe -l | grep ide-cd
/lib/modules/2.4.18-14/kernel/drivers/ide/ide-cd.o
As you should notice linux kernel version 2.4.18-14, shipping with RedHat 8.0, supports ide-cd de facto.

  • An indispensible reference document on this subject is maintained at The Linux Documentation Project (http://www.tldp.org/) called, CD-Writing HOWTO by Winfried Trümper.


  • Two CD-RW tools needed, at least for command line CD burning, are cdrecord and mkisofs. The installation packages for these tools are part of the standard RedHat 8.0 distribution. (You will need to actually install the cdrecord and mkisofs rpms to use these tools.)

    [Optional:] It is necessary to use the mkisofs command before running cdrecord. The first thing to is to collect the metric for the cdrecord option 'tsize'. (I found that this is actually optional in my experimentation, but command documentation includes it.) Obtain the metric from the following command/response:

    [cdbackup]# mkisofs -q -print-size home/
    64
    
    Then the actual data to be written to a writable CD needs to be formatted for that particular medium's format. The following use of the mkisofs command will do this, creating the file 'cd_image_test', residing in /var/cdbackup/ and made from /var/cdbackup/home, in our example:

    [cdbackup]# mkisofs -r -o cd_image_test home/
    
    It is necessary to determine the 'dev' argument settings for the cdrecord command. In the example below they are set to 0,0,0. (Don't be put off by the SCSI references in the cdrecord -scanbus command output - they are a relic preceding IDE/ATAPI support.)

    [cdbackup]# cdrecord -scanbus
    Cdrecord 1.10 (i686-pc-linux-gnu) Copyright (C) 1995-2001 Jörg Schilling
    Linux sg driver version: 3.1.24
    Using libscg version 'schily-0.5'
    scsibus0:
            0,0,0    0) '        ' '52X24X52 CD-RW  ' '1.04' 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) *
    
    Finally we are now ready to run the cdrecord command for its ultimate purpose, to write the data to CD. This may be done simply with the following:

    [cdbackup]# cdrecord -v speed=2 dev=0,0,0 -data cd_image_test
    
    These commands can be run via the X-CD-Roast GUI interface. The RPM for the package requires the cdrdao and cdda2wav packages, which are both for audio CD recording.. (My initial attempts to run X-CD-Roast failed, but that was before I had successfully run the mkisofs and cdrecord commands

    This is an excerpt from the X-CD-Roast rpm info file:

    Description :
    X-CD-Roast provides a GUI interface for commands like cdrecord and
    mkisofs. X-CD-Roast includes a self-explanatory X11 user interface,
    automatic SCSI and IDE hardware setup, support for mastering of new
    ISO9660 data CDs, support for production of new audio CDs, fast
    copying of CDs without hard disk buffering, and a logfile option.
    
    I will add more on GUIs for use of the CD-RW as I learn about them.

    Appendix A: Using a DVD-RW

    Using a DVD-RW is much the same as a CD-RW. The use the common fstab entry and both mount as /mnt/cdrom. The use of the mkisofs tool is also the same. The DVD-RW device requires a tool different than cdrecord, namely, dvdrecord, an RPM for which ships with RedHad 8.0. Using the '-scanbus' option with the dvdrecord command will yield the following output:

    [cdbackup]# dvdrecord -scanbus
    dvdrtools v0.1.3
    Portions (c) 2002 Red Hat, Inc.
    Based on:
    Cdrecord 1.11a15 (i686-pc-linux-gnu) Copyright (C) 1995-2001 Jörg Schilling
    Linux sg driver version: 3.1.24
    Using libscg version 'schily-0.5'
    scsibus0:
            0,0,0     0) 'PIONEER ' 'DVD-RW  DVR-105 ' '1.30' 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) *
    
    After making the ISO file (mkisofs -r -o dvd_20030422.iso ../Friday) running the dvdrecord command will yield the following:

    [cdbackup]# dvdrecord -dao speed=2 dev=0,0,0 dvd_20030422
    dvdrtools v0.1.3
    Portions (c) 2002 Red Hat, Inc.
    Based on:
    Cdrecord 1.11a15 (i686-pc-linux-gnu) Copyright (C) 1995-2001 Jörg Schilling
    scsidev: '0,0,0'
    scsibus: 0 target: 0 lun: 0
    Linux sg driver version: 3.1.24
    Using libscg version 'schily-0.5'
    Device type    : Removable CD-ROM
    Version        : 0
    Response Format: 2
    Capabilities   :
    Vendor_info    : 'PIONEER '
    Identifikation : 'DVD-RW  DVR-105 '
    Revision       : '1.30'
    Device seems to be: Generic mmc2 DVD.
    Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
    Driver flags   : SWABAUDIO BURNFREE
    Supported modes: PACKET SAO
    Starting to write CD/DVD at speed 1 in write mode for single session.
    Last chance to quit, starting real write in 4 seconds.
    
    Edit 
    Language: fr  | it  | de  | es  | pt  | ar  | he  | da  | nl  | zh  | ja  | ko  | none 
    Author: jesse

    This Version:

    Requests
     Version: 14203 | Series: 17916