# Reading Cd-Rw as CD-Rom

## neo529

Well.... Heres the problem. This is the output of cdrecord -scanbus:

```

bash-2.05a# cdrecord -scanbus

Cdrecord 1.11a39 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling

Linux sg driver version: 3.1.24

Using libscg version 'schily-0.7'

scsibus0:

        0,0,0     0) 'TEAC    ' 'CD-W58E         ' '1.0A' Removable CD-ROM

cdrecord: Warning: controller returns wrong size for CD capabilities page.

        0,1,0     1) 'CD-ROM  ' 'Drive/F5A       ' 'B1.5' Removable CD-ROM

        0,2,0     2) *

        0,3,0     3) *

        0,4,0     4) *

        0,5,0     5) *

        0,6,0     6) *

        0,7,0     7) *

```

When I run k3b setup it reads everything fine and puts my writer in the correct category but when I run k3b it doesnt detect either of my cdroms and (this only works at all sometimes) when I add device I use the full path "/dev/scsi/host0/bus0/target0/lun0/cd" It puts it in the reader category (like I said that even only works sometimes). So I don't know what I did wrong. I didn't add a line to my boot loader (ie: hdc=ide-scs) because I don't have an hdc in /dev.... I do have an sr0 which links to /dev/scsi/host0/bus0/target0/lun0/cd so I dunno if maybe I should put sr0=ide-scsi in my boot loader. I dont even know if thats the problem. All I know is that it's not reading it as a burner. Any help would be greatly appreciated!

----------

## oniq

Are you sure you are looking at the right device, check your dmesg | grep hd .. you should have an hd device for your cdrw.

Running 'dmesg | grep hd', I get:

```

hda: IC25N020ATCS04-0, ATA DISK drive

hdc: SD-R2102, ATAPI CD/DVD-ROM drive

hda: 39070080 sectors (20004 MB) w/1768KiB Cache, CHS=2432/255/63

hdc: ATAPI 24X DVD-ROM CD-R/RW drive, 2048kB Cache

```

Yours should look similar, not necesserily hdc, but where ever your CDRW drive falls on your IDE chain.

----------

## neo529

Well... Ok yah it is on hdc but it still doesnt call it a cdrw. This is the output of dmesg | grep hd:

```

bash-2.05a# dmesg | grep hd

Kernel command line: root=/dev/hda4

    ide0: BM-DMA at 0xcb00-0xcb07, BIOS settings: hda:DMA, hdb:pio

    ide1: BM-DMA at 0xcb08-0xcb0f, BIOS settings: hdc:DMA, hdd:DMA

hda: QUANTUM Bigfoot TX8.0AT, ATA DISK drive

hdc: CD-W58E, ATAPI CD/DVD-ROM drive

hdd: CD-ROM Drive/F5A, ATAPI CD/DVD-ROM drive

hda: 15698592 sectors (8038 MB) w/69KiB Cache, CHS=977/255/63, UDMA(33)

```

The writer is CD-W58E and it is not showing it as a writer.

----------

## oniq

I'm compiling k3b now, never used it before, so I'll see if I can help you out.

----------

## neo529

 *neo529 wrote:*   

> Well... Ok yah it is on hdc but it still doesnt call it a cdrw. This is the output of dmesg | grep hd:
> 
> ```
> 
> bash-2.05a# dmesg | grep hd
> ...

 

NOTICE that it doesn't show it as a writer there either. Maybe it isn't k3b?

----------

## oniq

I'm just learning as well, so I reread your post and noticed you didn't put hdc=ide-scsi, I didn't have this either and in my dmesg it does should CD/RW without it, but with it it won't show.  Look for sr1, sr2, sr3, in your dmesg; it should point to your burner when you add hdc=ide-scsi to your kernel line in grub.

Sorry it took so long to respond, k3b takes a LONG time to compile  :Wink: , and then kdebase crapped out on me so I was one away from getting k3b -- well, at least I have cdrecord now.

----------

## neo529

Ok I added the line and now this is my dmesg | grep hd output: 

```

Kernel command line: root=/dev/hda4 hdc=ide-scsi

ide_setup: hdc=ide-scsi

    ide0: BM-DMA at 0xcb00-0xcb07, BIOS settings: hda:DMA, hdb:pio

    ide1: BM-DMA at 0xcb08-0xcb0f, BIOS settings: hdc:DMA, hdd:DMA

