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 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: Mon Oct 28, 2002 2:31 pm    Post subject: Kernel SCSI emulation for CD burning - the truth Reply with quote

30/12/2002 EDIT: Hooray! cdrtools-2.0 is out and guess what, is has ATAPI transport support. That could mean that we Linux users no longer have to use this SCSI emulation madness to burn CDs on IDE burners, as BSD users have been able to for some time with burncd!Type:
Code:
cdrecord dev=HELP
for more info after emerging the new version. No, I haven't tested it yet ... :-)


Hi,

I just wanted to dispel a few myths about enabling SCSI emulation for IDE devices, that is, setting up Linux so that you can use an IDE CD burner.

These myths are:
  • You have to statically compile in certain SCSI-related kernel features and/or leave IDE CD-ROM support out completely.
  • You have to specify a kernel option in your bootloader (e.g. hdc=scsi)
In fact, neither of these statements is true. You can compile all of the related kernel features as modules (meaning you can go back to regular IDE support without recompiling your kernel) and there is no requirement to modify your bootloader. Here's how I did it (note that you are assumed to be root in all code examples except where an su command is shown):

First, compile your kernel with the relevant options (I compiled them as modules in all cases, except where noted):

IDE Options

Include IDE/ATAPI CD-ROM support
SCSI Emulation support

SCSI Options

SCSI Support
SCSI CD-ROM Support
Enable Vendor-Specific Extensions (this is a simple 'Yes' option, no module)
SCSI Generic Support

OK, now recompile and enable your kernel and modules in the usual fashion. Now here's the trick (you may as well do this before you reboot):

Add a line to your /etc/modules.conf as follows:
Code:
options ide-cd ignore='hdc hdd'

This simply tells the ide-cd module (which would otherwise drive your CD/CD-R devices) to ignore /dev/hdc and /dev/hdd, one of which is normally going to be your CD-R device. You can change the device name as necessary for exclusion. It's as simple as that. Upon rebooting, the sg device should be loaded for you (use lsmod to confirm). If it isn't loaded for you, then load it manually as thus:
Code:
su
modprobe sg
exit

or add it to /etc/modules.autoload
You'll probably want to change your /etc/devfsd.conf file so that non-root users can probe and use the CD-R device without jumping through hoops. Simply search for the following line in your devfsd.conf:
Code:
#REGISTER      ^scsi/host.*/bus.*/target.*/lun.*/generic    PERMISSIONS root.cdrw 660

and remove the # symbol from the beginning of the line so that it is no longer commented. Now send a SIGHUP signal to devfsd so that it reloads the configuration:
Code:
kill -s SIGHUP `ps -C devfsd -o pid=`

Ensure that your user account is a member of the "cdrw" group. Example:
Code:
usermod -g kerframil -G cdrw,users kerframil

Now all that is necessary for your CD-R device to be detectable is to load the ide-scsi module:
Code:
su
modprobe ide-scsi
exit
cdrecord -scanbus

and your CD-R device should show up to prove it's working. Notice how it was possible to probe the CD-R device without having to be a superuser, thanks to the magic of devfs. You'll probably want to add that module to your /etc/modules.autoload file so that it loads automatically. Of course, you don't have to run a regular CD-ROM (not CD-R) device with SCSI emulation if you don't want to, but I suspect it would be beneficial for on-the-fly CD duplication.

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


That should ensure that that line is sourced into the modules.conf file every time the computer boots. You can call the file something other than "cdr", just so long as it's there.

By removing that file from /etc/modules.d, or by commenting the options line out, you should be able to go straight back to the regular IDE driver for your devices. In fact, it should be possible to switch between IDE and SCSI emulation mode live.

When you actually get round to recording any CDs ;-) the chances are that you will be using cdrecord to do it, even if you're using a frontend such as gtoaster, xcdroast and the like. If you intend to burn CDs while logged in as an ordinary user then you should consider setting the SUID bit on the cdrecord binary so that it runs as root. This will enable it to issue a setpriority() interface call which in turn will better protect you from the dreaded buffer underrun problem ...
Code:
su
chmod +s /usr/bin/cdrecord

