LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-07-2004, 12:15 PM   #1
SheldonPlankton
Member
 
Registered: Jun 2004
Posts: 129

Rep: Reputation: 15
Write many CD?


I am a bit behind the power curve when comes to all the various types of media. So please excuse my ignornace. Aren't CD's (even CD/RW CD's) only write once? I mean even if I could figure out how to write to a CD a second time or delete data from a CD wouldn't the capacity of the CD be diminished.

How can I write to this CD ...

Here's a df -H. It shows that I have a cd mounted. I previously wrote the 2nd volumn of a mkCDrec full backup to it.

bash-2.05b$ df -H
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 39GB 3.7GB 34GB 11% /
/dev/hda1 104MB 9.6MB 89MB 10% /boot
none 127MB 0 127MB 0% /dev/shm
/dev/cdrom 111MB 111MB 0 100% /mnt/cdrom

bash-2.05b$ ls -l /mnt/cdrom
total 108202
-r--r--r-- 1 root root 0 Jun 29 12:41 CDrec-29.06.2004_2
-r--r--r-- 1 root root 199 Jun 29 12:41 Checksums.md5
-r--r--r-- 1 root root 639265 Jun 29 12:41 hda2._.log.gz
-r--r--r-- 1 root root 110158740 Jun 29 12:41 hda2._.tar.gz
-r--r--r-- 1 root root 0 Jun 29 12:41 LAST_CD

I will attempt to write some more data to this CD. I'll create ISO 9660 filesystem file and
then attempt to write it to the CD with cdrecord.

[root@localhost dogfacemonkey]# mkisofs -o notes.iso -R -A -V NOTES
Using MKCDR000.HTM;1 for NOTES/MKCDREC/mkCDrec_RH9_restore_test.html (mkCDrec_RH9_install.html)
Using MKCDR001.HTM;1 for NOTES/MKCDREC/mkCDrec_RH9_install.html (mkCDrec_RH9_backup.html)
Using MKCDR000.XML;1 for NOTES/MKCDREC/mkCDrec_RH9_restore_test.xml (mkCDrec_RH9_install.xml)
Using MKCDR001.XML;1 for NOTES/MKCDREC/mkCDrec_RH9_install.xml (mkCDrec_RH9_backup.xml)
Total translation table size: 0
Total rockridge attributes bytes: 7860
Total directory bytes: 30720
Path table size(bytes): 214
Max brk space used e024
272 extents written (0 Mb)

[root@localhost dogfacemonkey]# ls -l notes.iso
-rw-r--r-- 1 root root 557056 Jul 7 09:46 notes.iso

[root@localhost dogfacemonkey]# cdrecord -v -eject dev=0,0,0 notes.iso
Cdrecord 2.0 (i686-pc-linux-gnu) 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
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
bailing out..

It doesn't work. Why?

Maybe I need to "blank" the CD ...

[root@localhost dogfacemonkey]# cdrecord blank=all
Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J?rg Schilling
scsidev: '1,5,0'
scsibus: 1 target: 5 lun: 0
Linux sg driver version: 3.1.24
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
bailing out..
[root@localhost dogfacemonkey]# cdrecord dev=0,0,0 blank=all
Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J?rg Schilling
scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
Linux sg driver version: 3.1.24
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
Error trying to open /dev/scd0 exclusively ... retrying in 1 second.
bailing out..

Well that didn't work either!

What the story with CD/RW. Is it still a write once world?
 
Old 07-07-2004, 02:19 PM   #2
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
A blank CD-R is "write once, read many times", while in contrast a blank CD-RW can be written to multiple times. And No, subsequent overwriting of a CD-RW will not diminish its storage capacity.

In short, if you are interested in being able to erase and rewrite data on a CD, you need to be using a CD-RW. Personally, when it comes to CD-RW's, I think you get what you pay for, and therefore I would advise going with a well known brand (such as TDK, Maxell, etc) rather than a no-name generic brand. -- J.W.
 
Old 07-07-2004, 02:35 PM   #3
SheldonPlankton
Member
 
Registered: Jun 2004
Posts: 129

Original Poster
Rep: Reputation: 15
Thanks for your reply J.W.!

Okay so I overwrite data on a CD-RW. How do I do it?

I think I have a CD-RW drive ....

bash-2.05b$ cdrecord dev=0,0,0 --scanbus
Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 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.7'
cdrecord: Warning: using inofficial libscg transport code version (schily - Red Hat-scsi-linux-sg.c-1.75-RH '@(#)scsi-linux-sg.c 1.75 02/10/21 Copyright 1997 J. Schilling').
scsibus0:
0,0,0 0) 'SONY ' 'CD-RW CRX216E ' 'PD01' 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) *

... and my media says "CD-ReWritable" on it. So I should be able to add files to the CD right? If so how do I do that? Can I use cdrecord? Can I add ISO 9660 filesystem files to the CD?

Thanks!
 
Old 07-07-2004, 02:53 PM   #4
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Just to clarify. With CD-RW media, you record it like you would a cd-r until it gets full. Then if in the future you don't need the data, you erase the _entire_ disk. Return it to the original blank state. I don't know how you do that on the command though I'm sure it's possible. Most gui cd burning software has an erase util.

With cd-r's dirt cheap in bulk, I don't see the point myself. But in theory you can save money.
 
Old 07-07-2004, 05:51 PM   #5
synapse
Member
 
Registered: Jan 2004
Location: On Planet Earth.
Distribution: Slackware 12
Posts: 244

Rep: Reputation: 30
Hi

use the following to erase entire cd

cdrecord -v -eject dev=/dev/sg0 speed=24 blank=all

also man cdrecord will give many more options
cheers
 
Old 07-07-2004, 06:16 PM   #6
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
According to your system listing, Yes, you've got a Sony CD-RW, so you should be able to do this pretty easily. And just to add one comment to what synapse posted: naturally the speed parameter and device name may need to be adjusted to fit your specific machine. -- J.W.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grip : no write access to write encoded file bidouilleur Linux - Software 5 10-09-2010 09:23 PM
Can't WRITE to USB stick, Mount OK NO WRITE! ClericPreston Linux - Newbie 4 12-04-2004 10:43 AM
Grip- "no write access to write encoded file" Alvis Linux - Software 4 01-06-2004 04:18 PM
Err if I tray Write Date To CD-Write Sn4s Linux - Newbie 2 07-23-2003 08:53 PM
Open office read only, K-write read/write mode lwtvh Linux - Newbie 1 07-19-2003 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration