# Problems with CD-RW drive

## ypm

Hi everyone,

I installed Gentoo for the first time about a month or so again and everything is working pretty much properly except I cannot get my CD-ROM drive to work at all.  If I start gnome-cd it will recognize the audio cd that I have in the drive (i.e. tell me the name of the CD) but when I try to play the CD nothing happens.

I've read the forums and tried to fix the problem reading different posts and different articles however I just haven't been able to figure out the problem.

Whenever I run cdrecord -scanbus I get the following:

```
cdrecord: No such file or directory. Cannot open '/dev/pg*'. Cannot open SCSI driver.

```

But if I run cdrecord dev=ATAPI -scanbus I get:

```
scsidev: 'ATAPI'

devname: 'ATAPI'

scsibus: -2 target: -2 lun: -2

Warning: Using ATA Packet interface.

Warning: The related libscg interface code is in pre alpha.

Warning: There may be fatal problems.

Using libscg version 'schily-0.7'

scsibus0:

        0,0,0     0) 'LG      ' 'CD-RW CED-8080B ' '1.04' 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) *

```

Does anyone have any ideas?

----------

## meowsqueak

Sounds like you don't have the scsi-cdrom and scsi-generic drivers installed?

----------

## ypm

 *meowsqueak wrote:*   

> Sounds like you don't have the scsi-cdrom and scsi-generic drivers installed?

 

Hi,

Thanks for the response.

I believe that I compiled them into my kernel as modules?  I also think that I have them set to autoload.

When I run lsmod: sr_mod, cdrom, sg, ide-scsi, and ide-cd all show up.

I could be wrong but was that what you were suggesting?

----------

## Smoke2firE

you need to add 

append = "hdc=ide-scsi"

to grub or lilo configuration this will enable scsi-emulation for that drive then it will sho wup in normal scanbus  :Very Happy: 

where hdc is youre cdrom device file

----------

## ypm

Hi,

This is what I have in my lilo.conf file:

```
#

# Linux bootable partition config begins

#

image = /boot/kernel-2.4.20-gentoo-r8

        root = /dev/hda5

        #root = /devices/discs/disc0/part3

        label = Gentoo

        read-only # read-only for checking

        initrd=/boot/initrd-2.4.20-gentoo-r8

        append="root=/dev/hda5 init=/linuxrc"

        append="hdc=ide-scsi"

#

# Linux bootable partition config ends

#

```

Do I need the spaces after append?  I'm also pretty sure that hdc is my cd-rom device.

Thanks for the response.

ypm.

----------

## Smoke2firE

 *Quote:*   

> append="root=/dev/hda5 init=/linuxrc"
> 
>         append="hdc=ide-scsi" 

 

just include the hdc=ide-scsi to the first line

]append="root=/dev/hda5 init=/linuxrc hdc=ide-scsi"

----------

## ypm

Hi,

I tried making the change in my lilo.conf file but I still cannot access my CD-ROM drive, do you have any other tips?

ypm

----------

## Smoke2firE

cannot access the drive whats youre dmesg say now with that line paste it here

----------

## ypm

 *Smoke2firE wrote:*   

> cannot access the drive whats youre dmesg say now with that line paste it here

 

Hi Smoke2firE,

Here is the output from dmesg:

```
Linux version 2.4.20-gentoo-r8 (root@cdimage) (gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r2, propolice)) #1 Sat Nov 8 05:16:29 CST 2003

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 0000000017fc0000 (usable)

 BIOS-e820: 0000000017fc0000 - 0000000017ff8000 (ACPI data)

 BIOS-e820: 0000000017ff8000 - 0000000018000000 (ACPI NVS)

 BIOS-e820: 00000000ffb80000 - 00000000ffc00000 (reserved)

 BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)

383MB LOWMEM available.

ACPI: have wakeup address 0xc0001000

On node 0 totalpages: 98240

zone(0): 4096 pages.

zone(1): 94144 pages.

zone(2): 0 pages.

ACPI: RSDP (v000 AMI                        ) @ 0x000ff980

ACPI: RSDT (v001 DELL   ZUUL     08193.02327) @ 0x17ff0000

ACPI: FADT (v001 DELL   ZUUL     08193.02327) @ 0x17ff1000

ACPI: BOOT (v001 DELL   ZUUL     08193.02327) @ 0x17ff4000

ACPI: DSDT (v001 D815EA EA81510A 00000.00019) @ 0x00000000

ACPI: BIOS passes blacklist

Kernel command line: auto BOOT_IMAGE=Gentoo ro root=305 root=/dev/hda5 init=/linuxrc

Initializing CPU#0

Detected 863.920 MHz processor.

Console: colour VGA+ 80x25

Calibrating delay loop... 1723.59 BogoMIPS

Memory: 380960k/392960k available (2000k kernel code, 9436k reserved, 300k data, 120k init, 0k highmem)

Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)

Inode cache hash table entries: 32768 (order: 6, 262144 bytes)

Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)

Buffer-cache hash table entries: 32768 (order: 5, 131072 bytes)

Page-cache hash table entries: 131072 (order: 7, 524288 bytes)

Proc Config support by ptb@it.uc3m.es

proc config counted 5638 bytes in names

proc config counted 600 bytes in value handles

CPU: L1 I cache: 16K, L1 D cache: 16K

CPU: L2 cache: 256K

CPU:     After generic, caps: 0383f9ff 00000000 00000000 00000000

CPU:             Common caps: 0383f9ff 00000000 00000000 00000000

CPU: Intel Pentium III (Coppermine) stepping 06

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

POSIX conformance testing by UNIFIX

mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)

mtrr: detected mtrr type: Intel

ACPI: Subsystem revision 20021122

PCI: PCI BIOS revision 2.10 entry at 0xfda95, last bus=2

PCI: Using configuration type 1

    ACPI-0511: *** Info: GPE Block0 defined as GPE0 to GPE15

    ACPI-0511: *** Info: GPE Block1 defined as GPE16 to GPE31

ACPI: Interpreter enabled

ACPI: Using PIC for interrupt routing

ACPI: System [ACPI] (supports S0 S1 S4 S5)

ACPI: PCI Root Bridge [PCI0] (00:00)

PCI: Probing PCI hardware (bus 00)

Transparent bridge - Intel Corp. 82801BA/CA/DB PCI Bridge

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI1._PRT]

ACPI: Power Resource [URP1] (off)

ACPI: Power Resource [URP2] (off)

ACPI: Power Resource [FDDP] (off)

ACPI: Power Resource [LPTP] (off)

ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12)

ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *9 10 11 12)

ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 9 10 11 12, disabled)

ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 9 *10 11 12)

ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 10 11 12, disabled)

ACPI: PCI Interrupt Link [LNKF] (IRQs *3 4 5 6 7 9 10 11 12)

ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 9 10 11 12, disabled)

ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 9 10 11 12, disabled)

PCI: Probing PCI hardware

ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 5

ACPI: PCI Interrupt Link [LNKE] enabled at IRQ 11

ACPI: PCI Interrupt Link [LNKG] enabled at IRQ 10

ACPI: PCI Interrupt Link [LNKH] enabled at IRQ 9

PCI: Using ACPI for IRQ routing

PCI: if you experience problems, try using option 'pci=noacpi' or even 'acpi=off'

Linux NET4.0 for Linux 2.4

Based upon Swansea University Computer Society NET3.039

Initializing RT netlink socket

Starting kswapd

Journalled Block Device driver loaded

devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x0

NTFS driver 2.1.4a [Flags: R/O].

parport0: PC-style at 0x378 [PCSPP,TRISTATE,EPP]

pty: 256 Unix98 ptys configured

Real Time Clock Driver v1.10e

Uniform Multi-Platform E-IDE driver Revision: 6.31

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

ICH2: IDE controller on PCI bus 00 dev f9

ICH2: chipset revision 2

ICH2: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:pio

    ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio

keyboard: Timeout - AT keyboard not present?(ed)

keyboard: Timeout - AT keyboard not present?(f4)

hda: WDC WD400BB-75AUA1, ATA DISK drive

hdc: LG CD-RW CED-8080B, ATAPI CD/DVD-ROM drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

ide1 at 0x170-0x177,0x376 on irq 15

blk: queue c0177824, I/O limit 4095Mb (mask 0xffffffff)

hda: 78165360 sectors (40021 MB) w/2048KiB Cache, CHS=4865/255/63, UDMA(100)

hdc: ATAPI 32X CD-ROM CD-R/RW drive, 2048kB Cache, DMA

Uniform CD-ROM driver Revision: 3.12

Partition check:

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4 < p5 >

RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize

3c59x: Donald Becker and others. www.scyld.com/network/vortex.html

02:09.0: 3Com PCI 3c905C Tornado at 0xdc00. Vers LK1.1.16

PPP generic driver version 2.4.2

Equalizer1996: $Revision: 1.2.1 $ $Date: 1996/09/22 13:52:00 $ Simon Janes (simon@ncm.com)

SCSI subsystem driver Revision: 1.00

kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2

kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2

kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2

usb.c: registered new driver usbdevfs

usb.c: registered new driver hub

mice: PS/2 mouse device common for all mice

NET4: Linux TCP/IP 1.0 for NET4.0

IP Protocols: ICMP, UDP, TCP

IP: routing cache hash table of 4096 buckets, 32Kbytes

TCP: Hash tables configured (established 32768 bind 65536)

NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.

IPv6 v0.8 for NET4.0

IPv6 over IPv4 tunneling driver

RAMDISK: Compressed image found at block 0

Freeing initrd memory: 1401k freed

VFS: Mounted root (ext2 filesystem).

NCR53c406a: no available ports found

aec671x_detect:

scsi: <fdomain> Detection failed (no card)

megaraid: v1.18 (Release Date: Thu Oct 11 15:02:53 EDT 2001)

megaraid: no BIOS enabled.

DC390: 0 adapters found

Failed initialization of WD-7000 SCSI card!

3ware Storage Controller device driver for Linux v1.02.00.031.

3w-xxxx: No cards with valid units found.

NCR53c406a: no available ports found

Red Hat/Adaptec aacraid driver, Nov  8 2003

Loading Adaptec I2O RAID: Version 2.4 Build 5

Detecting Adaptec I2O RAID controllers...

imm: Version 2.05 (for Linux 2.4.0)

sim710: No NCR53C710 adapter found.

uhci.c: USB Universal Host Controller Interface driver v1.1

PCI: Setting latency timer of device 00:1f.2 to 64

uhci.c: USB UHCI at I/O 0xef80, IRQ 10

usb.c: new USB bus registered, assigned bus number 1

hub.c: USB hub found

hub.c: 2 ports detected

usb.c: registered new driver hid

hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <vojtech@suse.cz>

hid-core.c: USB HID support drivers

Initializing USB Mass Storage driver...

usb.c: registered new driver usb-storage

USB Mass Storage support registered.

kmod: failed to exec /sbin/modprobe -s -k nls_iso8859-1, errno = 2

reiserfs: checking transaction log (device 03:05) ...

hub.c: new USB device 00:1f.2-1, assigned address 2

hub.c: USB hub found

hub.c: 4 ports detected

Using r5 hash to sort names

ReiserFS version 3.6.25

VFS: Mounted root (reiserfs filesystem) readonly.

Trying to move old root to /initrd ... failed

Unmounting old root

Trying to free ramdisk memory ... okay

Freeing unused kernel memory: 120k freed

hub.c: new USB device 00:1f.2-1.1, assigned address 3

input0: USB HID v1.10 Keyboard [045e:001d] on usb1:3.0

input1: USB HID v1.10 Pointer [045e:001d] on usb1:3.1

Adding Swap: 755044k swap-space (priority -1)

0: nvidia: loading NVIDIA Linux x86 nvidia.o Kernel Module  1.0-4496  Wed Jul 16 19:03:09 PDT 2003

scsi0 : SCSI host adapter emulation for IDE ATAPI devices

NTFS volume version 3.1.

PPP BSD Compression module registered

PPP Deflate Compression module registered

keyboard: Timeout - AT keyboard not present?(f4)

eth0: no IPv6 routers present

inserting floppy driver for 2.4.20-gentoo-r8

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

devfs_register(audio): could not append to parent, err: -17

cdrom: This disc doesn't have any tracks I recognize!

```

Thanks for all of the help with this issue.

ypm

----------

## _hesoez_

why do you post a dmesg output from nov 8 on nov 29??

i have the same cd-writer

 *Quote:*   

> 
> 
> ICH2: IDE controller on PCI bus 00 dev f9
> 
> ICH2: chipset revision 2
> ...

 

my dmesg:

```

ICH2: IDE controller at PCI slot 0000:00:1f.1

ICH2: chipset revision 18

ICH2: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0xb800-0xb807, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xb808-0xb80f, BIOS settings: hdc:DMA, hdd:pio

hda: Maxtor 5T040H4, ATA DISK drive

hdb: Pioneer DVD-ROM ATAPIModel DVD-106S 010, ATAPI CD/DVD-ROM drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

[b]hdc: LG CD-RW CED-8080B, ATAPI CD/DVD-ROM drive[/b]

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 128KiB

hda: 80043264 sectors (40982 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(100)

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4

end_request: I/O error, dev hdb, sector 0

hdb: ATAPI 40X DVD-ROM drive, 256kB Cache, UDMA(66)

Uniform CD-ROM driver Revision: 3.12

scsi0 : SCSI host adapter emulation for IDE ATAPI devices

  Vendor: LG        Model: CD-RW CED-8080B   Rev: 1.06

  Type:   CD-ROM                             ANSI SCSI revision: 02

sr0: scsi3-mmc drive: 32x/32x writer cd/rw xa/form2 cdda tray

Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 5

```

i just enabled:

in ide section:

-ide-support

-ide-cdrom-support

-ide-scsi-emulation

in scsi section:

-scsi-support

-scsi-cdrom-support

-scsi-generic-support

in the kernel.

all is build in, no modules(just load the right modules at boot(/etc/modules.autoload) and it will be the same).

then i just added hdc=ide-scsi in my grub config(you're lilo is already setup right if you added the line to append(use 1 append line) and don't forget to run lilo after the changes  :Wink: ), rebooted and all worked well, the device is called /dev/sr0

good luck

grtz

----------

## ypm

Hi,

I'm not sure why dmesg had the wrong date, my clock has the right date and the wrong time, something that I am also looking at fixing.

I have made some progress, one of the things that I was not going was running lilo after making changes to lilo.conf.  I didn't know that you had to do that, thanks for the information.

I also had an old option in /etc/moduls.d/kernel-2.4 that was set to

```
options ide-scsi ignore=hdc
```

Which I'm sure was causing me some problems.  Now when I run cdrecord -scanbus I get this:

```
Cdrecord 2.01a14 (i686-pc-linux-gnu) Copyright (C) 1995-2003 Jrg Schilling

Linux sg driver version: 3.1.24

Using libscg version 'schily-0.7'

scsibus0:

        0,0,0     0) 'LG      ' 'CD-RW CED-8080B ' '1.04' 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) *

```

dmesg gives me this following information: 

```

hda: WDC WD400BB-75AUA1, ATA DISK drive

hdc: LG CD-RW CED-8080B, ATAPI CD/DVD-ROM drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

ide1 at 0x170-0x177,0x376 on irq 15

blk: queue c0177824, I/O limit 4095Mb (mask 0xffffffff)

hda: 78165360 sectors (40021 MB) w/2048KiB Cache, CHS=4865/255/63, UDMA(100)

Partition check:

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4 < p5 >

RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize

3c59x: Donald Becker and others. www.scyld.com/network/vortex.html

02:09.0: 3Com PCI 3c905C Tornado at 0xdc00. Vers LK1.1.16

PPP generic driver version 2.4.2

Equalizer1996: $Revision: 1.2.1 $ $Date: 1996/09/22 13:52:00 $ Simon Janes (simon@ncm.com)

SCSI subsystem driver Revision: 1.00

scsi0 : SCSI host adapter emulation for IDE ATAPI devices

  Vendor: LG        Model: CD-RW CED-8080B   Rev: 1.04

  Type:   CD-ROM                             ANSI SCSI revision: 02

Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0

sr0: scsi3-mmc drive: 32x/32x writer cd/rw xa/form2 cdda tray

Uniform CD-ROM driver Revision: 3.12

```

Which I think is a good sign.  The only thing I need to do now is to be able to access the cd drive.  Now gnome-cd tells me that there is a drive error when I try to access the cd-rom.

How should I mount the device in /etc/fstab?

ypm

----------

## ypm

Update:

I've got it so that I can play my CD in gnome-cd now, I had to make a few adjustments to /etc/devfsd.conf basically I uncommented this section (which I had commented out during a previous attempt to get this working):

```
# Create /dev/cdrom for the first cdrom drive

LOOKUP          ^cdrom$          CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrom

REGISTER        ^cdroms/cdrom0$   CFUNCTION GLOBAL mksymlink $devname cdrom

UNREGISTER      ^cdroms/cdrom0$   CFUNCTION GLOBAL unlink cdrom

```

(I also have the section about the CDRW uncommented)

Now my only problem is being able to browse the CD drive when I want.  I'm just not sure what to mount.  I have this in my /etc/fstab:

```
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,user,ro          0 0
```

ypm

----------

## _hesoez_

i just added this in fstab, didn't touch devfsd.conf:

```

/dev/sr0                /mnt/cdrw       iso9660         noauto,ro,user          0 0

```

you're scsi-emu is up, otherwise 'cdrecord -scanbus' would say it doesn't find a drive.

al i have to do is 'mount /mnt/cdrw'

you linked you're device to /mnt/cdrom (in fstab), so just mount it with 'mount /mnt/cdrom'

grtz

----------

## ypm

Hi _hesoez_,

Thanks for the reply, I've tried what you suggested and I still cannot browse CD's either in Nautilus or in a terminal.  Interestingly if I launch XMMS and try to play a file from /mnt/cdrom it will see that there is a CD their and show me the CDA tracks, I just cannot browse any DATA cd's.

I'm not sure what to do about this, at least I can play audio cd's now.

ypm.

----------