For the record, this method was tested with a gentoo-sources-r10 kernel, on an up-to-date gcc-3.2 based system, on three different machines so far.

EDIT revision 2: Well, I got round to trying this out on several more machines and I have found that the above technique has worked every time. You should uncomment the line to allocate permissions to non-root users in devfsd.conf, and should make sure ide-scsi module is loaded but that's it. Some of this wasn't made clear (I incorrectly implied that it wasn't necessary to load ide-scsi module to use a CDR device before) so I've edited the above to improve the tutorial. For those reading for the first time, scroll down to read about the background behind this but basically some people are saying that this technique doesn't work for them; they must (apparently) still specify a special boot-time option for the kernel, and disable IDE-CDROM support which is how most guides tell you to do it. I'm not trying to be contradictory but the fact is that I have still yet to find personal evidence to support this, that is, it works for me every time. If you do run into problems, then the above tutorial will still work - however, observe the following differences in approach:
  • You won't need to create the cdr file in your /etc/modules.d
  • You'll need to add append="hdc=ide-scsi" to your kernel boot options. You can do that in /boot/grub/menu.lst. Change hdc according to the device that your IDE CD-R would normally have been assigned.
Regardless as to the merits of either technique, I still maintain that it is a myth that you need to exclude IDE-CDROM support. 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.


Last edited by 474 on Mon Dec 30, 2002 10:39 am; edited 12 times in total
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1398
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Mon Oct 28, 2002 4:55 pm    Post subject: Reply with quote

Wow, that is really valuable information for people who have both a CD-RW and DVD-ROM that are both E-IDE drives! Now such people can have SCSI-Emulation for the CD-RW and none for the DVD-ROM!!

Previously I read the help information (which must be out of date now given your results and findings, but is still in my kernel sources) during 'make menuconfig' for the SCSI-Emulation and it indicates that you MUST NOT (cannot) have support for ‘IDE CD-ROMs’ in order for SCSI-Emulation to work, which is really very restrictive. I really appreciate you posting this information which has freed me from the oppression of ignorance about the facts which you posted! Thanks so much! A true Tip/Trick!!!!

Regards,
BonezTheGoon
Back to top
View user's profile Send private message
helmers
Guru
Guru


Joined: 16 Sep 2002
Posts: 553
Location: Stange, Norway

PostPosted: Mon Oct 28, 2002 7:06 pm    Post subject: Reply with quote

Yeah, this guide is long needed ;)

However, from what I've found (and read) the following is not needed:

Quote:
SCSI CD-ROM Support (maybe, see below)
Enable Vendor-Specific Extension


And if you don't need to change between recording / normal IDE-CD mode, you can compile everything kerframil said right into the kernel (except the one mentioned above) and just add "hdx=ide-scsi" to the kernel line in grub(where x= your cdr device).


UPDATE: Arkane has a point, you may need SCSI CD-ROM support. I've never needed it, but you may. ;)

--
Regards,
Helmers


Last edited by helmers on Mon Oct 28, 2002 8:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Mon Oct 28, 2002 7:27 pm    Post subject: Reply with quote

helmers wrote:
Yeah, this guide is long needed ;)

However, from what I've found (and read) the following is not needed:

Quote:
SCSI CD-ROM Support
Enable Vendor-Specific Extension



I ran into an issue once where I forgot to put in SCSI CD-ROM Support and it would only have the sg device, and no sr0 device. Once I created the scsi cd-rom support module, everything was great.
So, in my experience, it is a necessary thing.
Back to top
View user's profile Send private message
Oo.et.oO
Apprentice
Apprentice


Joined: 23 Apr 2002
Posts: 291
Location: burlington

PostPosted: Mon Oct 28, 2002 8:29 pm    Post subject: one device using ide-cdrom AND ide-scsi/sr_mod? Reply with quote

hi all,
thanks for finally posting this. there is so much crud in here it must be hard for people to really know how to do this, and what is the "best" way for THEIR prefs and hardware.

nowthen, i have one cdrw drive and would like to use it as cdrom and cdrw (of course).
i have a few questions, not sure if anyone can answer them. all my stuff is and can be compiled as modules, please don't suggest i do otherwise. :P

i have a feeling that reading from a cdrw (or cdrom or dvd) through ide-scsi emulation is a less than optimal solution. I would love to get some stats on this when i have time... (maybe with dma turned on and off too...?)
I can of course modprobe ide-cdrom (or whatever it's called) and access /dev/hdc just fine.
I can also modprobe ide-scsi and access /dev/scsi/host0/bus0/target0/lun0/cd just fine for both reading and writing.

so, is it possible to read from /dev/cdrom (symlink to /dev/hdc) and use the ide-cdrom driver only.
while (not simultaneously) read/write to /dev/cdrw (symlink to /dev/scsi/host0/bus0/target0/lun0/cd with the ide-scsi interface?

i know i can do this with several rmmod/modprobe steps between. I have written simple scripts to do this. but have been looking (not very hard) for a more elegant solution.

i have also been thinking about devfs and how this plays in. if the modules are not loaded (ide-scsi for instance) when devfs is mounted, what happens to devfsd.conf?
what happens after i change devfsd.conf? do i have to remount devfs?

oh, and here is a list (in order) of the modules needed to use a single cdrw (minimal complied in (none) ):
read:
Module Size Used by Not tainted
ide-scsi 8784 1
sr_mod 14232 2 (autoclean)
cdrom 29184 0 (autoclean) [sr_mod]
scsi_mod 55844 3 (autoclean) [sg ide-scsi sr_mod]
isofs 19332 1 (autoclean)

isofs is assuming the cd is an iso9660 fs.

write:
Module Size Used by Not tainted
ide-scsi 8784 0
sg 28076 0 (autoclean)
scsi_mod 55844 2 (autoclean) [ide-scsi sg]


oh, one more question, i swear...
why oh why does ide-scsi module not autoload when i need it (no modules.autoload is not an option) loading modules at boottime that you may never need is not what i'd call an elegant solution.

bye!
-eric
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1398
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Mon Oct 28, 2002 8:42 pm    Post subject: Reply with quote

I have not seen/felt any performance loss with using a CD-RW drive as SCSI-Emulation full time. I don't think you should worry about it. If someone has some drastic numbers and a very convincing case I could change my stance. But, like I said before, I have no reason to be suspicious given my system feels like the same level of performance (same drive first I didn't use SCSI-Emulation because I didn't know I needed to -- but used the system for a while this way, then later figured out how to use SCSI-Emulation so that I could burn CD's) -- Maybe I am whacko though. Anyone with any numbers to add into the mix here and possibly clear up some concerns?

Regards,
BonezTheGoon
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue Oct 29, 2002 11:35 am    Post subject: This and that Reply with quote

Quote:
so, is it possible to read from /dev/cdrom (symlink to /dev/hdc) and use the ide-cdrom driver only.
while (not simultaneously) read/write to /dev/cdrw (symlink to /dev/scsi/host0/bus0/target0/lun0/cd with the ide-scsi interface?

Hmm, sounds problematic. As far as any OS kernel is concerned, one driver can have a "lock" on a hardware device or set of devices, but you can't really have more than one driver claiming that device belongs to it. I can empathise with your reasons for wanting to do this, but even if you can (I'm not sure how) it sounds dangerous. Maybe if you could somehow "wrap" your mount command, so that when you mount the device, it uses the ide-cdrom driver, but when it is not mounted it reverts to ide-scsi, because you don't want a mount when you're burning, right? That would maybe be clean and transparent enough. But for it to really be a proper solution (so that it works at API level), I suspect you'd have to patch the kernel. If you find some way with devfs or whatever, then please share it!

Quote:
I have not seen/felt any performance loss with using a CD-RW drive as SCSI-Emulation full time. I don't think you should worry about it.

I've haven't conducted any benchmarks here, but I'm inclined to agree. By way of comparison, Windows uses an ASPI interface for burning and ripping even if you have an IDE device! And I've used ePSXe (an excellent PSX emu, also available for Linux - emerge epsxe) on Windows, and the ASPI CD-ROM driver actually works better (less stutter in MDEC movies and XA audio) than the W2K/W9x driver on my Winblows installation. OK, I know we're dealing with Linux here. Some DVD benchmarks would probably be useful, due to the higher bandwidth demands.

On that note, here is another tip I'd like to share which is very relevant - I have often seen complaints that you cannot run hdparm on an IDE device running with SCSI emulation. What many people don't seem to realise is that the /proc virtual filesystem in Linux is also has write options. By way of explanation, let's assume your CD-R device has been initialised with SCSI emulation. But you really want to turn the DMA option on ... here's how (as root):
Code:
echo "using_dma:1" > /proc/ide/hdc/settings

You can determine the actual settings with:
Code:
cat /proc/ide/hdc/settings

Of course, you can change "hdc" as necessary. You can change any of the usual settings/parameters by using this technique. There are also many useful proc files which you can cat that will help you determine configuration information, where things are on which buses and so forth.

EDIT: Here's a little list of pertinent settings and their equivalent hdparm switches:
Code:
io_32bit      -> "-c"
current_speed -> "-X"
unmask_irq    -> "-u"
using_dma     -> "-d"
keepsettings  -> ??? maybe setting this to 1 means it will remember config?
Back to top
View user's profile Send private message
Oo.et.oO
Apprentice
Apprentice


Joined: 23 Apr 2002
Posts: 291
Location: burlington

PostPosted: Tue Oct 29, 2002 3:01 pm    Post subject: Re: This and that Reply with quote

kerframil wrote:

Hmm, sounds problematic. As far as any OS kernel is concerned, one driver can have a "lock" on a hardware device or set of devices, but you can't really have more than one driver claiming that device belongs to it.


i know that the above is true. i was wondering if there could be a way to load/unload modules on the fly. or maybe similar to what you say have the drivers share ownership?
but i don't know if this is worth the trouble due to possibly negligable performance increases... not to mention the overhead of swapping modules or negotiating for ownership...

Quote:
If you find some way with devfs or whatever, then please share it!


i doubt i'll do this anytime soon as i can't even get devfs to give me the proper permissions unless i load the modules, then HUP devfsd (see below).

Quote:
I've haven't conducted any benchmarks here, but I'm inclined to agree. ...
Some DVD benchmarks would probably be useful, due to the higher bandwidth demands.


i have to be inclined to agree myself, even though i brought it up. I just think it feels wrong. :)
so i would like to do some quick benchmarks.
does anyone know how to get hdparm to work at all on a ide-scsi emulated cdrom? i know you can set the params in /proc as above. but how can i do:
Code:
hdparm -tv /dev/scsi/host0/bus0/target0/lun0/cd

?
i get:
Code:
/dev/scsi/host0/bus0/target0/lun0/cd not supported
by hdparm

what i planned to do was load the ide-cdrom module and do:
Code:
hdparm -tv /dev/hdc


which should work. do i only get the /dev/hdc link when i have the ide-cdrom module loaded (prolly a silly question)?

on a related note:
i've observed something funny (well, i think it's strange anyway) about devfsd and modules.

if i load a module after devfsd is running, say ide-scsi, i don't get the correct permissions on the device (root only).
i don't really want to load all these modules at boot time, because that is silly, although it's a simple solution.
so right now i have to su to root, load the sg and ide-scsi modules (and deps) then HUP devfsd
then i can use cdrw as normal user. how is this handled when a USB device is inserted? does devfsd only update every now and then? on interupt? it would be great if as a normal user i could just do:
Code:
cdrecord -scanbus

and the kernel would load sg (and deps) and update devfs or whatever it has to do, and away i go... then after the timeout the cdrw modules are unloaded...

one thing that is interesting is that i can always mount a cdrom as long as the ide-scsi module is loaded, even if i don't HUP devfsd

anyone with insight?

sorry if we are OT
-eric
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue Oct 29, 2002 4:10 pm    Post subject: Re: This and that Reply with quote

Quote:
what i planned to do was load the ide-cdrom module and do:
Code:
hdparm -tv /dev/hdc


which should work. do i only get the /dev/hdc link when i have the ide-cdrom module loaded (prolly a silly question)?


Yup, hdparm is braindead and it's high time this behaviour was changed. The method you mention will work, but yes, it is ugly. As for the /dev/hdc link - no, I don't think you will get that link with the ide-cdrom module. But you should still be able to reference the device node directly.

Quote:
if i load a module after devfsd is running, say ide-scsi, i don't get the correct permissions on the device (root only).
i don't really want to load all these modules at boot time, because that is silly, although it's a simple solution.
so right now i have to su to root, load the sg and ide-scsi modules (and deps) then HUP devfsd
then i can use cdrw as normal user. how is this handled when a USB device is inserted? does devfsd only update every now and then? on interupt? it would be great if as a normal user i could just do:
Code:
cdrecord -scanbus

and the kernel would load sg (and deps) and update devfs or whatever it has to do, and away i go... then after the timeout the cdrw modules are unloaded...


It appears that a new sys-apps/baselayout ebuild has been made available (just emerged it now), which has a new devfsd.conf. Check out these new lines here:
Code:
# Give the cdrw group write permissions to /dev/sg0
# This is done to have non root user use the burner (scan the scsi bus)                                             
#REGISTER        ^scsi/host.*/bus.*/target.*/lun.*/generic    PERMISSIONS root.cdrw 660

Needless to say, I reckon you should emerge it, update your config files in /etc, and make sure you're a member of the cdrw group :) Looks like the relevant lines need to be uncommented though. Can't wait to test this myself ...

Yes the autoloading and unloading thing would be pure magic! Maybe the best thing to do is check the kernel docs for the maintainer and lobby them to provide this feature. I'm sure the symbiosis between devfsd and kernel modules is quite important and will certainly mature with time, but the best think we can do is to join the mailing lists for the relevant technologies and make our suggestions and feedback heard, what do you think?
Back to top
View user's profile Send private message
Oo.et.oO
Apprentice
Apprentice


Joined: 23 Apr 2002
Posts: 291
Location: burlington

PostPosted: Tue Oct 29, 2002 4:37 pm    Post subject: Re: This and that Reply with quote

kerframil wrote:

Yup, hdparm is braindead and it's high time this behaviour was changed. The method you mention will work, but yes, it is ugly. As for the /dev/hdc link - no, I don't think you will get that link with the ide-cdrom module. But you should still be able to reference the device node directly.


so, i still have to access the node directly...
what about the scsi emulated node? that doesn't seem to work. it doesn't do that much good to just time the reads from the ide-cd interface if i can't compare to scsi emu .

Quote:
It appears that a new sys-apps/baselayout ebuild has been made available (just emerged it now), which has a new devfsd.conf. Check out these new lines here:
Code:
# Give the cdrw group write permissions to /dev/sg0
# This is done to have non root user use the burner (scan the scsi bus)                                             
#REGISTER        ^scsi/host.*/bus.*/target.*/lun.*/generic    PERMISSIONS root.cdrw 660

Needless to say, I reckon you should emerge it, update your config files in /etc, and make sure you're a member of the cdrw group :) Looks like the relevant lines need to be uncommented though. Can't wait to test this myself ...


this works! :D
i just replaced my old cdrw line with this new one, which sets perms for all generic (as seen in the line).
i HUP'd devfsd and removed the sg module.
then went back to normal user, did cdrecord -scanbus and it loaded the modules and i got a bus scan! yipeeee!

Quote:
Yes the autoloading and unloading thing would be pure magic! Maybe the best thing to do is check the kernel docs for the maintainer and lobby them to provide this feature. I'm sure the symbiosis between devfsd and kernel modules is quite important and will certainly mature with time, but the best think we can do is to join the mailing lists for the relevant technologies and make our suggestions and feedback heard, what do you think?


it looks like a lot of my concern was alleviated by the updated devfsd.conf. i'm just getting the hang of that thing as this is the first install i've had with a full devfs implementation. i think before i lobby anyone for all that driver nuttiness we/i should get the benchmarks from the scsi device. i'd love to just be able to use hdparm, but if not it's not too hard to just read data and time and clear the buffer. i've done that before professionally...
now, where did that free time go that i need to do that?
:roll:

thanks for all the info kerframil!
good find on the baselayout update!
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Tue Nov 05, 2002 8:02 pm    Post subject: Re: Kernel SCSI emulation for CD burning - the truth Reply with quote

kerframil wrote:
and/or leave IDE CD-ROM support out completely.

Is it possible that this myth is true for some motherboards or chipsets? Leaving off IDE CD-ROM support seemed to fix cdrecord -scanbus finds no devices. What now?.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue Nov 05, 2002 8:22 pm    Post subject: Reply with quote

Acknowledged, thanks. I'll make an edit pointing out this possibility. It would be nice to get some more feedback.

This is probably a red herring but I notice that sheepdog said he changed his modules.conf. Those changes won't be persistent across a reboot but I think that's made clear enough.

Interestingly enough (and in a strange inversion), the stimulus for this thread was finding that the conventional approach did not actually work for me! That is, using the kernel option hdc=ide-scsi did not work on what was my first attempt to use a CD-R device under linux (although not my first attempt to use SCSI emulation)! That was on a i440BX/PIII-450 Dell system. I've set up another installation on an i810 board (not that much different I suppose), so that could be a candidate for testing. I'd really like to get to the bottom of this, I don't like grey areas ... ;-)

To be honest if you pass that parameter for excluding a device it really should work unequivocally, and so with the kernel option too.
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Sat Nov 09, 2002 1:47 pm    Post subject: Reply with quote

H-Dragon's question has gone to Problems setting up CD burner. Please don't post support questions to threads in Documentation, Tips and Tricks.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
aardvark
Guru
Guru


Joined: 30 Jun 2002
Posts: 576

PostPosted: Sat Nov 09, 2002 2:23 pm    Post subject: Reply with quote

I don't see how this is better/easier than the original method (kernel boot with hdx=ide-scsi , with both ide-cdrom and scsi emulation support compiled in)
When having ide cdrom support and scsi generic + scsi cdrom , my system defaults to ide cdrom support unless I add the hdx-ide-scsi to my kernel line in grub for a certain drive. For hdx it will then use the scsi support and the other (dvd) drive will be accessed as a normal ide cdrom. If I for some reason (can't think of any, because the cdrw (as a 'scsi emuation' device acts just as it should. :) ) want it to be a ide-drive again, I can just press 'e' in grub and remove the ide-scsi stuff for that boot. Maybe your method lets us change the way the drive is accessed without rebooting the system. But then again, I see no reason to change it (is there?)

Perhaps I'm not getting something here.
Back to top
View user's profile Send private message
daemonb
Apprentice
Apprentice


Joined: 24 Jul 2002
Posts: 242

PostPosted: Tue Nov 12, 2002 9:50 pm    Post subject: Reply with quote

thank you for that great guide.

Very useful

cya DaemonB



____________________________________
My English is like windows - very buggy :-)
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Wed Nov 20, 2002 6:56 pm    Post subject: Reply with quote

Quote:
If I for some reason (can't think of any, because the cdrw (as a 'scsi emuation' device acts just as it should. icon_smile.gif ) want it to be a ide-drive again, I can just press 'e' in grub and remove the ide-scsi stuff for that boot

Yup, you're right - Grub will let you do that. I hadn't thought of that.

Quote:
But then again, I see no reason to change it (is there?)

I'm not necessarily suggesting that you should. :) You can do it any which way works for you. I make it clear at the very beginning that I am simply clarifying something which appears to me to be incorrectly documented almost everywhere (not in the "it doesn't work" sense, rather in the "factual inconsistencies" sense). In fact, using the conventional approach did not, I repeat: did not work for me - I have no idea why. That's why I ended up doing it this way, and it struck me that if I was able to get CD burning working (a) without using a kernel parameter and (b) without having to exclude IDE-CD support then surely it was interesting information and worth reporting.

As I later said in response to rac:
Quote:
Interestingly enough (and in a strange inversion), the stimulus for this thread was finding that the conventional approach did not actually work for me! That is, using the kernel option hdc=ide-scsi did not work on what was my first attempt to use a CD-R device under linux (although not my first attempt to use SCSI emulation)!

If none of that had been the case, then this topic would never have arisen.
Back to top
View user's profile Send private message
ghetto
Guru
Guru


Joined: 10 Jul 2002
Posts: 369
Location: BC, Canada

PostPosted: Thu Nov 21, 2002 1:45 am    Post subject: This works well.. Reply with quote

I compiled all the nessisary modules and modified /etc/devfsd.conf then added the cdr file to /etc/modules.d as per instructions.. however i have to manually insert the ide-scsi module or else it doesnt work.. so i just put it in my /etc/modules.autoload

Have i done something wrong or is this the way its suppost to be?
_________________
Blizzard you suck.
Back to top
View user's profile Send private message
perry
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2002
Posts: 142
Location: Cornfields of Indiana

PostPosted: Thu Nov 21, 2002 3:50 am    Post subject: Reply with quote

Just installed Gentoo this past weekend, so I've been getting all my hardware working again...

I built ide-scsi as a module, and IDECDROM was built into the kernel. I had pretty much followed the installation instructions. cdrecord -scanbus didn't show anything, and there was nothing listed in /dev/scsi. ide-scsi was also in modules.autoload. So I added:

Code:

append="hdd=ide-scsi"


to my lilo.conf, ran lilo, and rebooted. cdrecord -scanbus now shows my burner, and I now have stuff in /dev/scsi.
Back to top
View user's profile Send private message
art
n00b
n00b


Joined: 22 Jun 2002
Posts: 47
Location: Ma

PostPosted: Tue Nov 26, 2002 5:29 pm    Post subject: cd burner Reply with quote

it's great to have who know what they are doing (kerfrmil)
saved me alot of time
Thanks :D
Back to top
View user's profile Send private message
art
n00b
n00b


Joined: 22 Jun 2002
Posts: 47
Location: Ma

PostPosted: Wed Nov 27, 2002 2:19 am    Post subject: warning Reply with quote

Thought I was all set but I get this error, kIIIb sees sony burner burns but there isn't anything on cd!

www root # cdrecord -scanbus
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) 'SONY ' 'CD-RW CRX175A1 ' '5YS2' Removable CD-ROM
cdrecord: Warning: controller returns wrong size for CD capabilities page.
0,1,0 1) 'LG ' 'CD-ROM CRD-8483B' '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) *
Thanks in advance
Back to top
View user's profile Send private message
eltech
Guru
Guru


Joined: 05 Nov 2002
Posts: 582
Location: New York

PostPosted: Sun Dec 01, 2002 6:40 am    Post subject: Reply with quote

for some reson i get no output from 'modprobe sg'
Code:
modprobe sg
modprobe: Can't locate module sg


hdc is my cdrw and hdd is my cdrw .. in my /etc/modules.d/cdr is the following
Code:
options ide-cd ignore='hdc'


this is to ignore ide-cd for the cd burner ..

in my modules.conf i sthe following ..
Code:
modprobe ide-scsi


my dvdrom can no longer be identified by xine/mplayer ...

cdrecord -scanbus shows
Code:

cdrecord -scanbus
Cdrecord 1.11a40 (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) 'SONY    ' 'CD-RW  CRX195E1 ' 'ZYS5' Removable CD-ROM
        0,1,0     1) '        ' ' ATAPI DVD-ROM  ' '120C' 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) *


what i want is the ide-cd on the dvdrom(hdd) .. and the scsi emulation on the cdrw(hdc) ..

my kernel config looks like this ..
Code:
<M>   Include IDE/ATAPI CDROM support                                          &#9474; &#9474;
  &#9474; &#9474;             < >   Include IDE/ATAPI TAPE support                                           &#9474; &#9474;
  &#9474; &#9474;             < >   Include IDE/ATAPI FLOPPY support                                         &#9474; &#9474;
  &#9474; &#9474;             <M>   SCSI emulation support


also wondering .. what would the /etc/fstab look like ater these changes?
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Mon Dec 02, 2002 6:53 am    Post subject: Re: warning Reply with quote

art wrote:
Thought I was all set but I get this error, kIIIb sees sony burner burns but there isn't anything on cd!

www root # cdrecord -scanbus
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) 'SONY ' 'CD-RW CRX175A1 ' '5YS2' Removable CD-ROM
cdrecord: Warning: controller returns wrong size for CD capabilities page.


That's bad. I Googled this one and saw quite a few similar reports, but not so much in the way of useful replies. Maybe these two threads will be of some help though (the second URL is absurdly long so I've split it into multiple lines):
http://lists.suse.com/archive/suse-linux-e/2002-Apr/2921.html
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=
26Iy8.11521%24gd5.3618409%40typhoon.southeast.rr.com&rnum=1&prev=
/groups%3Fq%3DCRX175A1%2Bwrong%2Bsize%2Bcapabilities%26hl%3Den
%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D26Iy8.11521%252
4gd5.3618409%2540typhoon.southeast.rr.com%26rnum%3D1

As for the report above from perry saying that the kernel option was needed, well yes, things seem pretty inconsistent. I had that problem also on one machine, but not on the original machine (which worked exactly according to my original instructions above) so I guess you do have to have that in some situations. I can't put my finger on it but there must be some rationale behind it.

Quote:
for some reson i get no output from 'modprobe sg'

Hmm, well I guess you must have it because cdrecord is showing devices. Maybe you compiled that in statically rather than as a module?
Quote:
in my modules.conf i sthe following ..
Code:
modprobe ide-scsi

I would just put ide-scsi in /etc/modules.autoload.
Quote:
what i want is the ide-cd on the dvdrom(hdd) .. and the scsi emulation on the cdrw(hdc) ..

If it works, then I think there shouldn't be an "hdc". Instead, it should come in as sr0 or sr1 (is that right? I'm tired ...). If you follow the second link above I think someone mentions this. Anyway, it seems as though your CD-ROM drive is getting lumped in there with SCSI emulation support too which is what you're trying to avoid. Make sure all revelant components of modules if you haven't already.
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue Dec 10, 2002 6:05 pm    Post subject: Further developments Reply with quote

Hello all. Well I've tried the original technique (as reported by many HOWTOs) and my take on it (as originally posted) and they both work for me. I've now tested my approach on three different computers and cannot reproduce the issue reported where cdrecord -scanbus results in no device found. There were a couple of quirks in my original post (the big one being that you must load the ide-scsi module with modprobe/modules.autoload, which wasn't implied), so I've edited it to make it a bit clearer and added the tip about adjusting devfs too, which is nice for non-root usage. Does this make any difference?
Back to top
View user's profile Send private message
qnx
l33t
l33t


Joined: 25 Jun 2002
Posts: 638
Location: Göteborg, Sweden

PostPosted: Tue Dec 10, 2002 7:35 pm    Post subject: Reply with quote

Thx for this great guide!! Finally I got my Ricoh CDRW working! It feels great! Thank you!
_________________
Registred Linux user #191143!
Abit NF7-S rev. 2.00 (BIOS v. 2.7)
AMD AthlonXP 2500+ (Barton)
PATA Seagate ST3120022A
SATA Seagate ST3200822AS & Silicon Image 3112 chipset
Gentoo Linux :)
Back to top
View user's profile Send private message
art
n00b
n00b


Joined: 22 Jun 2002
Posts: 47
Location: Ma

PostPosted: Tue Dec 10, 2002 10:49 pm    Post subject: cd burner Reply with quote

This place is great :D
I needed to wipe out the extra cd devices in fstab
recompile kernel without ide cdrom support
works great now!!! :o
Thanks again
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 1, 2, 3, 4, 5  Next
Page 1 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