LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   k3b and scsi emulation in kernel 2.6x (https://www.linuxquestions.org/questions/slackware-14/k3b-and-scsi-emulation-in-kernel-2-6x-226428/)

taek 09-04-2004 12:32 AM

k3b and scsi emulation in kernel 2.6x
 
Recently I have upgraded to Slackware 10, and had most of the things set up. Now, I'm trying
to burn CD with a popular k3b program, and it gives me a headache. Strange thing is that in
kernel 2.6.8.1 (which is what I'm using now) If I have scsi-emulation is added in /etc/lilo.conf,
I don't see any of cdrom, scdx, or srx under /dev directory and can't read cdrom. I have all
the scsi options in the kernel or as a module). But if I lsmod, I don't see any modules related
to cdrom or scsi-emulation.

As I read from this site, kernel 2.6.x doesn't require scsi-emulation to burn CD anymore,
so I commented out scsi-emulation in /etc/lilo.conf. Then, I can see /dev/cdrom (which is linked
to /dev/hdc, but still no scdx or srx) and mount cdrom. Still, k3 doesn't recognize cdrom as
writable device.

Finally, I tried 2.4.x kernel, and I can see srx and scdx in /dev.

I don't have a clue on what is going on. There may be something I'm missing here.
I would appreciate your help!

BrianW 09-04-2004 12:39 AM

They say you can't use K3B with kernel 2.6.8 so I guess it goes the same with 2.6.8.1.

You will have to roll back to 2.6.7 or previous if you want to use K3B (I know it sucks, same problem I had :P)

HappyTux 09-04-2004 12:46 AM

Re: k3b and scsi emulation in kernel 2.6x
 
Quote:

Originally posted by taek
Recently I have upgraded to Slackware 10, and had most of the things set up. Now, I'm trying
to burn CD with a popular k3b program, and it gives me a headache. Strange thing is that in
kernel 2.6.8.1 (which is what I'm using now) If I have scsi-emulation is added in /etc/lilo.conf,
I don't see any of cdrom, scdx, or srx under /dev directory and can't read cdrom. I have all
the scsi options in the kernel or as a module). But if I lsmod, I don't see any modules related
to cdrom or scsi-emulation.

As I read from this site, kernel 2.6.x doesn't require scsi-emulation to burn CD anymore,
so I commented out scsi-emulation in /etc/lilo.conf. Then, I can see /dev/cdrom (which is linked
to /dev/hdc, but still no scdx or srx) and mount cdrom. Still, k3 doesn't recognize cdrom as
writable device.

Finally, I tried 2.4.x kernel, and I can see srx and scdx in /dev.

I don't have a clue on what is going on. There may be something I'm missing here.
I would appreciate your help!

Here is a patch from the Con Kolivas kernel patches mailing list that will solve the problem.

Code:

cddvd-cmdfilter-drop.patch


Index: linux-2.6.8.1/drivers/block/scsi_ioctl.c
===================================================================
--- linux-2.6.8.1.orig/drivers/block/scsi_ioctl.c      2004-08-15 14:08:05.000000000 +1000
+++ linux-2.6.8.1/drivers/block/scsi_ioctl.c    2004-08-17 18:58:30.505453065 +1000
@@ -193,8 +193,6 @@ static int sg_io(struct file *file, requ
                return -EINVAL;
        if (copy_from_user(cmd, hdr->cmdp, hdr->cmd_len))
                return -EFAULT;
-      if (verify_command(file, cmd))
-              return -EPERM;
 
        /*
        * we'll do that later


taek 09-05-2004 10:11 AM

thanks a lot, one more question...
 
Thank you very much for a quick reply! I went back to kernel 2.6.7, and I can read and detect my cdrw with /dev/sr0. Though I still have a problem to cd-writing to work. When I try cdrecord -scanbus, I get the following message:

Cdrecord 2.00.3 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J?g Schilling
cdrecord: No such file or directory. Cannot open '/dev/pg*'. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

I don't see pg* or sg* in my /dev directory. I would appreciate your help again.

HappyTux 09-05-2004 01:49 PM

Re: thanks a lot, one more question...
 
Quote:

Originally posted by taek
Thank you very much for a quick reply! I went back to kernel 2.6.7, and I can read and detect my cdrw with /dev/sr0. Though I still have a problem to cd-writing to work. When I try cdrecord -scanbus, I get the following message:

Cdrecord 2.00.3 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J?g Schilling
cdrecord: No such file or directory. Cannot open '/dev/pg*'. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

I don't see pg* or sg* in my /dev directory. I would appreciate your help again.

I had that one last year but if the devices do not exist then my solution on Debian would not work I had to.

Code:

chmod g+rw /dev/sg*
chgrp cdrom /dev/sg*

At the time but like I say if the devices /dev/sg* you are going to have a problem doing it and I am not sure how slack handles the groups. Have you tried cdrecord dev=ATA -scanbus to see what the output is it may be trying to use the ATAPI interface.

taek 09-08-2004 01:34 AM

/dev/pg* or sg* not present
 
Thanks for the reply. But, I don't see any pg* or sg* under /dev/ directory. Could anybody tell me how they are generated on booting, and what might be the problem? I really like to burn CD's, but I haven't been successful with this cdrecord problem. Thanks in advance.

taek 09-08-2004 10:05 AM

Found this, but....
 
OK, I found this on this site and it might tell some expert why I don't have sg* or pg* under /dev.

If I do cdrecord dev=ATAPI -scanbus, I get:

Cdrecord 2.00.3 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J?g Schilling
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) 'HL-DT-ST' 'RW/DVD GCC-4320B' '1.02' 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) *

Of course if I do cdrecord -scanbus, I get:

Cdrecord 2.00.3 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J?g Schilling
cdrecord: No such file or directory. Cannot open '/dev/pg*'. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

I have append="hdc=ide-scsi" in lilo.conf, but there must be some problem with scsi here. Please help!

justin_p 09-08-2004 10:24 AM

i don't know about everyone else, but i have always had issues with k3b and my phillips CDRW. I use XCDRoast w/o problems. Might be worth a look.

HappyTux 09-08-2004 06:15 PM

Re: Found this, but....
 
Quote:

Originally posted by taek
OK, I found this on this site and it might tell some expert why I don't have sg* or pg* under /dev.

If I do cdrecord dev=ATAPI -scanbus, I get:

Cdrecord 2.00.3 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J?g Schilling
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) 'HL-DT-ST' 'RW/DVD GCC-4320B' '1.02' 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) *

Of course if I do cdrecord -scanbus, I get:

Cdrecord 2.00.3 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J?g Schilling
cdrecord: No such file or directory. Cannot open '/dev/pg*'. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

I have append="hdc=ide-scsi" in lilo.conf, but there must be some problem with scsi here. Please help!

The burning is set up to use the ATAPI instead of ide-scsi try this and see if you have success cdrecord -v -eject -dummy driveropts=burnfree speed=8 dev=ATA:0,0,0 some.iso this should run a test burn at 8x speed using the ATA interface which gives you DMA enabled on your drive. You will most likely want to remove the ide-scsi from the /etc/lilo.conf and run /sbin/lilo -v before rebooting to try. To use K3B with the ATAPI/ATA interface you need IIRC version > 0.11.x not quite exactly sure when the cahnge was made so you will want to get the newest version you can. If you wish to continue to use the ide-scsi then you need to use options ide-cd ignore=hdc in your /etc/modules.conf (file may be different in Slack) to tell the driver to ignore your burner for use with the driver.

kodon 09-09-2004 08:20 AM

Re: /dev/pg* or sg* not present
 
Quote:

Originally posted by taek
Thanks for the reply. But, I don't see any pg* or sg* under /dev/ directory. Could anybody tell me how they are generated on booting, and what might be the problem? I really like to burn CD's, but I haven't been successful with this cdrecord problem. Thanks in advance.
well, i don't have any /dev/pg* or /dev/sg* files and i can burn cd's without a problem with k3b.
running slack-current with the 2.6.6 kernel



ps: why are you using the -scanbus flag?

taek 10-03-2004 09:46 AM

Finally solved the problem!
 
Well, I've finally located the problem. All I had to do with 2.6.7 kernel and scsi emulation was to load "sg" module! It solved the problem I had since the first day I installed Slackware 10, and I have already burned a couple of CD's with K3b. Thank you all for the help!


All times are GMT -5. The time now is 05:30 AM.