Kernel Module – How to Add Kernel Module Parameters in Ubuntu 11.04
11.04kernel-modulesmodules
How to add a kernel module parameter in Ubuntu 11.04?
Can I use the /etc/module file? If yes, how?
Best Answer
/etc/modules seems to be loaded by /etc/init/module-init-tools.conf. The first argument is the module name, other arguments are the parameters. Adding the following to /etc/modules seems fine:
thinkpad_acpi fan_control=1
To load this module and set these parameters in the very early stage of boot, add the previous line to /etc/initramfs-tools/modules file. After a change in that file, you need to regenerate the ramdisk:
sudo update-initramfs -u
As a possible alternative, you can try to add the options to the kernel line (I haven't tested it myself, but it seems to work for settings like i915.modeset=1. Edit /etc/default/grub and find the line with GRUB_CMDLINE_LINUX_DEFAULT="quiet splash". Replace it by something like:
Doing everything as root by using su and the yum package manager is something that fits for Redhat-based distros, but not Ubuntu. In Ubuntu, you run command as root by prefixing commands with sudo. The package manager used by Ubuntu is apt.
To install VirtualBox, run:
sudo apt-get install virtualbox-ose
This will take care of dependencies like the kernel headers which is included in the package linux-headers-generic. If you've a PAE kernel, you need to install the headers first (in your case linux-headers-2.6.38-8-generic-pae), which can be done with:
sudo apt-get install linux-headers-$(uname -r)
uname -r gives the loaded kernel version and saved you from manually entering the kernel version.
Best Answer
/etc/modules
seems to be loaded by/etc/init/module-init-tools.conf
. The first argument is the module name, other arguments are the parameters. Adding the following to/etc/modules
seems fine:To load this module and set these parameters in the very early stage of boot, add the previous line to
/etc/initramfs-tools/modules
file. After a change in that file, you need to regenerate the ramdisk:As a possible alternative, you can try to add the options to the kernel line (I haven't tested it myself, but it seems to work for settings like
i915.modeset=1
. Edit/etc/default/grub
and find the line withGRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
. Replace it by something like:To get a list of options for a kernel module:
This did not work for
i915
, for that I had to run:To get the current value of a module parameter, run:
For the
fan_control
parameter of thethinkpad_acpi
module, you have to run:If this function returns an error, check if the module was loaded and whether the option exist or not.