English
Ask Your Question
0

Make the blacklist of a module persistent across updates

asked 2017-11-09 09:29:10 +0000

Hi Fedora users! I love using Fedora and I chose it specifically for the integration with Gnome because I have a laptop that has a touchscreen, so proper touch support was a nice thing to have. Everything has worked flawlessly out of the box since the installation but now a problem arises: i have a crack on the glass of the touchscreen: that means that it sometimes register a touch imput making my cursor crazy and the system unusuable.

I'm using Wayland and i found that the kernel module responsible for the touchscreen is hid_multitouch, so I used modprobe -r to remove it but it's only temporary AFAIK. I have put it in /etc/modprobe.d but i have to regenerate the initramfs with dracut, and I love that Fedora updates kernel versions often, but I'd like a method of blacklisting that is persistent during the whole lifetime of the OS if possible.

I'm currently searching for an option and I can't decide which is the best one for this UEFI system:

  1. Dracut? If so, how?
  2. Modprobe? If so, how?
  3. GRUB boot parameters? If so, how?

Help me out guys, I'd gladly appreciate it :D

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2017-11-14 15:40:25 +0000

genodeftest gravatar image

Your solution in /etc/modprobe.d/ should be permanent already, as dracut should respect that folder. Anyway, I'd go for solution 3 for experimenting only, 2 for a permanent solution and 1 only if dracut fails to respect the rules in modprobe for some reason.

  1. Dracut only prevents dracut from putting modules into the initramfs. If they are blacklisted, they won't be loaded in the initramfs either. If you still want to remove kernel modules from initramfs, have a look at man dracut.conf. Basically you'll need a file in /etc/dracut.conf.d/ with a line like this: omit_drivers+=" usb-storage uas ums-* snd soundcore snd-* ". As dracut does not put all kernel modules into your initramfs, you might want to use lsinitrd on a file in /boot/initramfs-4.[…].img before and have a look at all the kernel modules in your initramfs. lsinitrd /boot/initramfs-4.13.12-200.fc26.x86_64.img | less should be enough. Then search for files below usr/lib/modules/ which are the kernel modules present in your initramfs. Please note that removing essential modules might break your boot.

  2. Modprobe: Using the permanent config files in /etc/modprobe.d/ (see man modprobe.d), you can prevent the kernel from loading specific modules. This configuration will be copied into the initramfs when dracut is running for the next time, e.g. by updating your kernel or running dracut manually.

  3. GRUB boot parameters: This is only a temporary solution and should not be used permanently. Enter the grub config menu during boot and add module_blacklist=modname1,modname2,modname3 to the kernel command line. See https://www.kernel.org/doc/Documentat... for details.

Further info:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Stats

Asked: 2017-11-09 09:29:10 +0000

Seen: 32 times

Last updated: Nov 14