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
sulu
Guru
Guru


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

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

Twink:

Thats definitely an option. AFAIK cdrecord 2.0 is considered to be quite "experimental" but i think i'll use it when it will beome available in the "stable" gentoo-tree.


Kerframil:

You are a profound source of information.
Tanks ! :D

I'm using the vanilla-Kernel 2.4.20 and have bootable 2.145.19.r9 and 2.14.19.r10 gentoo-kernels.

But i definitely want too try the new gentoo-sources.

So let's copy n paste your hint for emergeing the new gentoo-kernel and bake another kernel.

Greetz
Sulu

PS: As fore the cdwriting programs/frontends. I like cdrecord, mkisofs and cdrdao. Just copy/paste from the shell history is the way i like to do it.
Back to top
View user's profile Send private message
Empty_One
n00b
n00b


Joined: 18 Oct 2002
Posts: 32

PostPosted: Tue Jan 21, 2003 8:34 pm    Post subject: Reply with quote

thanks, after re-reading the guide, and starting with a fresh kernel, I finally got cdrecord working. Thank you
_________________
"Barney sucks! Best Buy sucks! Sony Sucks! Microsoft sucks, Bill Gates is the anti-Christ and John Ashcroft can kiss my ass!" Wil Wheaton
Back to top
View user's profile Send private message
sulu
Guru
Guru


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

PostPosted: Wed Jan 22, 2003 11:54 am    Post subject: issue resolved Reply with quote

kerframil and Twink:

The new gentoo-sources (2.4.20-r1) solved the issue.
The CD-R now mounts without a hitch.

Thanks
Sulu
Back to top
View user's profile Send private message
ckpt-martin
n00b
n00b


Joined: 26 Jan 2003
Posts: 1

PostPosted: Sun Jan 26, 2003 7:29 pm    Post subject: cdrecord ATAPI support works!!! Reply with quote

I just wanted to confirm that cdrecord works with ATAPI support without the need of SCSI emulation. Just burned a couple of CDs with xcdroast!!

If "cdrecord -scanbus" doesn't detect anything, try "cdrecord -scanbus dev=ATAPI". You should see something now.
BTW. xcdroast auto-detected my SONY ATAPI CDRW.

Chris
Back to top
View user's profile Send private message
sulu
Guru
Guru


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

PostPosted: Mon Jan 27, 2003 7:40 am    Post subject: Reply with quote

Hey ! Sounds great.

Does this mean that you dont need the ide-scsi-emulation any more ??
Back to top
View user's profile Send private message
kerframil
l33t
l33t


Joined: 19 Apr 2002
Posts: 710
Location: London, UK

PostPosted: Mon Jan 27, 2003 9:50 am    Post subject: Reply with quote

Quote:
Does this mean that you dont need the ide-scsi-emulation any more ??

Yes, but as has already been discussed on this thread, the code is "extremely alpha". There is no guarantee it will work properly or safely, so if you already have SCSI emulation working I'd stick to it (for now) - unless you want to be on the bleeding edge ...
Back to top
View user's profile Send private message
Bonkie
Guru
Guru


Joined: 28 Oct 2002
Posts: 501
Location: Antwerpen, Belgium

PostPosted: Mon Jan 27, 2003 11:51 pm    Post subject: Re: Kernel SCSI emulation for CD burning - the truth Reply with quote

kerframil wrote:
... [cut]

Both techniques are working for me just fine on three different machines so far! The only thing I have not tested heavily is with primary/slave combinations of CD/CD-R/DVD devices on the same channel.


Well no support question, but I have an TEAC cdrom on hdc and a Plextor CDRW on hdd and i can't get my cdrw to work. Tried everything you suggested so now you know :) Currently i'm recompiling the kernel with atapi cdrom support as a module ...

[Addendum Tuesday]

Just recompiled my kernel with ide-cdrom support as a module (and not autoloaded). Now it works ...
Back to top
View user's profile Send private message
kerframil
l33t
l33t


Joined: 19 Apr 2002
Posts: 710
Location: London, UK

PostPosted: Mon Feb 03, 2003 1:33 pm    Post subject: Reply with quote

Quote:
Just recompiled my kernel with ide-cdrom support as a module (and not autoloaded). Now it works ...

Upon rebuilding my system recently, I ran into a similar issue. I found that unloading (rmmod) the ide-cdrom module, then loading the SCSI module with insmod ide-scsi solved the problem. What is interesting is that this worked without having to add the module definition to restrict the scope of the ide-cdrom module. In any case, upon adding this definition again, everything worked as it did before (no need for jiggery-pokery after booting my system).
Back to top
View user's profile Send private message
torque2k
n00b
n00b


Joined: 08 Aug 2002
Posts: 29
Location: MI

PostPosted: Thu Mar 20, 2003 9:28 pm    Post subject: Need to update the first post... Reply with quote

I'd like to add to the "Thank you"'s here; this helped me get my LG CDRW running fine!

One point of contention, though: If one is following through the steps and performing them as they read them (I know, read the info through FIRST), they will miss this:

Quote:
Not so fast though! I forgot to mention that modules.conf in Gentoo is dynamically generated, so you really don't want to edit the modules.conf file directly to add the exclusion line mentioned above, otherwise it'll get nuked at the next reboot. Instead, do this:
Code:
echo "options ide-cd ignore='hdc hdd'" > /etc/modules.d/cdr



It needs to be moved up in the document...
_________________
INTEL INSIDE:
It's not just a label, it's a warning...
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 737
Location: US-FL-EST

PostPosted: Wed Mar 26, 2003 1:42 am    Post subject: What about the 2.5.xx kernel?? Reply with quote

What's recommended for setting up a cd-rom and a cd-r/w (/dev/hdg and /dev/hdh respectively) when going up to the 2.5.65 kernel?

Please!!!

;-)
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
bleakcabal
Guru
Guru


Joined: 10 Oct 2002
Posts: 301
Location: Montreal, Québec, Canada

PostPosted: Wed Mar 26, 2003 5:09 pm    Post subject: Re: cdrecord ATAPI support works!!! Reply with quote

ckpt-martin wrote:
I just wanted to confirm that cdrecord works with ATAPI support without the need of SCSI emulation. Just burned a couple of CDs with xcdroast!!

If "cdrecord -scanbus" doesn't detect anything, try "cdrecord -scanbus dev=ATAPI". You should see something now.
BTW. xcdroast auto-detected my SONY ATAPI CDRW.

Chris


I have done :
cdrecord -scanbus dev=ATAPI

And that prints this :
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:
cdrecord: Warning: controller returns wrong size for CD capabilities page.
0,0,0 0) 'ASUS ' 'CD-S500/A ' '3.1H' Removable CD-ROM
0,1,0 1) 'LG ' 'CD-RW CED-8080B ' '1.06' 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) *

That's all fine and all, and it seems to be doing something but what ? I could already mount my CDR as a CD before and after doing this and all my CDR still don't seem to want to write with my CDR.

Xcdroast says it doesnt see any scsi devices and that for ATAPI device I have to install scsi emulation first, but I have already compile in the kernel all the options mentioned in the gentoo help documents and the first post of this thread. I also followed the instructions in the install doc but not those of the first post as it said it was for SCSI emulation and now cdrtools had ATAPI emulation.

Do I need to do something to say this ( I have one CD and one CDR ) device must run scsi emulation ?

My CDR programs still don't work, is there something I should do next ?
Back to top
View user's profile Send private message
RayVan
n00b
n00b


Joined: 12 Aug 2002
Posts: 40
Location: Houston, Tx

PostPosted: Thu Mar 27, 2003 7:36 pm    Post subject: Reply with quote

You can add the ide-scsi module to modules.autoload as the poster suggested, but this solution sucks. What's the point of compiling it as a module if you /always/ load it? Fortunately, there's a better (and more correct) way. :wink:

The file /etc/modules.devfs is an 'overlay' to the modprobe config file used by devfsd. This file holds aliases that allow devfsd to tell modprobe to automatically load needed modules when devfsd creates new devices. For example....

Quote:
# All SCSI devices
probeall /dev/scsi scsi_hostadapter sd_mod sr_mod st sg


As you can see, this part of the file automatically loads the scsi drivers whenever /dev/scsi is touched. There are other sections for specific types of scsi devices, but the important part is that they all include 'scsi_hostadapter'. This is where you put your low-level scsi device drivers. To do this, add the following line to a file in the /etc/modules.d directory.

Quote:
probeall scsi_hostadapter ide-scsi


If you have 'real' SCSI devices, add them after ide-scsi. Now, the ide-scsi driver will be automatically loaded ONLY when you need it. This is superior to passing 'hdc=ide-scsi' to the kernel at boot, because it allows to module to be autoloaded, instead of forcibly loaded at boot. It will also automatically reload the module if necessary.

If you also need ide-ccd, and want it to ignore your ATAPI drive, you can use kernel options (as people have noted), but that way sucks because it
The 'better' way is to tell the ide-cd driver to ignore your ATAPI drive by passing it options through modprobe (i.e. add
Quote:
options ide-cd ignore='hdc'
to a file in /etc/modules.d).

FYI, modules such as sr_mod, sg, and scsi_mod do NOT neet to be in modules.autoload. These modules are loaded automatically by devfsd when needed, per the entries in modules.devfs. If they aren't being autoloaded, putting them in modules.autoload is just covering up the problem instead of fixing it. You can pretty much eliminate the need for modules.autoload completely by properly setting up modprobe and devfs, and you get the added benefit of only loading modules when you need them.
Back to top
View user's profile Send private message
kerframil
l33t
l33t


Joined: 19 Apr 2002
Posts: 710
Location: London, UK

PostPosted: Mon Apr 07, 2003 11:10 am    Post subject: Reply with quote

RayVan wrote:
You can add the ide-scsi module to modules.autoload as the poster suggested, but this solution sucks. What's the point of compiling it as a module if you /always/ load it? Fortunately, there's a better (and more correct) way. :wink:

Indeed. And that isn't made entirely clear, admittedly. I recommend the alteration of the devfsd.conf file for this very reason, however ...
Quote:
probeall scsi_hostadapter ide-scsi

... I wasn't aware of this and, as it enables ide-scsi to load automatically in addition to sg, sr_mod, scsi_mod, it is a very useful modification to make. Thanks for sharing that, I'll update the post at some point.

Quote:
If you also need ide-ccd, and want it to ignore your ATAPI drive, you can use kernel options (as people have noted), but that way sucks because it
The 'better' way is to tell the ide-cd driver to ignore your ATAPI drive by passing it options through modprobe (i.e. add
Quote:
options ide-cd ignore='hdc'
to a file in /etc/modules.d)

That is precisely the reason my post was made and, as such, this is recommended in my procedure. I appended the "old fashioned" method of using a kernel boot option simply because the "exclusion" method does not work on all configurations as has been noted and widely discussed. Until this is no longer the case, it would be unwise of me to omit this method of configuration from the instruction, although this point could be clarified further perhaps.

Quote:
FYI, modules such as sr_mod, sg, and scsi_mod do NOT neet to be in modules.autoload. These modules are loaded automatically by devfsd when needed, per the entries in modules.devfs. If they aren't being autoloaded, putting them in modules.autoload is just covering up the problem instead of fixing it.

Well I wouldn't call it a problem as such, although you are right - it's sub-optimal from the point of view of configuration cleanliness! The modules certainly are loaded automatically, having made the necessary devfsd tweaks. The long and short if it is that I hadn't sussed out the usage of probeall, and this discovery is an important one.

I will perform a few tests, then clean up the post. Thanks.
Back to top
View user's profile Send private message
DefconAlpha
Apprentice
Apprentice


Joined: 25 Feb 2003
Posts: 151
Location: Alabama

PostPosted: Mon Apr 07, 2003 3:03 pm    Post subject: LOL Reply with quote

Been doing this for months... Oh well. :P
_________________
In the end, the love you get is equal to the love you make
--John Lennon & Paul McCartney (The End - Abbey Road,
Back to top
View user's profile Send private message
sarumont
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2002
Posts: 94
Location: /dev/urandom

PostPosted: Wed Apr 16, 2003 1:31 am    Post subject: Reply with quote

I just wanted to throw up my final working config in case it might help someone.
I have ATAPI CDROM support, SCSI Emulation, SCSI CDROM and SCSI generic all
compiled as modules. I have no kernel commands in my grub.conf for hdc/hdd (CDR
and DVD). I also don't have the cdr file in my /etc/modules.d. I loaded none
of the SCSI or CD modules in modules.autoload, but I noticed after boot that
everything except ide-scsi loaded automatically.

At this point, cdrecord -scanbus showed nothing (giving the unable to access
SCSI driver error) although cdrecord -scanbus dev=ATAPI showed my DVD-ROM, but
not my CDR. Then I used modprobe ide-scsi, tried both scanbus's again and
showed my DVD as ATAPI and my CDR as SCSI.

Thanks for the direction, kerframil, and I hope this helps at least one other who
wants CDR SCSI emulation without sacrificing their DVD-ROM.
_________________
~Sarumont
"Time is an illusion. Lunchtime doubly so."
Back to top
View user's profile Send private message
bleakcabal
Guru
Guru


Joined: 10 Oct 2002
Posts: 301
Location: Montreal, Québec, Canada

PostPosted: Wed Apr 16, 2003 9:08 pm    Post subject: Reply with quote

options ide-cd ignore='hdc hdd'

How do I know what is the device "name" of my cd-drives ?
Back to top
View user's profile Send private message
David_Escott
l33t
l33t


Joined: 12 Jan 2003
Posts: 952
Location: Boston, MA

PostPosted: Wed Apr 16, 2003 11:14 pm    Post subject: Reply with quote

hda is the primary drive on the first controller, hdb the secondary on the first controller, hdc the primary on the second controller, hdd the secondary on the second controller, etc.


Look at the files:
/proc/ide/ide*/*/model

to find out which one it is. Usually the first cdrom is hdc and the second is hdd.
Back to top
View user's profile Send private message
Beekster
Apprentice
Apprentice


Joined: 26 Nov 2002
Posts: 268
Location: Sydney

PostPosted: Thu Apr 17, 2003 7:45 am    Post subject: Reply with quote

At least we are not alone in being frustrated with this issue.

Alan Cox writes that:-
Quote:
2.4.20 is kind of the nailing together of the old IDE as best as
possible. 2.4.21 is the IDE updates. It isnt perfect yet but its a lot
lot better.


I've tried too many times to get the DVD on IDE and the CD/rw on ide-scsi with 2.4.20-Gentoo and Gaming, although the vanilla 2.4.20 did work as expected (for me) as does 2.4.19-Gentoo-r10 and 2.5.67.

/me hopes 2.4.21 (Gentoo & Gaming) gets it right &/or 2.5.x gets lm_sensors working soon!
Back to top
View user's profile Send private message
oiper
Guru
Guru


Joined: 01 May 2003
Posts: 316
Location: Alabama, US

PostPosted: Sat May 03, 2003 8:27 am    Post subject: This might help somebody. Reply with quote

http://forums.gentoo.org/viewtopic.php?p=171479#171479


synic posted (here http://forums.gentoo.org/viewtopic.php?p=171479#171479 ),

Quote:

This works for you guys that want to enable DMA for ide-scsi devices.

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

of course, change hdc to the device name that the drive would have if it


Worked great for me! :roll:
Back to top
View user's profile Send private message
link97381
n00b
n00b


Joined: 29 Mar 2003
Posts: 34
Location: Silverton Oregon

PostPosted: Sat May 10, 2003 11:05 am    Post subject: Reply with quote

A little tip and a question...
you can also set your usb up to autoload in modules.d much like the probeall scsi_hostadapter ide-scsi. Mine reads "probeall usb-interface usb-ohci ehci-hcd" usb-ohci and ehci-hcd being my usb controllers. you may have a usb-uhci or just a uchi controller.

And then my question when I have "probeall scsi_hostadapter ide-scsi" in my modules.d it will load both my DVD and CDRW as scsi drives and the only way I know to get around it is to add ide-cd to my modules.autoload file. Is that the only way to get it to work or is there a way where the ide-cd is loaded as needed like the scsi drivers?

Thanks for any help
Back to top
View user's profile Send private message
cybermans
Apprentice
Apprentice


Joined: 04 Apr 2003
Posts: 193

PostPosted: Tue May 27, 2003 12:57 pm    Post subject: Reply with quote

i have done your guide but now i have 6 dvdroms and 6 cdrecorders (when i look to my machine i count only 2 in total). Is this normal? and how the hell can i fix this
_________________
My weBlog
Linux compability list (hardware)
Back to top
View user's profile Send private message
silux
Tux's lil' helper
Tux's lil' helper


Joined: 24 May 2003
Posts: 92

PostPosted: Thu May 29, 2003 12:28 am    Post subject: Newbie question -- mount or burn do I have to choose? Reply with quote

Okay I know that this is probably a very very stupid question and I appologize for wasting everyones time who is reading this. Basically I followed the instructions from the original post in this thread (very good btw and I very much appreciate it) but now I have the following delema: When I load up everything with scsi emulation I have no idea how to mount my cdrom and dvd-rom drive

I'm sure its just a matter of changing /etc/fstab but I dont' know what I'm doing ... as in I don't know what the dev paths are for scsi hardware and such. So at the moment I seem to be left with the delema of being able to get cdbakeoven to recognize my "scsi" drive or being able to mount the drive.

If someone could post a reply with the fstab line I should use or tell me what I'm doing wrong I'd appreciate it.

--->>>> oh also just a suggestion ... it would be really nice if this was in the official gentoo docs since there is no documentation there for setting up a cd-r. Not sure who actually makes that decision though.
Back to top
View user's profile Send private message
link97381
n00b
n00b


Joined: 29 Mar 2003
Posts: 34
Location: Silverton Oregon

PostPosted: Thu May 29, 2003 5:51 am    Post subject: Reply with quote

The easiest thing to do is edit your /etc/devfsd.conf file fine the part that looks like this
Code:
# Create /dev/cdrw for the first cdrom on the scsi bus
# (change 'sr0' to suite your setup)
LOOKUP          ^cdrw$          CFUNCTION GLOBAL mksymlink sr0 cdrw
REGISTER        ^sr0$           CFUNCTION GLOBAL mksymlink $devname cdrw
UNREGISTER      ^sr0$           CFUNCTION GLOBAL unlink cdrw
except it'll all be commented out. Just uncomment it then all you have to do(after rebooting) is do a mount /dev/cdrw to mount your cdrw. then cut and paste that same section except for change the cdrw's in it to dvd and then also change the sr0's to sr1. But that is of course assuming that the CDRW is the primary device and the DVD is the secondary.......if your setup is the other way around then just switch the sr0's and sr1's Hope this helps
Back to top
View user's profile Send private message
silux
Tux's lil' helper
Tux's lil' helper


Joined: 24 May 2003
Posts: 92

PostPosted: Tue Jun 03, 2003 5:56 pm    Post subject: nice tht worked great :-) Reply with quote

I guess if I understood devfs I probably would have figured that out eventually but thank you so much for pointing that out to me... now I can mount my drives and write my cd's woot
Back to top
View user's profile Send private message
silux
Tux's lil' helper
Tux's lil' helper


Joined: 24 May 2003
Posts: 92

PostPosted: Tue Jun 03, 2003 6:02 pm    Post subject: nice tht worked great :-) Reply with quote

I guess if I understood devfs I probably would have figured that out eventually but thank you so much for pointing that out to me... now I can mount my drives and write my cd's woot
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 4 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