LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't write a second time to a CD-RW (https://www.linuxquestions.org/questions/linux-newbie-8/cant-write-a-second-time-to-a-cd-rw-85607/)

OldAIXer 08-25-2003 03:39 PM

Can't write a second time to a CD-RW
 
I tried to do my first backup of critical data to a CD-RW. The good news is that using K3B, I was able to do the backup. The bad news is that when I try to reuse, edit, delete (in other words any kind of subsequent write process) to the CD-RW, I get told the CD is write protected. Maybe the fact that the CD-RW was originally formatted on a M$ box is a problem?

The man pages on mount led me to try
mount -o remount -o rw /dev/sr0 /media/cdrecorder
and it looked like it was going to work. Using the mount command with no options to check the mounts showed the CD-RW as now "rw" versus "ro". But any attempt to actually write to the disk a second time gets the same denial, that it is write protected.

I'm an old korn shell guy, so setting up a script and letting cron do my backups for me would be fine. I just don't have any idea how to get the CD-RW to truly act like an editable disk drive.

Thanks in advance!

RolledOat 08-25-2003 03:45 PM

Don't you have to 'blank' the CD before you re-use it, unless you specified mulit-session at first create time. Once it is 'fixated' it is write protected. It is the 3rd option from the left. It goes Burn:Copy:Blank

RO

MasterC 08-25-2003 03:48 PM

In short, you can't. What it sounds like you want to do is called Packet Writing. Where you mount the disc as if it were another HD, and then write to it as such. There are actually projects going on to do this, but it takes a bit of work to get them going...

You can erase and write to CDRW's though, using the iso9660 filesystem (ro). Here's how to erase/format the disc:
cdrecord dev=x,x,x speed=x -v -eject blank=all

where dev=x,x,x is what you see when you type:
cdrecord -scanbus

Cool

MasterC 08-25-2003 03:50 PM

Here's the link to what I was referring to, if I'm misled on your intentions, feel free to disregard ;)

http://packet-cd.sourceforge.net/

Cool

OldAIXer 08-25-2003 04:13 PM

I tried the cdrecord command. I got all excited and thought it was working. Unfortunately, I got the folllowing output:

# cdrecord dev=0,0,0 speed=4 -v -eject blank=all
Cdrecord 2.0 (i686-suse-linux) Copyright (C) 1995-2002 Jörg Schilling
TOC Type: 1 = CD-ROM
scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
cdrecord: Warning: using inofficial libscg transport code version (okir@suse.de-scsi-linux-sg.c-1.75-resmgr-patch '@(#)scsi-linux-sg.c 1.75 02/10/21 Copyright 1997 J. Schilling').
atapi: 1
Device type : Removable CD-ROM
Version : 0
Response Format: 1
Vendor_info : 'LITE-ON '
Identifikation : 'LTR-16102B '
Revision : 'OQSB'
Device seems to be: Generic mmc CD-RW.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Drive buf size : 1966272 = 1920 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: -11635 (97:26/65)
ATIP start of lead out: 337350 (75:00/00)
1T speed low: 0 (reserved val 0) 1T speed high: 4
2T speed low: 8 2T speed high: 0 (reserved val 10)
power mult factor: 4 6
recommended erase/write power: 3
A1 values: 02 4C B0
A2 values: 4A C8 06
Disk type: Phase change
Manuf. index: 3
Manufacturer: CMC Magnetics Corporation
Starting to write CD/DVD at speed 4 in real BLANK mode for single session.
Last chance to quit, starting real write 0 seconds. Operation starts.
Performing OPC...
Blanking entire disk
cdrecord: Input/output error. blank unit: scsi sendcmd: no error
CDB: A1 00 00 00 00 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 02 00 00 00 00 0A 00 00 00 00 3A 00 00 00
Sense Key: 0x2 Not Ready, Segment 0
Sense Code: 0x3A Qual 0x00 (medium not present) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 65.487s timeout 9600s
cdrecord: Cannot blank disk, aborting.

When I cd to the mount point and do an ls, I get the classic, "total 0" that looks like an empty directory. But if I umount, then try to mount again, it won't let me, giving me the following:

# mount -t iso9660 -o rw /dev/sr0 /media/cdrecorder
mount: block device /dev/sr0 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sr0,
or too many mounted file systems

Sorry to be such a pest! While you're looking at this, I may try a CD-RW that hasn't been formatted under windows?

Thanks again.

MasterC 08-25-2003 04:22 PM

I'd remove the 'rw' option, just mount it read only. You likely cannot mount an iso9660 CD with an option of rw ;)

You can however do a multi-session CD if that's what you are after, check out:
man cdrecord
For info on that. The blank, use a slower speed, it might just not be able to handle the speed you fed it...

Make sure you have the correct device selected as well, and that the CD is in the device.

Cool

RolledOat 08-25-2003 05:12 PM

If K3B created it, try the blank option from the GUI. There is a force option if it fails the first time.

RO


All times are GMT -5. The time now is 10:21 PM.