11.04, format erase a cd rw content

Asked by peter

Hello

How can I format a CD in 11.04? Thanks in advance.
Peter

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu cdrtools Edit question
Assignee:
No assignee Edit question
Solved by:
peter
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

sudo cdrecord dev=/dev/cdrw0 blank=all

If your CD device isnot /dev/sr0 then change it. You can check with:

sudo lshw -C disk; sudo lshw -C drive

This will format the CD for you.

Revision history for this message
peter (peter-neuweiler) said :
#2

Hi actionparnsnip

Thanks for the answer. The output of sudo lshw -C disk; sudo lshw -C drive is the following:

peter@peter-linux:~$ sudo lshw -C disk; sudo lshw -C drive
[sudo] password for peter:
  *-disk
       description: ATA Disk
       product: SAMSUNG SP1613N
       physical id: 0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: VB10
       serial: S0CVJ1EP700002
       size: 149GiB (160GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=0003fa48
  *-cdrom
       description: DVD-RAM writer
       product: DVD RW DRU-190A
       vendor: SONY
       physical id: 1
       bus info: scsi@1:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/cdrw
       logical name: /dev/dvd
       logical name: /dev/dvdrw
       logical name: /dev/scd0
       logical name: /dev/sr0
       logical name: /media/Ubuntu 10.10 i386
       version: 1.62
       capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
       configuration: ansiversion=5 mount.fstype=iso9660 mount.options=ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500 state=mounted status=ready
     *-medium
          physical id: 0
          logical name: /dev/cdrom
          logical name: /media/Ubuntu 10.10 i386
          configuration: mount.fstype=iso9660 mount.options=ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500 state=mounted

I used /dev/sda for sudo cdrecord dev=/dev/cdrw0 blank=all, and I got the following messages:

peter@peter-linux:~$ sudo cdrecord dev=/dev/sda blank=all
Error trying to open /dev/sda exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/sda exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/sda exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/sda exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/sda exclusively (Device or resource busy)... giving up.
wodim: Device or resource busy.
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.

Where is the problem? Is /dev/sda the wrong device? Thanks a lot.
Peter

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

sda is your hard drive. /dev/cdrw0 is the optical drive.

Did you read the output?

Revision history for this message
peter (peter-neuweiler) said :
#4

Thanks man. I'm quite stupid, sorry.

But /dev/cdrw0 does not work:

peter@peter-linux:~$ sudo cdrecord dev=/dev/cdrw0 blank=all
[sudo] password for peter:
wodim: No such file or directory.
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.

/dev/cdrw0 is also not mentioned when I made sudo lshw -C disk; sudo lshw -C drive.

Thanks.

Revision history for this message
peter (peter-neuweiler) said :
#5

solved and not solved

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

As seen in the output of lshw there are several logical names for your cd:

       logical name: /dev/cdrom
       logical name: /dev/cdrw
       logical name: /dev/dvd
       logical name: /dev/dvdrw
       logical name: /dev/scd0
       logical name: /dev/sr0

any of these should work, but not cdrw0 because this one is not in that list!

From the lshw output I see "mount.options=ro...", so maybe you have to remount your device read-write first?

Revision history for this message
peter (peter-neuweiler) said :
#7

Thanks Manfred Hampi.

I tried all these locical devices but it didn't work. So I will read the mount entry and then I'm going to essay one's more,

Maybe you can give me an example of a remount-statement, Thanks a lot.

It's nice to get support. Thanks!
Peter

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

The syntax for remounting should be something like

sudo mount -o remount,rw /dev/cdrom

By the way: can you please in future be more elaborate in your statements?
You just wrote "I tried all these locical devices but it didn't work."
What was the effect of issuing such a command?
Was there a message about a syntax error? Then please provide the exact text of the command and the response!
Was there a message about missing access rights? Then please provide the exact text of the command and the response!
Was there a message about 'no such device/file/...'? Then please provide the exact text of the command and the response!
Was there any other error message? Then please provide the exact text of the command and the response!

Revision history for this message
peter (peter-neuweiler) said :
#9

Hi Manfred

The CD is shown in Nautilus, so I think the CD is mounted.

I tried the format once again. The output of the first five devices is the following:

sudo cdrecord dev=/dev/cdrom blank=all
sudo cdrecord dev=/dev/cdrw blank=all
sudo cdrecord dev=/dev/cdrw blank=all
sudo cdrecord dev=/dev/dvdrw blank=all
sudo cdrecord dev=/dev/scd0 blank=all

Error trying to open /dev/cdrom exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/cdrom exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/cdrom exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/cdrom exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/cdrom exclusively (Device or resource busy)... giving up.
wodim: Device or resource busy.
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.

The output of the device /dev/sr0 is the following:

peter@peter-linux:~$ sudo cdrecord dev=/dev/sr0 blank=all
[sudo] password for peter:
Error trying to open /dev/sr0 exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/sr0 exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/sr0 exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/sr0 exclusively (Device or resource busy)... retrying in 1 second.
Error trying to open /dev/sr0 exclusively (Device or resource busy)... giving up.
WARNING: /dev/sr0 seems to be mounted!
wodim: Device or resource busy.
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.

Interesting: WARNING: /dev/sr0 seems to be mounted!

The output of the last device is the following:

peter@peter-linux:~$ sudo cdrecord dev=/media/Ubuntu 10.10 i386 blank=all
[sudo] password for peter:
wodim: No write mode specified.
wodim: Assuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
wodim: No such file or directory.
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.

Thanks for your help.
Peter

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

You just identified the crucial point: the device must not be mounted.

Try

sudo umount /dev/sr0
sudo cdrecord dev=/dev/sr0 blank=all

Revision history for this message
peter (peter-neuweiler) said :
#11

It doesn't work. I got the following:

peter@peter-linux:~$ sudo cdrecord dev=/dev/sr0 blank=all
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'SONY '
Identification : 'DVD RW DRU-190A '
Revision : '1.62'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE FORCESPEED
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Speed set to 8468 KB/s
Starting to write CD/DVD at speed 48.0 in real BLANK mode for single session.
Last chance to quit, starting real write in 0 seconds. Operation starts.
Errno: 5 (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 05 00 00 00 00 0A 00 00 00 00 30 06 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x30 Qual 0x06 (cannot format medium - incompatible medium) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.003s timeout 9600s
wodim: Cannot blank disk, aborting.

Thank you.
Peter

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

"...cannot format medium - incompatible medium..."

Are you sure the medium is a CD-RW disk?
Have you tried with other media?

Revision history for this message
peter (peter-neuweiler) said :
#13

I don't know if the disk is an RW-disk. And I don't have other disks.

But I thought it should be possible to format the disk. I didn't think that a format affects the RW-logic. I thought format is always possible.

I'll get an RW-disk and then I'll try again. And I guess it will work.

So I think the problem has solved. If not, I'll come back once again.

Thanks for your help and have a great time.
Peter