Search This Blog

2014-09-24

Set Kernel Module Parameters on Boot

There are a few options used in order to set kernel module parameters on boot.

Option 1: Set the parameters on the kernel line in the grub configuration
Option 2: Set the configuration in /etc/modprobe.d/(module-name)
Option 3: Set the parameter temporarily by echoing to /sys/module/(module)/parameters/(parameter-name)

My preferred method is setting it in /etc/modprobe.d/(module-name) as it makes it the most clean/easiest to modify and view. But it also might be a good idea to set it in the kernel line if you're temporarily debugging some functionality and want to be able to easily reset the value prior to system boot due to concern over a certain kernel parameter causing a failure that you would need to recover from.

To perform option 2 its as simple as the following example where I turn off APICv on CentOS7.0

echo "options kvm-intel enable_apicv=N" >> /etc/modprobe.d/kvm-intel.conf

No comments:

Post a Comment