Kernel modules and tunning Kernel Behavior

# lsmod – show the modules loaded.
# modinfo e1000 – show details about the module.
# modprobe -r cdrom
If the remove is not working, can change the parameter:
# modprobe cdrom lockdoor=0
The files which should be modified are into: /etc/modprobe.d/
Check the man page:
# man 5 modprobe.d
The syntax should be:
options modulename options
There should be a new file created with extension .conf
# vim cdrom.conf
add the line:
options cdrom lockdoor=0

Tunning Kernel Behavior
Easy to make the changes persistent, use sysctl
# sysctl -a – show an overview.
# sysctl -a | grep forward
The name of parameters correspond to files from /proc/sys
From this I have to replace “.” with “/”
In RHEL7 /etc/sysctl.conf is not used anymore.
In order to make settings persistent, create a file into /etc/sysctl.d/ directory and put it with extension “.conf”.
Another place to put the file could be /usr/lib/sysctl.d/
The number from files matter because if you make a settings in 2 files, the second will matter.
For routing, create a file into /etc/sysctl.d/ directory with name:
# vi /etc/sysctl.d/50-ipforward.conf
The values:
net.ipv4.ip_forward = 1
On next reboot the value will be loaded.

# lsmod
# modinfo iwlwifi
# cd /etc/modprobe.d
# vi iwlwifi.conf
options iwlwifi led_mode=1
# modprobe iwlwifi
Check the logs to see if is enabled:
# dmesg