LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   hardware detection, but how? (https://www.linuxquestions.org/questions/linux-hardware-18/hardware-detection-but-how-107506/)

b0uncer 10-23-2003 05:58 AM

hardware detection, but how?
 
I'm not sure if my hardware is being detected - at least well enough. please read below:

For example, my cd-rw drive. It's IDE-drive, hewlett-packard 9310i plus as far as I know (checked from the box in which it came). I've asked before what to do, and tried all kinds of tricks..well, with the aid of "dmesg" I found out that my system knows I do have a

"hdd: Hewlett-Packard CD-Writer Plus 9300, ATAPI CD/DVD-ROM drive"

but there is no "hdd" in /dev/, neither scsi- or any other cdroms except my other ide-rom which was detected already when I started installing my gentoo from cd's using it.

So do I have to - and how - manually detect the drive and check what it takes to create for example, /dev/cdrom1 ?

I also have an usb-scanner (agfa's 1212u) which doesn't work on gentoo. It worked fine on RH I used to have before, but now it won't - I guess it's because I don't have any device file for it. No scanners, no usb (except my mouse), nothing.....

Please tell me how to get past this.... How to find or create a device file for these two, cd-rw (ide) and scanner (usb)?!?

hw-tph 10-23-2003 06:38 AM

To use a CDRW in Linux and burn CD's with it you need to tell Linux to use SCSI emulation (the ide-scsi module) for it. It's quite possible that your Linux distribution does this automatically. In that case your CDRW is probably called /dev/scd0. Check your /etc/fstab if it's there already so you can easily mount and unmount the drive.

I have no experience whatsoever with scanners so I'll pass on that one.

Håkan

Addition:
If you want to be able to access the drive as /dev/cdrom1 just symlink it. As root, cd to /dev and do a ln -s scd0 cdrom1. You could substitute the cdrom1 part with whatever you want - I call mine cdrw plain and simple. :)
You may also need to add your own username to the cdrom group and add group read+write permission to /dev/scd0 (and/or /dev/sr0) in order to use the CDRW as yourself and not only as root. Search the forums here for how to do it!

b0uncer 10-25-2003 12:19 PM

no, that's just the problem. I know I could make a symbolic link /dev/cdrom1 to the device, except that there is no device file :(

there is no scsi- or any other cd-rom for my rw, altough it seems to be seen by linux when booting. there just seems not to be any file in /dev for it...and the scanner is, as far as I know, the same thing - everything else would possibly work, but device file is missing.

I have tried to turn on the scsi-emulation, but it didn't help, as it seems like this will neither create any device file for it..I read somewhere an article about this, and I got the picture that after scsi-emulation is enabled, a device called /dev/scd0 would be created. but this didn't happen..?

oh, yeah and my fstab doesn't have any line for it, of course, because I don't have the device file to point to. that's my problem...

hw-tph 10-26-2003 09:31 AM

You say it seems like it's detected during bootup. When you type dmesg you should see the last bootup log. Browse it and look for the part where IDE devices are initialized - it probably looks something like this:

Code:

hda: HITACHI_DK228A-65B, ATA DISK drive
blk: queue c034cd60, I/O limit 4095Mb (mask 0xffffffff)
hdc: SANYO CRD-S372BV, ATAPI CD/DVD-ROM drive

The above is from my laptop. If the drive is detected it should be assigned a device name. /dev/hda is my hard drive (primary IDE master) and /dev/hdc is my Sanyo CD-ROM (secondary master).

Håkan

Electro 10-26-2003 02:03 PM

Since Gentoo is compile everything now and install later. Gentoo could have compile the kernel with out USB and with limited CD-ROM mounting. Run xconfig in the kernel and see if USB is supported. For your scanner to work, you need sane and hotplug. Look through the kernel document directory and find out what options you can give to the kernel. Look for maxium CD-ROM mounts or SCSI drives.

Also it could be that you are using devfsd. It might have not made node in the /dev. You may have to look through the /dev directory and find it. Another way add a line in the devfs configuration file.

Type /sbin/lsmod. I think certain module(s) are not loaded.

b0uncer 10-27-2003 08:27 AM

ok, now the cd-rw works....(I haven't test if it burns ok, but at least I can use it now, I tested to read a disc with it and it did the job ok :) )

yesterday I did some kernel update, added scsi-emulation which was missing in my kernel configuration, recompiled and booted. at first nothing happened, but after a while I got an idea, and gave command:

modprobe ide-scsi

and few seconds later when I had opened /dev I saw the device (block) file created and even the symbolic link cdroms/cdrom1 created! nice job....but after reboot, module "ide-scsi" was again unloaded. I added it to the modules.autoload, and hopefully it'll be loaded on bootup from now on.... (or if I did that wrong, how is it done?)

ok, now I only got my scanner to work on. I guess it has the same thing, it's module is missing. I added the "usb scanner support" yesterday, but it seems like it was not compiled to the kernel as I can't

modprobe scanner

which should do it. also, using modprobe to find a module associated to my usb scanner gives me nothing - so the module isn't configured.....or what? I suppose I can't just do a magic trick to add it, but I need to recompile the kernel again to get it working, or what? :/ that's dull...I've done that many enough times, wouldn't want to do again.

is that the only way? I think that adding the module "scanner" would bring my scanner to life...it's detected at bootup as a usb device too, so it seems like it's the same as with my rw.

but thanks a lot for the cd-rw drive help! :) if I just could get the scanner working, I'd be finished.......

b0uncer 10-27-2003 01:44 PM

PROBLEMS SOLVED! :) :) :) :)

I decided to recompile my kernel one last time. And it helped. I (re)added the USB Scanner Support and checked everything else (SCSI-emulation etc.) was fine, recompiled, installed and.....everything worked. My scanner worked more than well, my ide-cd-rw worked....ahh... :)

So, the problem seemed to be the missing modules, which got - for a reason or another - left out. Good that I now know how to fix things later if I have to :)

thanks for your help, everyone :)


All times are GMT -5. The time now is 09:09 PM.