Problem with ATAPI-IDE SCSI emulation for cd burning

Problem with ATAPI-IDE SCSI emulation for cd burning

Post by Steven Ki » Thu, 16 Jan 2003 07:01:16



Hello

I am having problems getting my ARTEC ATAPI-IDE CD-RW working with cdrecord.
I can use it to play music and to view data, but not to burn to.I've
searched various groups and HOW-TOs with no luck so far.

My CD-RW is on hdd, as confirmed in the boot.log.

First the primary symptom:

cdrecord gives the following error message:

Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J?rg Schilling
cdrecord: Permission denied. Cannot open '/dev/sg0'. Cannot open SCSI
driver.

So I followed the advice of the HOW-TOs etc and changed my system as
follows:

In lilo.conf I added:
hdd=ide-scsi

In modules.conf I added:
alias scd0 srmod
options ide-cd ignore=hdd
alias scsi_hostadapter ide-scsi

Then ran lilo and rebooted.

But I get the same message from cdrecord. I have taken the error message
literally and worked on the assumption that scsi emulation is not working
properly or something like that. THere are some clues to that in the
boot.log I think.

Here are some possible clues, though they mean little to me:

In the boot log I get the following lines that may be relevant:

  :
<6>Uniform Multi-Platform E-IDE driver Revision: 6.31
<4>ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx
<4>VP_IDE: IDE controller on PCI bus 00 dev a1
<4>VP_IDE: chipset revision 16
<4>VP_IDE: not 100%% native mode: will probe irqs later
<4>ide: Assuming 33MHz system bus speed for PIO modes; override with
idebus=xx
<6>VP_IDE: VIA vt82c686a (rev 22) IDE UDMA66 controller on pci00:14.1
<4>spurious 8259A interrupt: IRQ7.
<4>    ide0: BM-DMA at 0x1440-0x1447, BIOS settings: hda:DMA, hdb:pio
<4>    ide1: BM-DMA at 0x1448-0x144f, BIOS settings: hdc:DMA, hdd:DMA
<4>hda: Maxtor 31024H1, ATA DISK drive
<4>hdc: COMPAQ DVD-ROM SD-612B, ATAPI CD/DVD-ROM drive
<4>hdd: ARTEC WRR-4848 1.00, ATAPI CD/DVD-ROM drive
<4>ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
<4>ide1 at 0x170-0x177,0x376 on irq 15
<6>hda: 19541088 sectors (10005 MB) w/2048KiB Cache, CHS=1292/240/63,
UDMA(66)
<4>hdc: ATAPI 32X DVD-ROM drive, 512kB Cache, DMA
<6>Uniform CD-ROM driver Revision: 3.12
<4>hdd: ATAPI 48X CD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)
<4>ide-floppy driver 0.97.sv
  :
<6>SCSI subsystem driver Revision: 1.00
<3>request_module[scsi_hostadapter]: Root fs not mounted
<3>request_module[scsi_hostadapter]: Root fs not mounted
  :
<6>scsi0 : SCSI host adapter emulation for IDE ATAPI devices
  :

I notice that I do *not* get a line like the following, which I have seen
quoted in posts:
Detected scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0

So I guess my CD-RW has *not* been recognised as a scsi device. This is
supported by fact that I can still mount it for reading on /dev/hdd.

lsmod gives this:

