Kernel module blacklist not working

7,987

Your problem probably results from the fact that a copy of /etc/modprobe.d/blacklist.conf is located in the initramfs. When you reboot your computer, it is still using the old copy that doesn't contain your change. Try to rebuild the initramfs with the following command and then reboot:

sudo update-initramfs -u
Share:
7,987

Related videos on Youtube

bogdan.mustiata
Author by

bogdan.mustiata

Updated on September 18, 2022

Comments

  • bogdan.mustiata
    bogdan.mustiata over 1 year

    I'm trying to figure out how to blacklist modules, and I'm trying it on the USB storage. Unfortunately it seems to have no effect, and I get the module in even if it's not used (apparently).

    My experiment is taking place on an Ubuntu 12.04.3 LTS.

    raptor@raptor-VirtualBox:/etc/modprobe.d$ lsmod | grep usb
    usb_storage            39720  0 
    usbhid                 46054  0 
    hid                    82511  2 hid_generic,usbhid
    raptor@raptor-VirtualBox:/etc/modprobe.d$ cat blacklist.conf | grep usb
    blacklist usb_storage
    blacklist usbmouse
    blacklist usbkbd
    
  • Sergiy Kolodyazhnyy
    Sergiy Kolodyazhnyy about 5 years
    Worked like charm
  • clearlight
    clearlight almost 5 years
    Yup. That did it.
  • helpmelearn
    helpmelearn over 4 years
    Thank you! This saves me a lot of frustration!