# cdrecord --scanbus doesn't see my CDRW on hdc

## ejahn1

I have a CDRW on hdc (and dmesg confirms it), but cdrecord --scanbus only sees my USB compact flash reader. I have scsi emulation w/o ATAPI CDROM support as per the gentoo installation instructions and pass grub the "hdc=scsi-emulation" statement. I've set this CDRW up in the past on Debian and Redhat systems.  Here's the output of cdrecord --scanbus: 

```

#cdrecord --scanbus

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

Linux sg driver version: 3.1.24

Using libscg version 'schily-0.6'

scsibus1:

        1,0,0   100) 'SanDisk ' 'ImageMate II    ' '1.30' Removable Disk

        1,1,0   101) *

        1,2,0   102) *

        1,3,0   103) *

        1,4,0   104) *

        1,5,0   105) *

        1,6,0   106) *

        1,7,0   107) *

```

Any ideas?  Thanks for any insights/troubleshooting tips!

----------

## dirtyjake

Actually, I am pretty sure you want "hdc=ide-scsi" in your grub config.  Then try `modprobe ide-scsi` if that still doesn't work.

----------

## Iron_Mike

i might be wrong, but i get this while trying to cdrecord --scanbus while my ide-scsi module isnt loaded...

so do you have ide-scsi as a module or part of the kernel?

oups sorry to repeat, i was writing while you were writing too...

----------

## ejahn1

sorry, I have "hdc=ide-scsi" in grub.conf (I was just writing without looking it up exactly).  I have scsi-emulation compiled directly into the kernel.

----------

## kha

if your kernel is fairly recent (ie >2.4.15) you can try 'hdc=scsi' . 

This is what I use and it worked fine.

Kha

----------

## ejahn1

I recompiled, putting ide-scsi as a module, then modprobe ide-scsi and reran cdrecord --scanbus, but I still get the same output.  I'm at a loss for how to troubleshoot this, because it seems so low-level.

----------

## dirtyjake

Just gotta check.  You can see the drive with `hdparm -iv /dev/hdc`, right?  Need to double check that it is properly connected and powered on, at this point.

----------

## ejahn1

I can't tell offhand if this is good or bad...the cd-rom functionality of the device works fine, though...

```

localhost root # hdparm -iv /dev/hdc

/dev/hdc:

 HDIO_GET_MULTCOUNT failed: Invalid argument

 IO_support   =  0 (default 16-bit)

 unmaskirq    =  0 (off)

 using_dma    =  0 (off)

 keepsettings =  0 (off)

 readonly     =  1 (on)

 readahead    =  8 (on)

 HDIO_GETGEO failed: Invalid argument

 Model=AOPEN CD-RW CRW2440, FwRev=2.02, SerialNo=

 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }

 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0

 BuffType=unknown, BuffSize=0kB, MaxMultSect=0

 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0

 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}

 PIO modes:  pio0 pio1 pio2 pio3 pio4

 DMA modes:  sdma0 sdma1 sdma2 mdma0 mdma1 mdma2

 UDMA modes: udma0 udma1 *udma2

 AdvancedPM=no

```

----------

## BradN

what happens when you do "cat /proc/ide/hd?/driver" where ? is the letter of your cd drive?  If it doesn't show scsi, then check /proc/ide/drivers and see if ide-scsi is even there.

----------

## ejahn1

ide-scsi isn't there, but modprobe ide-scsi doesn't report any errors.  /proc/ide/drivers looks like an empty file.  it seems like something is blocking ide-scsi from loading but modprobe isn't notifying me.  

```

localhost root # modprobe ide-scsi

localhost root # cat /proc/ide/hdc/driver

ide-cdrom version 4.59

localhost root # cd /proc/ide

localhost ide # ls -l ./

total 0

-r--r--r--    1 root     root            0 Mar 19 20:41 drivers

lrwxrwxrwx    1 root     root            8 Mar 19 20:41 hda -> ide0/hda

lrwxrwxrwx    1 root     root            8 Mar 19 20:41 hdc -> ide1/hdc

dr-xr-xr-x    3 root     root            0 Mar 19 20:41 ide0

dr-xr-xr-x    3 root     root            0 Mar 19 20:38 ide1

localhost ide #

```

----------

## ejahn1

oh, also, lsmod shows I have ide-scsi loaded.

```

localhost root # lsmod

Module                  Size  Used by    Not tainted

ide-scsi                9424   0

emu10k1                72200   0

sound                  71372   0  [emu10k1]

soundcore               4548   7  [emu10k1 sound]

ac97_codec             11176   0  [emu10k1]

```

----------

## BradN

/proc/ide/drivers will report a zero size, but it should list at least some drivers if your cd works at all  :Smile: 

stuff in /proc typically doesn't report a size, as most of the stuff returned by them is generated as it is sent.

----------

## ejahn1

oops, didn't realize that.  here are the contents (I double-loaded ide-scsi just a second ago, but it should disappear on reboot)

```

localhost linux # cat /proc/ide/drivers

ide-scsi version 0.9

ide-scsi version 0.9

ide-floppy version 0.99.newide

ide-cdrom version 4.59

ide-disk version 1.12

```

----------

## BradN

one thing to check is that scsi-cdrom support is also compiled into the kernel or loaded as a module if that's your thing (as well as scsi generic I believe).  

I'm not sure if it can be made to work if ide-cdrom is in the kernel with ide-scsi as a module if you try that... you're probably better off with both in the kernel or both as modules.

----------

## ejahn1

thanks everyone for helping.  cdrecord recognizes it now.  I think atapi or something was grabbing the device before the scsi-emulation could.  I recompiled again, added ide-scsi to modules.autoload and it works.  funny thing is, I don't have any kernel support for atapi cdrom, so I think the ide system was grabbing it (if that's possible).  why would a modularized ide-scsi work better than a built-in ide-scsi, especially if neither have to compete against an atapi-cdrom module (since I left it out)?  anyway, thanks, again all!

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

Linux sg driver version: 3.1.24

Using libscg version 'schily-0.6'

scsibus0:

        0,0,0     0) 'SanDisk ' 'ImageMate II    ' '1.30' Removable Disk

        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) *

scsibus1:

        1,0,0   100) 'AOPEN   ' 'CD-RW CRW2440   ' '2.02' Removable CD-ROM

        1,1,0   101) *

        1,2,0   102) *

        1,3,0   103) *

        1,4,0   104) *

        1,5,0   105) *

        1,6,0   106) *

        1,7,0   107) *

----------

## BradN

cool, glad you got it working  :Smile: 

----------