Module                  Size  Used by
snd-pcm-oss            45216   0  (autoclean)
snd-mixer-oss          11184   1  (autoclean)
agpgart                27328   3  (autoclean)
NVdriver              946736  10  (autoclean)
parport_pc             19280   1  (autoclean)
lp                      5248   0  (autoclean)
parport                22240   1  (autoclean) [parport_pc lp]
snd-via686              7984   1
snd-pcm                58784   0  [snd-pcm-oss snd-via686]
snd-timer              11856   0  [snd-pcm]
snd-ac97-codec         24688   0  [snd-via686]
snd-mpu401-uart         3504   0  [snd-via686]
snd-rawmidi            13824   0  [snd-mpu401-uart]
snd-seq-device          4400   0  [snd-rawmidi]
snd                    32256   0  [snd-pcm-oss snd-mixer-oss snd-via686
snd-pcm
snd-timer snd-ac97-codec snd-mpu401-uart snd-rawmidi snd-seq-device]
soundcore               3280   3  [snd]
keybdev                 1664   0  (unused)
hid                    12640   0  (unused)
usbkbd                  2896   0  (unused)
ipv6                  124736  -1  (autoclean)
scanner                 7104   0  (unused)
evdev                   4160   0  (unused)
input                   3072   0  [keybdev hid usbkbd evdev]
uhci                   22400   0  (unused)
usbcore                47264   1  [hid usbkbd scanner uhci]
ipt_LOG                 3152   2  (autoclean)
ipt_state                624   6  (autoclean)
iptable_filter          1728   0  (autoclean) (unused)
ip_nat_ftp              2944   0  (autoclean) (unused)
iptable_nat            12656   1  (autoclean) [ip_nat_ftp]
ip_tables              10496   6  (autoclean) [ipt_LOG ipt_state
iptable_filter
iptable_nat]
ip_conntrack_ftp        3184   0  (autoclean) (unused)
ip_conntrack           12848   3  (autoclean) [ipt_state ip_nat_ftp
iptable_nat
ip_conntrack_ftp]
nls_iso8859-1           2880   1  (autoclean)
nls_cp437               4384   1  (autoclean)
lvm-mod                45632   0  (autoclean)
ide-scsi                7552   0
reiserfs              147920   1

I am using SuSE 7.3.
The kernel is 2.4.10-4GB

As far as I can tell, I have done everything required and I seem to have
scsi emulation running... I can't think of anything else that might contain
clues.

Thanks for any help. I'll need to take the drive back to the shop this
weekend if I don't get it working, so urgent help would be appreciated,
please!

Steve

 
 
 

Problem with ATAPI-IDE SCSI emulation for cd burning

Post by Chris Coyl » Thu, 16 Jan 2003 07:48:02



> Hello

> I am having problems getting my ARTEC ATAPI-IDE CD-RW working with cdrecord.
> I can use it to play music and to view data, but not to burn to.I've
> searched various groups and HOW-TOs with no luck so far.

1. Try " cdrecord -scanbus " . That may give you the answer right away.
2. Check the owner,permissions on /dev/sg0 and whatever its linked to.

If its a permissions issue you may be able to fix it by changing the permissions
in /dev or by setting suid bit on the cdrecord binary.

 
 
 

Problem with ATAPI-IDE SCSI emulation for cd burning

Post by Dances With Crow » Thu, 16 Jan 2003 10:10:12


On Tue, 14 Jan 2003 17:48:02 -0500, Chris Coyle staggered into the Black
Sun and said:



>> I am having problems getting my ARTEC ATAPI-IDE CD-RW working with
>> cdrecord.  I can use it to play music and to view data, but not to
>> burn to.I've searched various groups and HOW-TOs with no luck so far.

You didn't search very hard.  This topic has come up N+1 times on
comp.os.linux.hardware.

Your LILO boot options are OK, and ide-scsi is loaded.  Good!  However,
I saw a number of problems with your lsmod listing.  First, neither
sr_mod (SCSI CD-ROM support) nor sg (SCSI generic support) is loaded.
Load them.  "modprobe sr_mod sg".  I also noticed you've got the uhci
module loaded.  This will cause you much pain and suffering later on if
you try to use any USB Mass Storage devices.  Remove uhci and modprobe
usb-uhci instead.

Quote:> 1. Try " cdrecord -scanbus " . That may give you the answer right away.

Unless sg is loaded, cdrecord -scanbus will return nothing useful.

Quote:> 2. Check the owner,permissions on /dev/sg0 and whatever its linked to.
> If its a permissions issue you may be able to fix it by changing the
> permissions in /dev or by setting suid bit on the cdrecord binary.

If you've ever looked at the output from an incorrectly set-up cdrecord,
you know that it *must* be SUID root not because of permissions to
/dev/sg0 (or wherever) but because it locks pages into memory so they
can't be swapped out (a privileged operation under Linux.)  They suggest
making cdrecord SUID root, owned by group "cdburners", and executable
only by members of that group.

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /
http://www.brainbench.com     /  "He is a rhythmic movement of the
-----------------------------/    penguins, is Tux." --MegaHAL

 
 
 

Problem with ATAPI-IDE SCSI emulation for cd burning

Post by Steven Ki » Wed, 05 Feb 2003 01:55:19


Hello

I am back on the trail of my CD burner. This is after breaking my
installation trying to work out sr_mod etc. If only I'd taken a system
back up to CD first ...

Anyway... I put things back together. Followed some of your advice -
the problem with sg was that cdrecord was running SUID "bin" for some
reason. I corrected that and now everything seems to work, except the
CD does not actually get burned! No error messages. A nice success
message at the end.

So I still have a problem, and this time no obvious clues.

"sg" gets loaded automatically.

"sr_mod" still does not appear on lsmod. So perhaps this is still a
problem? But I somehow feel not as cdrecord does not seem worried
about it. Or about anything.

My KDE desktop link to the CDR does not believe there is a CD in there
(but I have the link right because I can operate the eject from it).

Here is the cdrecord output (as saved by xcdroast):

Calling: /usr/lib/xcdroast-0.98/bin/xcdrwrap CDRECORD dev=0,0,0
gracetime=2 fs=2048k driveropts=burnfree,noforcespeed -v -useinfo
driver=mmc_cdr speed=48 -eject -pad -data "/tmp/track-01.img" ...

scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
Linux sg driver version: 3.1.20
pregap1: -1
Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J?rg
Schilling
TOC Type: 1 = CD-ROM
Using libscg version 'schily-0.7'
Driveropts: 'burnfree,noforcespeed'
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 1
Vendor_info    : 'ARTEC   '
Identifikation : 'WRR-4848        '
Revision       : '1.00'
Device seems to be: Generic mmc CD-RW.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags   : MMC-2 SWABAUDIO BURNFREE FORCESPEED
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R96R
Drive buf size : 1359872 = 1328 KB
FIFO size      : 2097152 = 2048 KB
Track 01: data     6 MB         padsize:   30 KB
Total size:        7 MB (00:46.73) = 3505 sectors
Lout start:        8 MB (00:48/55) = 3505 sectors
Current Secsize: 2048
ATIP info from disk:
Indicated writing power: 4
Is not unrestricted
Is not erasable
Disk sub type: Medium Type A, low Beta category (A-) (2)
ATIP start of lead in:  -12508 (97:15/17)
ATIP start of lead out: 359849 (79:59/74)
Disk type:    Short strategy type (Phthalocyanine or similar)
Manuf. index: 22
Manufacturer: Ritek Co.
Blocks total: 359849 Blocks current: 359849 Blocks remaining: 356344
Forcespeed is OFF.
Starting to write CD/DVD at speed 40 in real TAO mode for single
session.
Waiting for reader process to fill input buffer ...
input buffer ready.
BURN-Free is ON.
Performing OPC...
Starting new track at sector: 0

Track 01: writing  30 KB of pad data.
Track 01: Total bytes read/written: 7143424/7174144 (3503 sectors).
Writing  time:    9.787s
Average write speed   8.4x.
Min drive buffer fill was 100%
Fixating...
Fixating time:   23.477s
BURN-Free was never needed.
cdrecord: fifo had 113 puts and 113 gets.
cdrecord: fifo was 0 times empty and 54 times full, min fill was 75%.

<-- END OF CDRECORD OUTPUT -->

Any clues?

Steve

 
 
 

Problem with ATAPI-IDE SCSI emulation for cd burning

Post by Dances With Crow » Wed, 05 Feb 2003 09:47:19


On 3 Feb 2003 08:55:19 -0800, Steven King staggered into the Black Sun
and said:

Quote:> now everything seems to work, except the CD does not actually get
> burned! No error messages.

Odd.  See below...

Quote:> "sr_mod" still does not appear on lsmod. So perhaps this is still a
> problem? But I somehow feel not as cdrecord does not seem worried
> about it.

sr_mod is support for SCSI CD-ROMs.  It may be built into your distro's
kernel--which distro were you running again?  (Always include that
information!)  If you don't have it loaded, or built into the kernel,
you will not be able to mount a data CD or play an audio CD in your
CD-RW.  sg is support for SCSI generic devices; cdrecord requires this
in order to assume lowlevel control of the CD-RW and actually write a
CD.

Quote:> My KDE desktop link to the CDR does not believe there is a CD in there
> (but I have the link right because I can operate the eject from it).

Maybe, maybe not.  The link is to /dev/scd0 or /dev/sr0, right?

Quote:> /usr/lib/xcdroast-0.98/bin/xcdrwrap CDRECORD dev=0,0,0
> gracetime=2 fs=2048k driveropts=burnfree,noforcespeed -v -useinfo
> driver=mmc_cdr speed=48 -eject -pad -data "/tmp/track-01.img" ...

Um.  XCDRoast is a pain and the silly wrapper script makes diagnosing
problems kind of difficult.  There are other frontends; "cdbakeoven" for
KDE is better IMHO.

Quote:> Starting to write CD/DVD at speed 40 in real TAO mode for single
> session.

speed=48 above, but cdrecord is trying to write at 40?  Hm.  Make sure
that your drive is capable of writing CD-Rs at 48x (or 40x).  Make sure
your blanks are rated for 48 (or 40)x; the cheap blanks are usually
rated to 16 or 32x at most.

Quote:> Track 01: writing  30 KB of pad data.

-pad is only useful for writing Red Book audio CDs.

Quote:> Any clues?

When you put the burned CD back into the drive and try "mount /dev/scd0
/mnt/cdrom" as root, what do you get as an error message?  After the
burn, can you do "cdrecord -toc" on the burned CD and get something
rational back?  How did you make the track01.img file?  With mkisofs, or
a frontend, or...?  Can you do "mount -t iso9660 track01.img
/mnt/somewhere -o loop" and have it work right?

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /
http://www.brainbench.com     /  "He is a rhythmic movement of the
-----------------------------/    penguins, is Tux." --MegaHAL

 
 
 

1. ide-scsi emulation for ATAPI cd writing problem

Hello,
    I am trying to get CD writing to work properly under Linux and I am
having some problems.  I know you have to use scsi emulation so I
recompiled my kernel without IDE ATAPI CD support and with both
generic scsi, and scsi CD modules.  However when I try to load the
scsi modules I get the following message:

scsi0 : SCSI host adapter emulation for IDE ATAPI devices
scsi : 1 host.
Vendor: MITSUMI   Model: CR-2801TE         Rev: 1.07
Type:   CD-ROM                             ANSI SCSI revision: 02
scsi0 channel 0 : resetting for second half of retries.
SCSI bus is being reset for host 0 channel 0.
aborting command due to timeout : pid 2,
scsi0, channel 0, id 0, lun 1 Request Sense 20 00 00 10 00

Then the window freezes and I can only kill the process.  If I do
a lsmod the scsi-ide module is loaded but unitialized.  I am running
kernel 2.2.1 with Redhat 5.1 with a Mitsumi 2801 CDR.  Any help would
be appreciated.

Thanks!

Ryan

2. mod_auth_smb patch

3. how to burn CD with IDE/ATAPI CD-RW ?

4. Best Video Card!

5. ide-cd driver and ATAPI-IDE CDROM

6. Win95 / Linux

7. CD Burn with ATAPI/IDE device?

8. Fixed ftpd for Linux?

9. CD RW/Burn with ATAPI/IDE devices?

10. CD-burning on IDE/ATAPI RH 6.0

11. ATAPI 250MB ZIP and IDE-SCSI Emulation HELP!

12. ATAPI burner and IDE SCSI emulation

13. SCSI emulation and CD burning.