hda: QUANTUM Bigfoot TX8.0AT, ATA DISK drive

hdc: CD-W58E, ATAPI CD/DVD-ROM drive

hdd: CD-ROM Drive/F5A, ATAPI CD/DVD-ROM drive

hda: 15698592 sectors (8038 MB) w/69KiB Cache, CHS=977/255/63, UDMA(33)

```

So nothing has changed except what the Kernel command line says and the "ide_setup" line was added.

What now?

----------

## oniq

You should be able to use /dev/hdc as your device in k3b.  If that doesn't work try /dev/sr1

----------

## neo529

wow, after I added that line, k3b reads them fine now.... thanks bro! Now lets hope it burns...

----------

## oniq

Great, you learned something and I did too  :Wink: .  Let me know how it goes.

----------

## neo529

Well, Im having problems getting it to burn. When I try to erase a cd it says it is erased but then I try to burn and it says it isn't erased. So I tried a regular cd and it said burn process completed after like 3 minutes (I only can burn at 8x so i know thats not right) and It didn't burn any information except a 1/4 inch (when lookin at the bottom of cd) and shows nothing when I mount the drive and look in the dir. When I burn audio (which is what I am doing right now) it has been "preparing for burn process" for about 5 min now... and still going. I don't know what to do now   :Twisted Evil: 

-------

12 minutes now   :Laughing: 

--------

41 minutes....

----------

## grj

I am not familiar with k3b but with other software, when you do an erase, you must tell it to do a complete erase or it will just remove the TOC and the disk will be unwritable. I believe it shows as full.

Good luck.

----------

## neo529

I still don't believe it is writing correctly.... I tested it on a regular cd and it burned probably 40 mb's of information and said completed and when I look at the contents of the cd it had nothing on it.

----------

## Mnemia

Have you tried any CD-burning applications other than k3b? Your setup seems to be working somewhat if it's burning something, so I'd check if it's the program. I'd recommend your try it with Gtoaster if you have GNOME libs on your machine because its configuration is really simple and difficult to mess up and it's very reliable in my experience. (The UI lacks something to be desired and it's not very flexible, but it's reliable...)

----------

## neo529

OK.. I tried burning using CDRecord and I think it worked but I can't check it because when I try to mount it, it asks for filesystem (which I don't know what fs it is using) and on windows it says it can't read it because it isn't a windows fs.

----------

## Mnemia

That's strange...it should've worked in Windows.

The filesystem type is usually iso9660 when you mount the CD in Linux. The type is the same in both Windows and Linux though so something still seems to be amiss. What did you try to burn? An ISO like the Gentoo ones?

----------

## grj

What did you burn? Audio or data? If data did you create an iso first using mkisofs?

----------

## neo529

Well I tried burning 2 avi files (data) and it took the right amount of time to burn but wont show up on Windows and wont mount on Linux

----------

## Mnemia

What is the exact command you are using with cdrecord? Did you make an ISO filesystem out of the avi files before you burned them onto the CD?

----------

## neo529

Well when I tried burning from command line I did 

```
 cdrecord (0,0,0) filename.avi  
```

So I didn't make it an iso but then again if that  was  the problem, It sucks that you have to make it an iso and can't just burn it straight

----------

## Mnemia

You have to use mkisofs first to make a filesystem out of the files to burn on the CD. cdrecord simply puts the contents of the file directly on the CD. You can find lots of tutorials about how to do this if you search Google, and probably in these forums as well. Most people use the GUI CD burning utilities because they do both steps automatically (this is required for Windows as well but the programs do it transparently). If you have a program like k3b or gtoaster you can construct the ISO using a GUI and burn it automatically.

Using cdrecord directly is usually only something you'd want to do if you need to determine if your CD-RW drive is correctly set up or if you want to burn CDs from a script. It sounds to me like your drive is working correctly. One thing you could try to make sure is to download a premade ISO from the Gentoo web site and burn that using cdrecord in the way you were. I imagine it will be mountable after you do that.

----------

## neo529

yeaaaaaaa.... I finally got it working. I guess after I got it reading it as a CD-RW it just needed to be an iso. Thanks everyone for all your help!

----------

