Aha, you say, now you mention CD-RWs! There must be some type of trick, some strange and arcane incantations to be performed for us to access the holy grail of CD media rewritable media ! Well, sorry to disappoint you, but there's no real trick at all. Since CD-RWs come preformatted with the Universal Disk Format (UDF) file system (the same as used on DVDs), the average Linux box can't read it. UDF file systems aren't automatically supported under pre-2.4 kernels (see http://linux-udf. sourceforge .net/ if you'd like to add this support into your kernel, but be warned ”it's not a trivial task), so we'll have to figure out how to clean that nasty old UDF file system off of the CD-RW. (Even if you have kernel 2.4 up and running, read/write UDF access is still marked as experimental, so you may not want to fool around with it.) Thankfully, purging the UDF file system off a CD-RW is pretty easy to do ”it just takes one little command you need to run on it before you start burning:
cdrecord -v -speed=2 blank=fast dev=0,0,0
Be sure to replace the "2" after speed with the actual maximum RW speed of your CD-RW drive (it'll almost certainly be the slowest number in the AxBxC speed specification of the drive). And even if it gives you an error message, it probably succeeded. When I blank my CDs, I get this sequence of messages:
jeremy@surt:/data > cdrecord -v -speed=2 blank=fast dev=0,0,0
Cdrecord 1.10a04 (i586-pc-linux-gnu) Copyright (C) 1995-2000 Jrg Schilling
TOC Type: 1 = CD-ROM
scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
Linux sg driver version: 2.1.38
Using libscg version 'schily-0.4'
atapi: 1
Device type : Removable CD-ROM
Version : 0
Response Format: 1
Vendor_info : 'MITSUMI '
Identifikation : 'CR-4802TE '
Revision : '1.3C'
Device seems to be: Philips CDD-522.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags : SWABAUDIO
Drive buf size : 1638400 = 1600 KB
Current Secsize: 2048
ATIP info from disk:
Indicated writing power: 5
Reference speed: 2
Is not unrestricted
Is erasable
ATIP start of lead in: -11080 (97:34/20)
ATIP start of lead out: 335100 (74:30/00)
speed low: 2 speed high: 2
power mult factor: 3 5
recommended erase/write power: 3
Disk type: Phase change
Manuf. index: 11
Manufacturer: Mitsubishi Chemical Corporation
Trying to clear drive status.
cdrecord: Drive needs to reload the media to return to proper status.
Blocks total: 1166730 Blocks current: 1166730 Blocks remaining: 1166880
Starting to write CD/DVD at speed 2 in write mode for single session.
Last chance to quit, starting real write in 1 seconds.
Blanking PMA, TOC, pregap
Blanking time: 1.713s
cdrecord: Input/output error. prevent/allow medium removal: scsi
sendcmd: retryable error
CDB: 1E 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 06 00 00 00 00 2C 00 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x2C Qual 0x00 (command sequence error) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.000s timeout 40s
Lots of stuff, no? Like the error message at the end, which tells me that a track that was smaller than the minimum size was expanded to the minimum size. In other words, it succeeded. I suspect that this is because I have an early CD-RW drive, but it may be entirely normal. I also specified the verbose flag, which may be part of the problem, but even with the -v not specified, I get this string of output:
jeremy@surt:/data > cdrecord -speed=2 blank=fast dev=0,0,0
Cdrecord 1.10a04 (i586-pc-linux-gnu) Copyright (C) 1995-2000 Jrg Schilling
scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
Linux sg driver version: 2.1.38
Using libscg version 'schily-0.4'
Device type : Removable CD-ROM
Version : 0
Response Format: 1
Vendor_info : 'MITSUMI '
Identifikation : 'CR-4802TE '
Revision : '1.3C'
Device seems to be: Philips CDD-522.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags : SWABAUDIO
cdrecord: Drive needs to reload the media to return to proper status.
Starting to write CD/DVD at speed 2 in write mode for single session.
Last chance to quit, starting real write in 1 seconds.
cdrecord: Input/output error. prevent/allow medium removal: scsi sendcmd:
retryable error
CDB: 1E 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 06 00 00 00 00 2C 00 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x2C Qual 0x00 (command sequence error) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.000s timeout 40s
See how similar the output is? The only difference is that I didn't get a "blanking time" piece of information. Heck, that's why I usually run things verbose ”might as well see what's going on, eh?
Danger Will Robinson! Do not attempt to blank a CD-RW twice in a row! When I did this inadvertently, it knocked my CD-RW drive offline ”I couldn't access it from the operating system until I rebooted. This may be a peculiarity of the Mitsumi CR-4802TE, but why take the chance?