[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Module loading?



This one time, at band camp, Christopher Swingley said:
> I'm new to modules.  I have a USB CompactFlash card reader that works
> with the usb-storage module to present the card as a SCSI device
> (/dev/sda1).  What I've been doing to read the card is:
> 
>     # insmod usb-storage
>     # mount -t vfat /dev/sda1 /mnt/flashcard
> 
>     (do whatever)
> 
>     # umount /mnt/flashcard
>     # rmmod usb-storage
> 
> This works great, except I have to become root each time, and it seems
> like the system ought to be able to handle this more automagically.
> 
> What I want to happen is: when I plug in the card reader, the
> usb-storage module automatically gets loaded.  And when I unplug it,
> the usb-storage module is automatically unloaded.
> 
> When the USB device is connected I see:
> 
>     Aug  9 14:22:32 foobar kernel: usb.c: USB device 6 
>     (vend/prod 0x7c4/0xb000) is not claimed by any active driver.
> 
> in my system logs.  But I can't figure out how to tell kmod that when
> it sees this, it should load usb-storage.  Or, how can I make kmod
> / insmod / etc. load usb-storage before I try to mount /dev/sda1
> (since I don't have any other SCSI devices).
> 
> I'm running a 2.4.18 kernel with CONFIG_MODULES=y,
> CONFIG_MODVERSIONS=y, CONFIG_KMOD=y (and the relevant options that make
> the card reader function).
> 
> Any hints?  Thanks,
> 
> Chris
I think you just need an entry in fstab to allow non-root mounting of
it.  As for the hotplug tools, I can't help you there.
HTH,
Steve
-- 
No one may kill a man.  Not for any purpose.  It cannot be condoned.
		-- Kirk, "Spock's Brain", stardate 5431.6

Attachment: pgp_ZJi1e72Zb.pgp
Description: PGP signature


Reply to: