Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need hotplug/coldplug because of my scanner, however I also have some usb mass storage equipment. I do not want the usb_storage module to load on startup. When it starts it completely fills my dmesg kernel info with usb_storage errors. so, basically I need hotplug, I need it to load on startup, I need it to NOT load usb_storage, I cannot disconnect my mass-storage devices, and simply unloading it after boot is not a solution.
I have gone into my /etc/hotplug/usb.* and removed any and all mentions of usb_storage, no luck still loads.
When it starts it completely fills my dmesg kernel info with usb_storage errors.
I get the idea you're looking at the symptoms and not the cause. If verbose dmesg output is the main reason for wanting this then wouldnt it make sense to either fix the errors or else not have them shown or logged? Are these really error messages or just the informational level usb-storage ones you can ignore? If it's the informational level ones then a kernel configure (unset CONFIG_USB_STORAGE_DEBUG) and recompile gets rid of verbose USB messages. If it's errors why not post a few exact lines? If you OTOH need to get a clear view of dmesg information for specific causes, couldn't a grep pipe help?
when I say it fills it I mean it filles it, dmesg | less from top to bottom with usb_storage.
I was pretty sure I had verbose debugging disabled on the kernel config, but I checked and apparently not, probably a typeo. hopefully now that I changed that and recompiled it shoudl work (not rebooting now)
This output is not the only reason I do not want the module to load:
I have 2 reasons for compiling a kernel option as a module.
1) I rarely use it and I do not want it in my active kernel, speed/memory reasons, sometimes security.
2) Sometimes modules need to load in a specific order, for instance drive controllers, if I do not specify the order of drive controllers by loading the modules in a startup script (or /etc/modules.d/modules-autoload-2.6).
example (bare with it, it does involve usb_storage):
I have 2 onboard sata controllers, I have the sata_nv and the sata_sil, the sata_nv is builtin cause it has my root drive, the sata_sil autoloads on boot. I do this because different kernel versions seem to alternate the order in which the sata drivers are loaded, so after some recompiles I would need to change /boot/grub/grub.conf and /etc/fstab, I got tired of changing these files after kernel version updates. So I simply builtin the first one and autoloaded the second. Now then I do not have usb_storage builtin a) because I rarely use it, and B if it loaded before the sata_sil then the drive order would be changed again because the mass_storage would add my card reader as 4 sdX devioce nodes before the disks on my sata_sil. Once again we have a drive order issue that f*cks up fstab. and I cannot be sure what the sata_sil drives will have for their order because I have a usb harddrive that I mave so it is not always at the computer.
In short I need the usb_storage module from tiem to time, but I really cannot have it load automatically by hotplug, yet I cannot stop using hotplug because It makes my scanner work, and I do use my scanner often (In fact I have never had hotplug installed up until a week ago when I got my new scanner).
I was pretty sure I had verbose debugging disabled on the kernel config, but I checked and apparently not, probably a typo. hopefully now that I changed that and recompiled it should work
It will.
1)I do not want it in my active kernel, speed/memory reasons, sometimes security.
Yes, disabling modules makes the kernel smaller and faster, but the usb-storage module doesn't noticably decrease kernel performance nor does it noticably use memory. I'd say you only could notice a significant decrease in performance when you load a say every existing module. There are no security issues related to this module AFAIK.
In short I need the usb_storage module from tiem to time, but I really cannot have it load automatically by hotplug, yet I cannot stop using hotplug because It makes my scanner work
There's three options then:
- Disable hotplug, load scanner modules manually from script.
- Move the usb-storage LKM to another directory say /lib/modules/noload and remove all references in modules.usbmap, load usb-storage modules manually from script.
- The first two options will break functionality and they are not standard. So maybe blacklisting the usb-storage module in /etc/modprobe.conf, Udev rules and wherever else it's mentioned could be a "better" option. If you're using Udev then you can also make rules that explicitly state in which order to load modules.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.