Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel SCSI emulation for CD burning - the truth
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Sun Jan 05, 2003 2:56 pm    Post subject: Reply with quote

zen_guerrilla wrote:
jukka wrote:
zen_guerrilla wrote:
So till atapi cd-rw support on linux becomes stable I' d suggest to stay on ide-scsi :)

yes, or use another os for burning. atapi support with openbsd is great!

I definitely don't want to start a linux vs. bsd flamewar, since I don't know that much about *bsd's, but at least windoze also use an "ide-scsi emulation" method for writing cd-r's IMHO. However ide-scsi works great so far so I guess it's ok :)

.:: zen ::.


Yes Windows uses ASPI, but I don't think Linux design choices should be based on Windows! And although you can end up with issues on Windows, generally you do not need to jump through hoops to get things working. IDE support on *bsd is great because of one program, burncd. Pity there's no Linux port. IDE-SCSI works fine but it's clearly fiddly and counter-intuitive to setup for most ordinary users. The fact that this thread seems to have attracted a lot of hits must surely be a testament to that. How would Joe Bloggs running RedHat or Mandrake expect to get around it? And Gentoo users are comparatively lucky, we get the advantages of devfs by default. Plus there's the issue of having to run cdrecord suid to ensure that it gets deterministic priority which is not ideal. Anyway, I welcome native support for IDE burners - I am sure the ATAPI/MMC protocol is relatively simple, and I look forward to the whole issue of CD burning becoming more transparent to the average Linux user.
Back to top
View user's profile Send private message
markusg
n00b
n00b


Joined: 29 Dec 2002
Posts: 16

PostPosted: Tue Jan 07, 2003 3:03 am    Post subject: Reply with quote

Question - I've followed these instructions and cdrecord -scanbus finds my cdr. However, I'm not able to run Arson as a non-root user without getting the error "-scanbus is not executable". I did change the permissions as suggested and I'm a member of the cdrw group. Any ideas?
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 548
Location: Hawaii

PostPosted: Wed Jan 08, 2003 6:28 am    Post subject: Add me to the list Reply with quote

I, too had to disable ide-cd (changed it from in kernel to module, didn't load it), in order to get scsi emulation working. The Gentoo sources worked fine with ide-cd compiled into kernel, but vanilla 2.4.19/2.4.20 wouldn't work right. See my posts

https://forums.gentoo.org/viewtopic.php?t=29030

https://forums.gentoo.org/viewtopic.php?t=28577

What's weird is that all my kernels worked for scsi emulation until about a week ago, then they all refused to do it except Gentoo sources. Anyway, for some, apparrently ide-scsi DOES have to be disabled for scsi emulation to work.
_________________
MSI MAG B550 Tomahawk
Ryzen 3900x
32Gb Samsung B-die (16GB dual rank x2) DDR4 @ 3200MHz, cl14
Geforce RTX 2070S 8GB
Samsung m.2 NVME pcie-3.0
Etc....
Back to top
View user's profile Send private message
iplayfast
l33t
l33t


Joined: 08 Jul 2002
Posts: 642
Location: Cambridge On,CA

PostPosted: Wed Jan 08, 2003 9:22 am    Post subject: I don't get it. Reply with quote

I've followed the original post with great success. :/

cdrecord -scanbus gives back a healthy

Code:
Cdrecord 1.11a39 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
scsibus0:
        0,0,0     0) 'DVDROM 8' 'X               ' '40  ' Removable CD-ROM
        0,1,0     1) 'HP      ' 'CD-Writer+ 8200a' '1.0g' Removable CD-ROM
        0,2,0     2) *
        0,3,0     3) *
        0,4,0     4) *
        0,5,0     5) *
        0,6,0     6) *
        0,7,0     7) *


But what do I do with this? :?

I've tried the ksCD and it seems to see the dvd (which is good), but when it plays there is no sound. I've got alsa and sound is working on this box.

I don't know how this scsi stuff works. What does a typical fstab look like?
:?

(I didn't want to post in this documents section but I thought that the questions may help other newbies, and the original post is what I've set up).
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Wed Jan 08, 2003 4:44 pm    Post subject: Re: I don't get it. Reply with quote

iplayfast wrote:
I've followed the original post with great success. :/

Good! The reason behind why some need to disabled IDE-CDROM support is still something of a mystery it seems.
iplayfast wrote:
I've tried the ksCD and it seems to see the dvd (which is good), but when it plays there is no sound. I've got alsa and sound is working on this box.

I don't know how this scsi stuff works. What does a typical fstab look like?

This isn't something I've concentrated much on because my workstation which houses the burner I use isn't really multimedia enabled. A probable target for inspection is devfsd.conf if problems persist.

With fstab, really you should just need something like:
Code:
/dev/sr0  /mnt/cdrom  iso9660  noauto,ro  0 0

What I suspect could be a problem is that devfs may not be setting up the symlink /dev/cdrom to point to the proper device node. Remember also, that devfs can set up nodes on demand - they will appear when an attempt is made to use them, so the absence of something shouldn't necessarily be a factor. Try manually setting up a symlink from /dev/cdrom to /dev/sr0 and see what happens in ksCD.

EDIT: and /dev/dvd perhaps ...


Last edited by 474 on Wed Jan 08, 2003 4:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
iplayfast
l33t
l33t


Joined: 08 Jul 2002
Posts: 642
Location: Cambridge On,CA

PostPosted: Thu Jan 09, 2003 6:41 am    Post subject: Re: I don't get it. Reply with quote

kerframil wrote:

With fstab, really you should just need something like:
Code:
/dev/sr0  /mnt/cdrom  iso9660  noauto,ro  0 0

What I suspect could be a problem is that devfs may not be setting up the symlink /dev/cdrom to point to the proper device node. Remember also, that devfs can set up nodes on demand - they will appear when an attempt is made to use them, so the absence of something shouldn't necessarily be a factor. Try manually setting up a symlink from /dev/cdrom to /dev/sr0 and see what happens in ksCD.

EDIT: and /dev/dvd perhaps ...


Well that made no difference at all. However I did have a realization. The ksCD has the location of the source set manually. It can see both the cd and the dvd (because there is different length songs on them and they light up as though playing.) So apparently the data can be read from the cd but it's not comming out the speakers... So I'll go back to browsing the forums. (as it looks like your method is working, for the data transfer itself).

Edit:
I got it working. It was so simple. The players I was using apparently don't support alsa. I emerged alsaplayer and it worked. (hit self in forehead). Thanks for the great post/thread.


Last edited by iplayfast on Thu Jan 09, 2003 2:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
PARENA
Guru
Guru


Joined: 06 Jan 2003
Posts: 349

PostPosted: Thu Jan 09, 2003 9:13 am    Post subject: fstab Reply with quote

Right, I now get this, after putting the line in grub:

Code:
Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
scsibus0:
        0,0,0     0) 'IOMEGA  ' 'ZIP 100         ' '13.A' Removable Disk
        0,1,0     1) 'PLEXTOR ' 'CD-R   PX-W1210A' '1.09' Removable CD-ROM


So that's good... Now how do I go about putting my CD-RW in fstab? I have supermount enabled, but look:

Code:
$ mount /mnt/cdrom
$ ls /mnt/cdrom
ls: /mnt/cdrom: Input/output error


Any ideas anyone?
Back to top
View user's profile Send private message
iplayfast
l33t
l33t


Joined: 08 Jul 2002
Posts: 642
Location: Cambridge On,CA

PostPosted: Thu Jan 09, 2003 2:39 pm    Post subject: Reply with quote

err, maybe look at the post about 4 messages up?
Back to top
View user's profile Send private message
PARENA
Guru
Guru


Joined: 06 Jan 2003
Posts: 349

PostPosted: Thu Jan 09, 2003 2:58 pm    Post subject: Erm... Reply with quote

I saw that /dev/sr0 thing, I was just testing you

/me runs like hell

Cool, now have my CDRW supermounted, weeeee! Thanks for all this great stuff, people. So far, most of my problems have been solved thanks to these forums.
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Thu Jan 09, 2003 4:09 pm    Post subject: Re: I don't get it. Reply with quote

Bloody Bastard wrote:
Don't you have a x button in your post?

kerframil wrote:
Bah, my browser double-posted. If a passing admin should see this - please delete it!

Strangely, no. Think it might be an alignment/wrapping issue with my (probably quite buggy) gtk2 enabled Gecko engine. I'll try with some different browser. Thanks.
Back to top
View user's profile Send private message
uncle_meat
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2002
Posts: 93

PostPosted: Sat Jan 11, 2003 9:46 pm    Post subject: Re: Kernel SCSI emulation for CD burning - the truth Reply with quote

...

Last edited by uncle_meat on Sat Jan 11, 2003 10:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
uncle_meat
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2002
Posts: 93

PostPosted: Sat Jan 11, 2003 9:55 pm    Post subject: Reply with quote

Okay, I finally decided to try to burn the Gentoo ISO, but surprise surprise, cd burning doesn't work. :)

I compiled everything as modules, I also had to add an append= line to my bootloader (yaboot) as alluded to in the first post. I successfully got scanbus to work by modprobe'ing for ide-scsi. But I can't burn anything. Here's what happens:

Code:

# cdrecord -v speed=2 dev=0,0,0 livecd-ppc-281202.iso
Cdrecord 1.11a39 (powerpc-unknown-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling
TOC Type: 1 = CD-ROM
scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   :
Vendor_info    : 'SONY    '
Identifikation : 'CD-RW  CRX170E  '
Revision       : '2.2d'
Device seems to be: Generic mmc CD-RW.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
Drive buf size : 1821440 = 1778 KB
FIFO size      : 4194304 = 4096 KB
Track 01: data   167 MB       
Total size:      192 MB (19:02.42) = 85682 sectors
Lout start:      192 MB (19:04/32) = 85682 sectors
Current Secsize: 2048
ATIP info from disk:
  Indicated writing power: 5
  Reference speed: 2
  Is not unrestricted
  Is erasable
  ATIP start of lead in:  -11745 (97:25/30)
  ATIP start of lead out: 359849 (79:59/74)
  1T speed low:  0 (reserved val  0) 1T speed high:  4
  2T speed low:  8 2T speed high:  0 (reserved val 10)
  power mult factor: 4 6
  recommended erase/write power: 5
  A1 values: 02 4C D0
  A2 values: 4A D8 5A
Disk type:    Phase change
Manuf. index: 40
Manufacturer: INFODISC Technology Co., Ltd.
Trying to clear drive status.
cdrecord: Drive needs to reload the media to return to proper status.
Blocks total: 359849 Blocks current: 359849 Blocks remaining: 274167
Starting to write CD/DVD at speed 4 in real TAO mode for single session.
Last chance to quit, starting real write    0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
BURN-Free is OFF.
Performing OPC...
cdrecord: Input/output error. read track info: scsi sendcmd: no error
CDB:  52 01 00 00 00 FF 00 00 1C 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 12 00 00 00 00 24 00 00 C0
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x24 Qual 0x00 (invalid field in cdb) Fru 0x0
Sense flags: Blk 0 (not valid) error refers to command part, bit ptr 0 (not valid) field ptr 0
cmd finished after 0.008s timeout 240s
Writing  time:    6.562s
Average write speed 999.0x.
Fixating...
Fixating time:    0.001s
cdrecord: fifo had 64 puts and 0 gets.
cdrecord: fifo was 0 times empty and 0 times full, min fill was 100%.


The error occurs right after the "Performing OPC..." line.

Any advice?
Back to top
View user's profile Send private message
uncle_meat
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2002
Posts: 93

PostPosted: Sat Jan 11, 2003 11:34 pm    Post subject: Reply with quote

Gerk pointed out that the error looked like a media error. I investigated a bit more, and found that I needed to "blank" the CDRW disc before writing onto it. So I'm trying to do that, but cdrecord just sits there:

Code:

# cdrecord -v -eject dev=0,0,0 blank=disc
Cdrecord 1.11a39 (powerpc-unknown-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling
TOC Type: 1 = CD-ROM
scsidev: '0,0,0'
scsibus: 0 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.7'
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   :
Vendor_info    : 'SONY    '
Identifikation : 'CD-RW  CRX170E  '
Revision       : '2.2d'
Device seems to be: Generic mmc CD-RW.
Using generic SCSI-3/mmc CD-R driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
Drive buf size : 1821440 = 1778 KB
Current Secsize: 2048
ATIP info from disk:
  Indicated writing power: 5
  Reference speed: 2
  Is not unrestricted
  Is erasable
  ATIP start of lead in:  -11745 (97:25/30)
  ATIP start of lead out: 359849 (79:59/74)
  1T speed low:  0 (reserved val  0) 1T speed high:  4
  2T speed low:  8 2T speed high:  0 (reserved val 10)
  power mult factor: 4 6
  recommended erase/write power: 5
  A1 values: 02 4C D0
  A2 values: 4A D8 5A
Disk type:    Phase change
Manuf. index: 40
Manufacturer: INFODISC Technology Co., Ltd.
Blocks total: 359849 Blocks current: 359849 Blocks remaining: 359999
Starting to write CD/DVD at speed 4 in real BLANK mode for single session.
Last chance to quit, starting real write    0 seconds. Operation starts.
Performing OPC...
Blanking entire disk


Any advice?
Back to top
View user's profile Send private message
uncle_meat
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2002
Posts: 93

PostPosted: Sat Jan 11, 2003 11:48 pm    Post subject: Reply with quote

After several minutes of inactivity I got this:

Code:

cdrecord: Input/output error. blank unit: scsi sendcmd: no error
CDB:  A1 00 00 00 00 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: F0 00 03 00 05 8C E7 12 00 00 00 00 51 00 00 00
Sense Key: 0x3 Medium Error, Segment 0
Sense Code: 0x51 Qual 0x00 (erase failure) Fru 0x0
Sense flags: Blk 363751 (valid)
cmd finished after 1261.823s timeout 9600s
cdrecord: Cannot blank disk, aborting.


Help?
Back to top
View user's profile Send private message
uncle_meat
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2002
Posts: 93

PostPosted: Sun Jan 12, 2003 12:13 am    Post subject: Reply with quote

Note that I CAN burn on a fresh CD-RW. But I can't erase a CD-RW. This is annoying. I don't want to waste CD-RW's.

Anyone? Anyone?
Back to top
View user's profile Send private message
uncle_meat
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2002
Posts: 93

PostPosted: Sun Jan 12, 2003 12:30 am    Post subject: Reply with quote

Quote:
maybe the cdrw is bad/corrupt. can you erase other cd-rw's?


I just burned two CD-RW's in a row, and I also have an older one which has an older copy of Gentoo on it. I can't erase any of them. So I don't think the media is at fault.
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Mon Jan 13, 2003 10:24 pm    Post subject: Reply with quote

Quote:
I just burned two CD-RW's in a row, and I also have an older one which has an older copy of Gentoo on it. I can't erase any of them. So I don't think the media is at fault.

Perhaps your particular media and drive model just don't get on - perhaps. Anyway, have you tried this parameter?
Code:
-force

Force to continue on some errors. Be careful when
using this  option. Cdrecord implements  several
checks  that prevent you from doing unwanted things
like damaging CD-RW media by improper drives.  Many
of  the  sanity checks are disabled when the -force
option is used.

Note the talk of "improper drives". Sounds potentially risky, but I can't think of any better ideas.
Back to top
View user's profile Send private message
sulu
Guru
Guru


Joined: 21 May 2002
Posts: 399
Location: Dornbirn/Austria

PostPosted: Tue Jan 14, 2003 10:53 pm    Post subject: Reply with quote

Sorry to add to this somewhat lengthy but very interesting thread.

EDIT: Ups. This is not the correct thread for posting questions i assume.
Please mods feel free to move it to a better place. :oops:


My problem:
Can't mount CD-R through ide-scsi.

> pts/0] mount -t iso9660 /dev/cdrom /mnt/cdrom/
mount: block device /dev/cdrom is write-protected, mounting read-only
mount: Not a directory

?? What the heck does "not a directory" mean in this context ??


I want to mount the CD-R via ide-scsi because i think cdrecord and cdrdao need scsi-interface to work with (maybe somewhat relaxed for cdrecord 2) and my burner has lost its ability to read CD-Rom's so i need the CD-R.


I think my configuration is fairly straigth.

- append="hdd=ide-scsi hdc=ide-scsi" for kernel boot.

- Drives show up in the kernel-log:
Code:

andy-linux kernel: Attached scsi CD-ROM sr0 at scsi1, channel 0, id 0, lun 0
andy-linux kernel: Attached scsi CD-ROM sr1 at scsi1, channel 0, id 1, lun 0
andy-linux kernel: sr0: scsi3-mmc drive: 32x/48x cd/rw xa/form2 cdda tray
andy-linux kernel: Uniform CD-ROM driver Revision: 3.12
andy-linux kernel: sr1: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray


- Enabled everything in /etc/devfsd.conf

- The "pseudo"-SCSI-bus looks great

cdrecord -scanbus
Code:

scsibus0:
        0,0,0     0) 'IBM     ' 'DCAS-34330W     ' 'S65A' Disk
        0,1,0     1) 'IBM     ' 'DCAS-34330W     ' 'S65A' Disk
        0,2,0     2) *
        0,3,0     3) *
        0,4,0     4) *
        0,5,0     5) 'IOMEGA  ' 'ZIP 100 PLUS    ' 'J.66' Removable Disk
        0,6,0     6) *
        0,7,0     7) *
