My man modprobe.d
says the following:
NAME
modprobe.d - Configuration directory for modprobe
SYNOPSIS
/lib/modprobe.d/*.conf
/etc/modprobe.d/*.conf
/run/modprobe.d/*.conf
My question is: anybody knows what is the purpose of each of these folders?
I have only seen this page where somebody had a problem (in Red Hat) and had to move a conf file from /etc to /lib because the former wasn't available in the initramfs:
The /etc/modprobe.d directory isn't available in the initramfs, so the initramfsblacklist.conf isn't created and the rd.driver.blacklist isn't honored.
Changing from /etc/modprobe.d to /lib/modprobe.d/ here restore the module blacklist behavior.
As an example, this is what I have in a new droplet in Digital Ocean with Ubuntu 17.10:
$ ls -l /lib/modprobe.d/
total 16
-rw-r--r-- 1 root root 655 Aug 15 2017 aliases.conf
-rw-r--r-- 1 root root 1461 Mar 14 07:38 blacklist_linux_4.13.0-38-generic.conf
-rw-r--r-- 1 root root 390 Feb 20 12:50 fbdev-blacklist.conf
-rw-r--r-- 1 root root 668 Feb 20 13:11 systemd.conf
$ ls -l /etc/modprobe.d/
total 32
-rw-r--r-- 1 root root 325 Aug 15 2017 blacklist-ath_pci.conf
-rw-r--r-- 1 root root 210 Aug 15 2017 blacklist-firewire.conf
-rw-r--r-- 1 root root 697 Aug 15 2017 blacklist-framebuffer.conf
-rw-r--r-- 1 root root 583 Aug 15 2017 blacklist-rare-network.conf
-rw-r--r-- 1 root root 1603 Aug 15 2017 blacklist.conf
-rw-r--r-- 1 root root 347 Aug 15 2017 iwlwifi.conf
-rw-r--r-- 1 root root 379 Oct 10 2017 mdadm.conf
-rw-r--r-- 1 root root 104 Aug 15 2017 mlx4.conf
$ ls -l /run/modprobe.d/
ls: cannot access '/run/modprobe.d/': No such file or directory
Is it all about the the boot stage the conf files are read?
Further reading the linked page, it seems /lib/modprobe.d is for conf files for the packages we install in the system. Is it correct?