Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20
Hi I am trying to disable a module from loading and whatever I do it still keeps loading up. I placed a blacklist entry (/etc/modprobe.d/blacklist): Code: blacklist tg3 I reboot ...
  1. #1
    Just Joined! exkor5000's Avatar
    Join Date
    Jul 2009
    Location
    Moon
    Posts
    23

    How in the name to disable modules?

    Hi

    I am trying to disable a module from loading and whatever I do it still keeps loading up.

    I placed a blacklist entry (/etc/modprobe.d/blacklist):
    Code:
    blacklist tg3
    I reboot the system and the module has been loaded.

    Ok! so I open /etc/modprobe.conf and add this:
    Code:
    alias tg3 off
    alias eth0 off
    reboot the system and the module still loaded!

    ok, that drove me mad and I started digging through the individual rc scripts and /etc/sysconfig scripts. Finding nothing useful I just disabled the whole network section for all run levels with:
    Code:
    chkconfig network off
    I reboot the system and the module has been loaded like nothing has changed.

    How can I disable a module from loading??

    In Slackware it's straight forward, just comment the module out in /etc/modules.conf and you're good to go.

    In RHEL I don't even understand what script loads what modules and how to find out what module is loaded by what script... is there a tool for that??

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    Ok! so I open /etc/modprobe.conf and add this:
    Code:

    alias tg3 off
    alias eth0 off
    This does not tell the system to not load them. This just set an ALIAS to call them by.

    man modprobe.conf

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined! exkor5000's Avatar
    Join Date
    Jul 2009
    Location
    Moon
    Posts
    23
    That's what I thought too but that's how, apparently, you do it in RHEL.

    Check this link:
    kbase.redhat.com/faq/docs/DOC-8711

    I read that in the redhat docs first but I can't pin point to the exact location anymore.

  4. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    You can add a line to /etc/modprobe.d/modprobe.conf reading
    Code:
    install tg3 /bin/true
    That way anything that causes the module to load will just return success and exit, preventing the module from ever loading.

  5. #5
    Just Joined! exkor5000's Avatar
    Join Date
    Jul 2009
    Location
    Moon
    Posts
    23
    You can add a line to /etc/modprobe.d/modprobe.conf reading
    Code:

    install tg3 /bin/true

    That way anything that causes the module to load will just return success and exit, preventing the module from ever loading.
    success my friend, many thanks!

    now I gotta find out what was loading this module in the first place.

    do you think kudzu? or maybe the scripts in "/etc/sysconfig/network-scripts/"?

    I have checked /etc/sysconf/hwconf, I saw all the devices but not that particular network interface (tg3 which is an alias for eth0), I am assuming kudzu was not able to detect it? if not then what loads it? how can I check?

    Thanks

  6. #6
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    Google: linux tg3 => The tg3 driver is for Broadcom NIC's

  7. #7
    Just Joined! exkor5000's Avatar
    Join Date
    Jul 2009
    Location
    Moon
    Posts
    23
    Google: linux tg3 => The tg3 driver is for Broadcom NIC's
    Yes I know that and you can download the driver from that website in addition to some FAQ but I still don't know what script in RHEL fires this module up originally.

  8. #8
    Just Joined! exkor5000's Avatar
    Join Date
    Jul 2009
    Location
    Moon
    Posts
    23
    i mean im pretty sure that the scripts in /etc/sysconfig/network-scripts take care of that but I don't see how that module gets associated with the hardware explicitly.

    For example in /etc/sysconfig/hwconfig you can see the hardware detected with the module that is being loaded for that particular hardware. I didn't see anything similar for that tg3 module, so I what I don't understand, and trying to, is how this module being loaded? how does the system know what module to associate with that NIC?


    Thanks

  9. #9
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    From a RHEL 4.7 X64 machine's hwconf:

    Code:
    class: NETWORK
    bus: PCI
    detached: 0
    device: eth0
    driver: e1000
    desc: "Intel Corporation 82541GI Gigabit Ethernet Controller"
    network.hwaddr: 00:14:22:23:XX:XX
    vendorId: 8086
    deviceId: 1076
    subVendorId: 1028
    subDeviceId: 016d
    pciType: 1
    pcidom:    0
    pcibus:  6
    pcidev:  7
    pcifn:  0
    And from a RHEL 5.3 X64 hwconf:

    Code:
    class: NETWORK
    bus: PCI
    detached: 0
    device: eth0
    driver: e1000
    desc: "Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)"
    network.hwaddr: 00:0c:29:0b:XX:XX
    vendorId: 8086
    deviceId: 100f
    subVendorId: 15ad
    subDeviceId: 0750
    pciType: 1
    pcidom:    0
    pcibus:  0
    pcidev: 11
    pcifn:  0
    What NIC is in the machine?

    Code:
    lspci | grep -i ethernet
    Was this a clean install or a restore from another machine/backup?

  10. #10
    Linux Guru waterhead's Avatar
    Join Date
    Jul 2004
    Location
    Franklin, Wisconsin
    Posts
    4,577
    Just blacklisting a module should be enough to prevent it from loading. I know that this works with wireless driver modules, so it should work for the NIC driver. I suspect there was something wrong with the way you added it to the blacklist file.
    Paul

    Please do not send Private Messages to me with requests for help. I will not reply.

Page 1 of 2 1 2 LastLast

Posting Permissions

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