-   Slackware (
-   -   scsi emulation and cdrecord. (

stf92 01-26-2013 09:30 AM

scsi emulation and cdrecord.
Slackware 14.0

Hi: after some googling I had to give up. This is an old problem for me that I have solved in different ways depending on slack version and kernel choice. Now, I'm using the generic kernel and all my disk drives are SATA. The problem is just to have 'cdrecord -scanbus' to run, and thus have the scsi-bus, target and lun arguments I need for option dev= in cdrecord. Do I need scsi emulation in order to do this and be able to use cdrecord?

EDIT: I did, not that I knew what I did,

root@darkstar:~# cdrecord dev=ATAPI -scanbus
Cdrecord-ProDVD-ProBD-Clone 3.01a08 (x86_64-unknown-linux-gnu) Copyright (C) 1995-2012 Joerg Schilling
scsidev: 'ATAPI'
devname: 'ATAPI'
scsibus: -2 target: -2 lun: -2
Warning: dev=ATA: is preferred over dev=ATAPI:.
Warning: Using ATA Packet interface.
Warning: The related Linux kernel interface code seems to be unmaintained.
Warning: There is absolutely NO DMA, operations thus are slow.
Using libscg version 'schily-0.9'.
        0,0,0          0) 'HL-DT-ST' 'DVDRAM GH24NS90 ' 'IN01' 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) *


root@darkstar:~# cdrecord dev=0,0,0 media-info
cdrecord: No write mode specified.
cdrecord: Assuming -sao mode.
cdrecord: If your drive does not accept -sao, try -tao.
cdrecord: Future versions of cdrecord may have different drive dependent defaults.
Cdrecord-ProDVD-ProBD-Clone 3.01a08 (x86_64-unknown-linux-gnu) Copyright (C) 1995-2012 Joerg Schilling
scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
cdrecord: No such file or directory. Cannot open '/dev/pg0'. Cannot open or use SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

So I think I need scsi emulation or a different kernel.

stf92 01-26-2013 10:42 AM

A search in the slackware forum (LQ) gave me the answer. 14.0 seems not to load the sg module at boot time. My old 12.0 did it, because I never needed to manually load it to make cdrecord work. So, the solution is:

modprobe sg
cdrecord -scanbus

which will give you the scsi-bus, target and lun. Of course, you need scsi emulation in a non scsi bus, but this seems to be built in the generic kernel. I won't mark SOLVED till I get some feedback, which could be interesting.

EDIT: look in /etc/rc.d/rc.modules for the entry '#sbin/modprobe sg' and uncomment it. So you do not have to load the module after manually.

Woodsman 02-17-2013 10:04 PM

I ran into this problem today. I'm curious why the sg module does not load automatically anymore and is relegated to being loaded manually through rc.modules.

All times are GMT -5. The time now is 12:41 AM.