scsibus1:
        1,0,0   100) 'SAMSUNG ' 'CD-ROM SC-148C  ' 'CI09' Removable CD-ROM
        1,1,0   101) 'PLEXTOR ' 'CD-R   PX-W1610A' '1.03' Removable CD-ROM
        1,2,0   102) *
        1,3,0   103) *
        1,4,0   104) *
        1,5,0   105) *
        1,6,0   106) *
        1,7,0   107) *


I linked /dev/sr0 to /dev/cdrom and
/dev/sr1 to /dev/cdrw.

I even succeeded in burning a audio cd via:

Code:

cdrdao copy --source-device 1,0,0 --source-driver generic-mmc --device 1,1,0 --buffers 64


Now, please note that the driver had to be specified explicitely for the CD-R.

Otherwise i get:
Code:
ERROR: No driver found for 'SAMSUNG CD-ROM SC-148C', available drivers:
....
For all recent recorder models either the 'generic-mmc' or
the 'generic-mmc-raw' driver should work.
Use option '--driver' to force usage of a driver, e.g.: --driver generic-mmc
ERROR: Cannot setup source device 1,0,0.



So, i guess that i have also some driver issue with mounting the CD-R.
Have i to tell the ide-scsi module to use the generic-mmc driver in order to get a successful mount ot the CD-R??

If yes but how to do it ?

Any ideas ?

Edit-2 15-01-2003:21:30:

It seems to be some driver/DMA issue.

andy-linux kernel: SCSI cdrom error : host 1 channel 0 id 0 lun 0 return code = 28000000
andy-linux kernel: Current sd0b:00: sense key Hardware Error
andy-linux kernel: Additional sense indicates Logical unit communication CRC error (Ultra-DMA/32)
andy-linux kernel: I/O error: dev 0b:00, sector 64
andy-linux kernel: isofs_read_super: bread failed, dev=0b:00, iso_blknum=16, block=16

Solved it temporarily by diabling DMA via


echo "using_dma:0" > /proc/ide/hdc/settings


Greetz
Sulu
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Fri Jan 17, 2003 2:20 pm    Post subject: Reply with quote

Quote:
Solved it temporarily by diabling DMA via

echo "using_dma:0" > /proc/ide/hdc/settings

I notice that Ultra DMA/33 mode is being used when DMA is enabled. Are you sure your burner supports that? That's hard drive territory, and probably isn't going to work with an ATAPI device.

Multi-word DMA/2 might be a more sensible choice. I can't remember what the mode number is for it offhand but once established you can echo it to the proc interface.
Back to top
View user's profile Send private message
sulu
Guru
Guru


Joined: 21 May 2002
Posts: 399
Location: Dornbirn/Austria

PostPosted: Sat Jan 18, 2003 7:07 am    Post subject: Reply with quote

Hi kerframil.

I think you are referring to this part of the error message:

Code:

