0

I generate a kernel Image using buildroot that I put onto an SD card to boot from. In buildroot I modularized USB Mass Storage. When I boot up my board without a USB connected to it I can see that no modules are running by using lsmos. But the instant I plug my USB in, the modules uas and usb_storage automatically load and allow access to the USB. I want to prevent this and only allow access to the USB if I manually load in those two modules.

I have read a few articles online about blacklisting the modules or editing files related to the modules; however, this doesn't work because any changes I make are erased when I power off. So I need another option that is permanent, perhaps done in the buildroot settings prior to generating the Image?

  • 1
    Have a look at udev and systemd-udevd.service. Or see wiki.archlinux.org/index.php/… : "Note: The blacklist command will blacklist a module so that it will not be loaded automatically, but the module may be loaded if another non-blacklisted module depends on it or if it is loaded manually. " – Patrick Mevzek Jun 28 '18 at 17:34
  • @PatrickMevzek the problem is that there is no modprobe.d file. All of the examples I have found (like this one) make assumptions that do not exist on my end – sdepot Jun 28 '18 at 18:56
  • modprobe.conf would do the same IIRC or you can created /etc/modprobe.d/ it is just a way for humans to organize stuff and applications to drop files with their own rules their. – Patrick Mevzek Jun 28 '18 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.