A few commands to help in checking and adjusting kernel module options:
- Display information about kernel module, including all options
modinfo $KERNEL_MODULE - Display information about current value for each option
for i (/sys/module/$KERNEL_MODULE/parameters/*) {\
echo $(basename $i);\
cat $i\
} - Change kernel module option without restart (temporary)
echo "$NEW_VALUE" > /sys/module/$KERNEL_MODULE/parameters/$OPTION - Load module with an option set to value
insmod $PATH_TO_MODULE/$KERNEL_MODULE.ko\ $OPTION1=$VALUE1 \
$OPTION2=$VALUE2
- Ensure kernel module option is set during boot up with grub
- Open /etc/default/grub
- Add/edit following line
GRUB_CMDLINE_LINUX='$KERNEL_MODULE.$OPTION=$VALUE'
Of course $KERNEL_MODULE, as well as all other strings with "$" at the beginning, has to be replaced by appropriate value.
In CRUX /etc/default/grub does not exist, so it has to be created.
Useful links
- https://www.cyberciti.biz/tips/how-to-display-or-show-information-about-a-linux-kernel-module-or-drivers.html
- https://devarea.com/linux-kernel-development-kernel-module-parameters/
- https://www.howtoforge.com/tutorial/kernel-boot-parameter-edit/
- https://www.linuxsecrets.com/1455-adding-kernel-boot-parameters-using-grub-on-linux