How to remove module from kernel using -r or rmmod?

12,514

One possible way is to blacklist the driver that is being loaded:

sudo nano `/etc/modprobe.d/blacklist`

add the driver-name using following syntax:

blacklist driver-name

Alternatively,

Create a file '/etc/modprobe.d/[modulename].conf' containing 'blacklist [modulename]'.

Run depmod -ae as root

Recreate your initrd with update-initramfs -u

source

In the dim and distant past I seem to remember you can do this from Grub - not sure if this is still applicable in oneiric but you could try as one of your Grub boot options

modprobe.blacklist=kernel_module
Share:
12,514

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    I have a card installed, which causing not to get ip address automatically using DHCP. So i need to remove that card completely for the moment. I tried as below but its not working how can i remove it?

    $ lsmod | card
    card   45555 2
    
    $ modprobe -r card
    FATAL: Module card is in use.
    
    $ rmmod card
    FATAL: Module card is in use.
    
    • heartsmagic
      heartsmagic over 12 years
      lsmod|card is not the real command you gave I think. You missed the grep part pasting here possibly. So, is this output the whole one? I mean is there any other modules using card?