Additional sense indicates Logical unit communication CRC error (Ultra-DMA/32)


This is what is reported in the kernel.log for the failed mount attempt.
I'm not sure if this error message is to be taken verbatim because i dont know how, where and what DMA-Mode is been set during startup for the CD-R. Please note that this is an issue with the CD-R not with the burner.

This are the settings right after boot:
Code:

 > pts/0] cat /proc/ide/hdc/settings
name                    value           min             max             mode
----                    -----           ---             ---             ----
bios_cyl                0               0               1023            rw
bios_head               0               0               255             rw
bios_sect               0               0               63              rw
current_speed           66              0               69              rw
ide_scsi                0               0               1               rw
init_speed              12              0               69              rw
io_32bit                1               0               3               rw
keepsettings            0               0               1               rw
log                     0               0               1               rw
nice1                   1               0               1               rw
number                  2               0               3               rw
pio_mode                write-only      0               255             w
slow                    0               0               1               rw
transform               1               0               3               rw
unmaskirq               1               0               1               rw
using_dma               1               0               1               rw



So it seems that those settings are not working for tat particular device.
I would like to try Multi-word DMA/2 but how to set this mode via echo "using_dma:??????" > /proc/ide/hdc/settings ?

Who is responsible for setting the DMA-Mode for SCSI-Emulation?
It's not the hdparm script in /etc/init.d because it only affects the harddisks.

Greetz
Sulu
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Sat Jan 18, 2003 11:24 pm    Post subject: Reply with quote

sulu wrote:
Hi kerframil.

I think you are referring to this part of the error message:

Additional sense indicates Logical unit communication CRC error (Ultra-DMA/32)


Yes!

Quote:
This is what is reported in the kernel.log for the failed mount attempt.
I'm not sure if this error message is to be taken verbatim because i dont know how, where and what DMA-Mode is been set during startup for the CD-R. Please note that this is an issue with the CD-R not with the burner.


The burner and the CD-R drive are the same thing I believe! If you mean that you think the issue is with the CD-R media ... I doubt it. Read on ...

Quote:
This are the settings right after boot:
Code:

 > pts/0] cat /proc/ide/hdc/settings
name                    value           min             max             mode
----                    -----           ---             ---             ----
bios_cyl                0               0               1023            rw
bios_head               0               0               255             rw
bios_sect               0               0               63              rw
current_speed           66              0               69              rw
ide_scsi                0               0               1               rw
init_speed              12              0               69              rw
io_32bit                1               0               3               rw
keepsettings            0               0               1               rw
log                     0               0               1               rw
nice1                   1               0               1               rw
number                  2               0               3               rw
pio_mode                write-only      0               255             w
slow                    0               0               1               rw
transform               1               0               3               rw
unmaskirq               1               0               1               rw
using_dma               1               0               1               rw



So it seems that those settings are not working for tat particular device.
I would like to try Multi-word DMA/2 but how to set this mode via echo "using_dma:??????" > /proc/ide/hdc/settings ?


Ah. dev/hdc is your burner I presume. The answer is in that output (and also in a post of mine several posts on from the very beginning of this thread). See that current_speed is set to 66? Try something like this:
Code:
echo "current_speed:34" > /proc/ide/hdc/settings

I believe that will yield more desirable results! See http://linux-sxs.org/hdptune.html for some helpful information.

The kernel is responsible for choosing the settings, but may not always get it right. Put the echo line in your local.start file if you want to tweak settings upon boot. Include as many echo lines as you need. See the post I referred to for how hdparm switches correspond with the flags supported by the proc interface.

Also, don't run your burner using a 80-pin IDE cable, be sure to use a 40-pin one - AFAIK, no ATAPI device should use one of these "UDMA" cables which are often characterised by a blue connector on the mainboard side.

HTH.
Back to top
View user's profile Send private message
Twink
Apprentice
Apprentice


Joined: 06 Dec 2002
Posts: 178
Location: New Zealand

PostPosted: Sun Jan 19, 2003 4:56 am    Post subject: Reply with quote

well after stuffing up your instructions enuf to stop gentoo booting I decided to try using ATAPI with no scsi emulation, so doing a
(note I had to upgrade to cdrecord 2.0 first)

Code:

cdrecord -scanbus dev=ATAPI

Cdrecord 2.0 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jörg 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) 'ATAPI   ' 'CD-R/RW 6X4X32  ' '6.HU' Removable CD-ROM
        0,1,0     1) * ....


then using "cdrecord speed=x dev=atapi:0,0,0 image.bin" it seems to work fine, now just to either get this working with other programs or figure out how to burn seperate files (do I need to make a image first or is there an option to burn normal files?)
Back to top
View user's profile Send private message
sulu
Guru
Guru


Joined: 21 May 2002
Posts: 399
Location: Dornbirn/Austria

PostPosted: Sun Jan 19, 2003 5:58 am    Post subject: Reply with quote

kerframil:

Thanks for your reply.
Code:

echo "current_speed:34" > /proc/ide/hdc/settings


didnt solve the problem though.

Quote:

an 19 06:47:34 andy-linux kernel: SCSI cdrom error : host 1 channel 0 id 0 lun 0 return code = 28000000
Jan 19 06:47:34 andy-linux kernel: Current sd0b:00: sense key Hardware Error
Jan 19 06:47:34 andy-linux kernel: Additional sense indicates Logical unit communication CRC error (Ultra-DMA/32)
Jan 19 06:47:34 andy-linux kernel: I/O error: dev 0b:00, sector 80
Jan 19 06:47:34 andy-linux kernel: ISOFS: unable to read i-node block


Ah, I allready guessed that it should be a kernel issue since i found some of the error message above in the kernel mailing lists.
Maybe this is part of the "broken ide layer" Alan Cox talks about.

Quote:

Also, don't run your burner using a 80-pin IDE cable, be sure to use a 40-pin one - AFAIK, no ATAPI device should use one of these "UDMA" cables which are often characterised by a blue connector on the mainboard side.


Thanks for the hint but i do use one of this old fashioned 40-pin cables.


I'll have a look at http://linux-sxs.org/hdptune.html and see if something works.
If it does not help , aaargh my baby son hits the keyboard so lets sit him on the floor ':roll:', i stick to the pio-mode and wait for better times.


Twink:
Do you think cdrecord 2.0 would matter in that context ??
It would ease the setup anyway but does it have an effect on the detection of the correct DMA-Mode ?


Greetz
Sulu
Back to top
View user's profile Send private message
Twink
Apprentice
Apprentice


Joined: 06 Dec 2002
Posts: 178
Location: New Zealand

PostPosted: Sun Jan 19, 2003 11:27 am    Post subject: Reply with quote

well it doesn't require scsi to be installed, so I guess it would detect at whatever the normal ide drivers used to for you.
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Sun Jan 19, 2003 6:32 pm    Post subject: Reply with quote

Sulu,

I only have two more suggestions - one (which is obvious, I'm sure) is to make sure the echo command is issued as root and to check the setting did get applied. The second, is to try a newer kernel (something based on 2.4.20 - vanilla, or the gentoo-sources-2.4.20-r1). The new gentoo sources are considered experimental but have worked flawlessly for me. You can emerge like so:
Code:
ACCEPT_KEYWORDS="~x86" emerge gentoo-sources

then make sure the /usr/src/linux symlink is pointing to the correct sources.

Apparently, Andre Hedrick is maintaining the IDE layer again so things should get quite a lot better soon I hope.

If you elect to stick with the native ATAPI features of cdrecord 2.0 then you can use hdparm as normal.

As for burning individual files, cdrecord expects to use an ISO image I think. You use mkisofs to populate an ISO image. You can mount ISO images something like this:
Code:
mount -t iso9660 -o loop /myimage.iso /mnt/iso

and modify things under /mnt/iso as if it is a regular filesystem.

The many GUI front-ends should make this quite a lot easier, such as gtoaster. Multi-session burns allow you to add files onto an already burned CD (you must be sure not to fixate the first burn/session which will make it impossible to modify the CD again), but haven't done this at command-line level yet. With the front-ends, you may need to fiddle a bit with some of the settings so it uses the correct parameters in light of the fact that you are using IDE burner - they will all assume traditional SCSI mode (for now).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 3 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum