LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-04-2017, 01:02 PM   #1
dydrum
LQ Newbie
 
Registered: Apr 2006
Location: Greater Salt Lake Area, Utah, USA
Posts: 28

Rep: Reputation: 0
Writing to USB cd rw removable media


I have a requirement to write test data (text file) to cd. The system is centos 6.7 and is bare bones command line. Im able to mount the cd and read but it's rough. Everything is from the root. Im using

$ mount -wt udf /dev/cdrw /media/

It gives me write protection warnings and I suspect there is a file type other than
iso9660 or udf that will work better. So my question is, can I mount and write to a USB cd rw? Or do I need cdrecord and rethink this?
 
Old 04-04-2017, 01:12 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
https://duckduckgo.com/?q=linux+writ...m+command+line

i could think of a few more search terms; in any case it will require some digging.

i'm a little unclear on what you mean by
- it's rough
- everything is from the root
- it gives me... etc. (command issued & their output please)
- filetype other than...: what is this cd exactly?
- rethink what?

you do understand that you cannot read/write to a cd-rw like to a hard drive?
it's more like burning, erasing, burning, erasing...
 
Old 04-04-2017, 01:19 PM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,292
Blog Entries: 3

Rep: Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718
Quote:
Originally Posted by dydrum View Post
I have a requirement to write test data (text file) to cd.
ISO-9660 is read-only. You have to assemble the files you want into some directories and then build them in to an ISO-9960 image which you can then burn. There is also a choice between disc-at-once and multi-track.
 
Old 04-04-2017, 01:26 PM   #4
dydrum
LQ Newbie
 
Registered: Apr 2006
Location: Greater Salt Lake Area, Utah, USA
Posts: 28

Original Poster
Rep: Reputation: 0
So sorry for the vagueness. I mean rough because I'm doing the mount in an odd manner and I'm sure there is a better way. I mean everything is root in that the command line doesn't have a normal user mode, everything is root or that is superuser. And what I don't understand is that I cannot write to the cd. So what I have is a requirement to read data from a cdrw and write back test data results to the cdrw. I take it I can't do that like a thumb drive or regular file system. So how can I do that? Also I'm on a phone flying this plus I'm new to forum so I don't know how to properly post, reply, add code etc, so sorry
 
Old 04-04-2017, 01:29 PM   #5
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,292
Blog Entries: 3

Rep: Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718
When you get back, look up how to use genisoimage that's what you need to build a disc image. You cannot write to a CD RW or DVD RW a la carte as it were. You put everything into one place, create a disc image from that place, then burn the image to the disc.
 
Old 04-04-2017, 01:35 PM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
CDRW is not like a usb stick. You can write to it a couple times, maybe. Although writing a second time involves blanking the disk first, which for the few times that I've tried it, it failed > 50% of the time. But mostly it's an unreliable write once read many media type.

iso9660 has limits (and some extensions to overcome some of those limits). No single file can be > 4.3G's. 8.3 filenames aka ancient dos style, but window's-esque translation abilities, but it depends on how you mount the media. And the options you use when you create the media.

Burning has two modes DAO, disk at once. And SAO, session at once. The two main tools for burning that I've used are cdrdao, and cdparanoia. Although growisofs has it's uses too. Session at once is for writing part of the disc now, then coming back later and writing some more to the disc. But I'm not to up on my optical media of late. In a different life I made some dvdauthor style unecrypted dvds and burnt multiple copies for non-profit performance ensembles. Back when programs like ogle roamed the ancestral lands.
 
Old 04-04-2017, 03:31 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,675

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
Although the printed rewrite cycles for CDRWs at 1000 maybe optimistic it is more the two. As stated ISO9660 filesystems are read only but it is possible to append new data if initially created as multi-session. This does mean that you create an image from the data files then burn to disk.

UDF or sometimes known as Packet Writing is a way to write to a CDRW like a floppy disk. The disc needs special formatting and the UDF tools drivers installed. If created on a windows PC you need to select a lower version i.e 2.5 to be fully compatible (I think this is still true). Windows used to default to UDF if creating a data disc. All I ever burn is an image from an ISO file with windows so this might be old information.
 
Old 04-04-2017, 11:50 PM   #8
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,292
Blog Entries: 3

Rep: Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718
Quote:
Originally Posted by michaelk View Post
Although the printed rewrite cycles for CDRWs at 1000 maybe optimistic
I've used CD RW and DVD RW extensively in the past. According to the spec the chemicals should handle 1000's of rewrites. The reality is that the bottom usually get scratched or scuffed to death despite careful handling. If they are lent out other people, then I think the median for me was about 6 rewrites before they munged or stolen or lost.
 
Old 04-05-2017, 01:42 AM   #9
scdbackup
Member
 
Registered: Oct 2013
Posts: 158

Rep: Reputation: Disabled
Hi,

it is possible to put a read-write filesystem onto CD-RW.
I would not do it because of poor performance and ugly noises.
My way is ISO 9660 multi-session.

So the following is theory, not tested by daily usage.
See also
http://www.linuxfromscratch.org/blfs.../udftools.html

CAUTION: The following reases any payload data on the CD-RW.
You will get an empty filesystem which you can fill.

Package udftools has a program cdrwtool which should do the
trick of formatting and filesystem creation by:
Code:
cdrwtool -d /dev/sr0 -q
You will probably have to operate the formatted CD-RW through the
packet driver:
Code:
pktsetup /dev/pktcdvd0 /dev/sr0
Then you can mount the filesystem read-write:
Code:
mount /dev/pktcdvd0 /mnt/cdrom -t udf -o rw,noatime
Have a nice day

Thomas

Last edited by scdbackup; 04-05-2017 at 06:25 AM. Reason: Warning that the resulting CD-RW filesystem will be empty
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
San disk 16g usb being detected as Local disk and not as removable media Rohit_4739 General 1 07-31-2013 03:16 AM
*solved* Lenny automount NTFS partition, and USB and other removable media bezdomny LinuxQuestions.org Member Success Stories 4 05-16-2009 08:08 AM
writing driver for USB storage media linuxdeveloper29 Linux - Software 4 10-24-2008 12:48 PM
USB Removable Media copying VERY SLOW stardotstar Linux - Hardware 4 03-02-2005 11:50 AM
Installing On Removable Media Or Usb-key ihsanart Linux - Newbie 0 09-13-2004 03:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:51 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