14

There is a broken kernel module, due to which I can not even load the OS, so I can not delete or fix it. Is it possible to skip this module at boot, using the kernel's parameters or something?

1
1

Blacklisting the module as mentioned in the previous answer is the best way to completely avoid a kernel module. Aside from blacklisting, there is no generic way to disable a module.

Some Linux distributions do provide kernel boot parameters to do things like this.

  • In Arch Linux, load_modules=off forces udev to skip auto-loading. This would allow you to boot without loading modules, blacklist a module that's causing trouble, and reboot normally without the troubled module loading.
  • Knoppix has a long list of extra boot parameters (aka "cheatcodes"); these are a mix of normal kernel boot parameters and Knoppix-specific extras.

For further info, see the Kernel Parameters documentation. There are parameters for disabling specific subsystems. For example:

  • nousb disables kernel USB support
  • cgroup_disable=[name] disables a particular controller; however, "memory" is the only example specifically supported
  • libata.noacpi disables ACPI use in libata (SATA controllers); this is an example of passing a module parameter via the kernel
8

Disabling specific modules is possible from boot loader, but looks like distro-dependent indeed.

On one hand, Linux Kernel Parameters documentations states, as of August 2016:

module_blacklist= [KNL] Do not load a comma-separated list of modules. Useful for debugging problem modules.

On the other hand, the option that worked for me with openSUSE 42.1 (Linux 4.1.31) is described in Arch Kernel modules wiki:

You can also blacklist modules from the bootloader. Simply add

modprobe.blacklist=modname1,modname2,modname3

to your bootloader's kernel line, as described in Kernel parameters. When you are blacklisting more than one module, note that they are separated by commas only. Spaces or anything else might presumably break the syntax.

(Thanks to @gertvdijk at unix.SE for pointing this out.)

Also worth to mention is the following method:

In order the prevent certain modules from being loaded by the kernel using the grub command line you need to pass them as a parameter to the kernel line using the below syntax.

$module_name.blacklist=yes

I have no idea where did they get that from, but it will definitely not hurt to try any other method if all else fails.

1
2

You should be able to either add it to /etc/modprobe.d/blacklist, or blacklist 'modulename'

1
  • 1
    this will work but requires booting to another kernel (if available) or a LiveCD system. Jun 17 '10 at 17:41
-1

For Ubuntu, you can press Escape or Shift at boot which will bring you to the grub menu.
There, choose advanced options, pick your kernel and then "drop to root prompt".
You can blacklist your module by putting it in /etc/modprobe.d/blacklist.
Ctrl+D to go back into the grub menu once you're done.
"Resume" to resume the boot process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.