Find the answer to your Linux question:
Results 1 to 5 of 5
how to prevent a module to load ? I mean I dont want the "fealnx" module loaded automatically, at system startup # lsmod |grep fealnx fealnx 38664 0 mii 22400 ...
  1. #1
    Linux Newbie
    Join Date
    Feb 2007
    Posts
    248

    [SOLVED] how to prevent a module to load ?

    how to prevent a module to load ?
    I mean I dont want the "fealnx" module loaded automatically, at system startup

    # lsmod |grep fealnx
    fealnx 38664 0
    mii 22400 1 fealnx

    # grep fealnx /etc/modprobe.d/blacklist
    blacklist fealnx

    # modinfo fealnx
    filename: /lib/modules/2.6.16.60-0.21-smp/kernel/drivers/net/fealnx.ko
    license: GPL
    description: Myson MTD-8xx 100/10M Ethernet PCI Adapter Driver
    author: Myson or whoever
    srcversion: 31EF2F0B751E00121BFA1E3
    alias: pci:v00001516d00000891sv*sd*bc*sc*i*
    alias: pci:v00001516d00000803sv*sd*bc*sc*i*
    alias: pci:v00001516d00000800sv*sd*bc*sc*i*
    depends: mii
    supported: yes
    vermagic: 2.6.16.60-0.21-smp SMP gcc-4.1
    parm: max_interrupt_work:fealnx maximum events handled per interrupt (int)
    parm: debug:fealnx enable debugging (0-1) (int)
    parm: rx_copybreak:fealnx copy breakpoint for copy-only-tiny-frames (int)
    parm: multicast_filter_limit:fealnx maximum number of filtered multicast addresses (int)
    parm: options:fealnx: Bits 0-3: media type, bit 17: full duplex (array of int)
    parm: full_duplex:fealnx full duplex setting(s) (1) (array of int)

    # rmmod fealnx

    then reboot the system, but module "fealnx" is loaded... why ?
    I have restricted the "usb disks" via the "blacklist" method successfully, but the blacklist method(/etc/modprobe.d/blacklist) is not working for this module(fealnx)

    Regards
    needee

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Well, someone more knowledgeable might tell me this is an inelegant solution, but you can try adding the line
    Code:
    install fealnx /bin/true
    to /etc/modprobe.conf.

  3. #3
    Linux Newbie
    Join Date
    Feb 2007
    Posts
    248

    Lightbulb

    thanks reed9 .. yes your solution works

    but why its not working the way I was doing, i.e in
    /etc/modprobe.d/blacklist
    blacklist fealnx
    ?

    thanks once again for help
    Regards
    needee

  4. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    My guess is, somewhere some system service needs the module, and that overrides the blacklisting. The install /bin/true line means, whenever the system attempts to load the module, it's forced to execute the command 'true', which does, well, nothing, and returns success. So the module never loads.

  5. #5
    Linux Newbie
    Join Date
    Feb 2007
    Posts
    248

    Thumbs up

    >My guess is, somewhere some system service needs the module, and that overrides the blacklisting
    Hmm nice explanation, but I think in my case that should not be the reason, because this module(fealnx) is for the NIC (Myson 100/10M Ethernet PCI Adapter), and I have set this nic to

    BOOTPROTO='none
    STARTMODE='disable''

    so I think that "any system service should not need this module".

    well I am not arguing with you, I am just sharing the thoughts of a dumb(i.e me)

    once again thanks for nice explanation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...