Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Load module on boot

  1. #1

    Default Load module on boot

    I know this question might be asked before but I could not find it. I want module brcmfmac to start on boot before GUI starts. So how do I load modules on boot? Currently I have to do modprobe every time I boot. Writing a script and crontab seems silly to me since there is a way in distros like Ubuntu to do it without using scripts.

    Thanks in advance!!!!

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,952
    Blog Entries
    2

    Default Re: Load module on boot

    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3

    Default Re: Load module on boot

    :S Ok is there udev rule or some other way. This one is old school way of doing this and my module-load.d is empty and bunch of modules are getting loaded on boot.

  4. #4

    Default Re: Load module on boot

    Hi,

    That Arch wiki is pretty straight forward imho since i already did something like what you're asking.
    First create a file name after your module and add an extension .conf

    Code:
    printf '%s\n' '# Load brcmfmac at boot' 'brcmfmac' > /tmp/brcmfmac.conf
    Check what is in that file

    Code:
    cat /tmp/brcmfmac.conf
    The output should be something like

    Code:
    # Load brcmfmac at boot
    brcmfmac
    Now as root copy or move that file in the directory /etc/modules-load.d/

    Code:
    cp -v /tmp/brcmfmac.conf /etc/modules-load.d
    The output should be something like

    Code:
    '/tmp/brcmfmac.conf' -> '/etc/modules-load.d/brcmfmac.conf'
    Check that file in ''/etc/modules-load.d/brcmfmac.conf

    Code:
    cat /etc/modules-load.d/brcmfmac.conf
    The output should be something the same as above
    Code:
    # Load brcmfmac at boot
    brcmfmac
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  5. #5
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,662
    Blog Entries
    14

    Default Re: Load module on boot

    Quote Originally Posted by grc View Post
    I know this question might be asked before but I could not find it. I want module brcmfmac to start on boot before GUI starts. So how do I load modules on boot? Currently I have to do modprobe every time I boot. Writing a script and crontab seems silly to me since there is a way in distros like Ubuntu to do it without using scripts.

    Thanks in advance!!!!
    Are we talking about a laptop and Networkmanager?
    Are you sure the module isn't loaded?

    If this is a desktop machine using wicked for networking, you can use YaST to activate the device on boot.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,952
    Blog Entries
    2

    Default Re: Load module on boot

    Quote Originally Posted by Knurpht View Post
    Are we talking about a laptop and Networkmanager?
    Are you sure the module isn't loaded?

    If this is a desktop machine using wicked for networking, you can use YaST to activate the device on boot.
    Because of the module,
    It's highly likely this is a RPi (I don't know if any other hardware would use this module).
    It's my impression that things load differently on a RPi and as the Wiki article describes can be done based simply upon detection of supported hardware.

    (Some Speculating)
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7

    Default Re: Load module on boot

    Thanks @TSU but this is not working I still have to manually do modrobe brcmfmac after login.

  8. #8

    Default Re: Load module on boot

    Quote Originally Posted by Knurpht View Post
    Are we talking about a laptop and Networkmanager?
    This is desktop with wireless card (ASUS PCE-AC88)

    Quote Originally Posted by Knurpht View Post
    Are you sure the module isn't loaded?
    Yes, here is proof output of `lspci -nnv` before modprobe brcmfmac

    Code:
    07:00.0 Network controller [0280]: Broadcom Limited Device [14e4:43c3] (rev 04)
            Subsystem: ASUSTeK Computer Inc. Device [1043:86fb]
            Flags: bus master, fast devsel, latency 0, IRQ 41
            Memory at f7000000 (64-bit, non-prefetchable) [size=32K]
            Memory at f6800000 (64-bit, non-prefetchable) [size=8M]
            Memory at f2400000 (64-bit, prefetchable) [size=4M]
            Capabilities: [48] Power Management version 3
            Capabilities: [58] MSI: Enable+ Count=1/32 Maskable- 64bit+
            Capabilities: [68] Vendor Specific Information: Len=44 <?>
            Capabilities: [ac] Express Endpoint, MSI 00
            Capabilities: [100] Advanced Error Reporting
            Capabilities: [13c] Device Serial Number 00-00-00-ff-ff-00-00-00
            Capabilities: [150] Power Budgeting <?>
            Capabilities: [160] Virtual Channel
            Capabilities: [1b0] Latency Tolerance Reporting
            Capabilities: [220] #15
            Kernel modules: brcmfmac
    and after

    Code:
    07:00.0 Network controller [0280]: Broadcom Limited Device [14e4:43c3] (rev 04)
            Subsystem: ASUSTeK Computer Inc. Device [1043:86fb]
            Flags: bus master, fast devsel, latency 0, IRQ 41
            Memory at f7000000 (64-bit, non-prefetchable) [size=32K]
            Memory at f6800000 (64-bit, non-prefetchable) [size=8M]
            Memory at f2400000 (64-bit, prefetchable) [size=4M]
            Capabilities: [48] Power Management version 3
            Capabilities: [58] MSI: Enable+ Count=1/32 Maskable- 64bit+
            Capabilities: [68] Vendor Specific Information: Len=44 <?>
            Capabilities: [ac] Express Endpoint, MSI 00
            Capabilities: [100] Advanced Error Reporting
            Capabilities: [13c] Device Serial Number 00-00-00-ff-ff-00-00-00
            Capabilities: [150] Power Budgeting <?>
            Capabilities: [160] Virtual Channel
            Capabilities: [1b0] Latency Tolerance Reporting
            Capabilities: [220] #15
            Kernel driver in use: brcmfmac
            Kernel modules: brcmfmac
    note the bold line is missing from previous snippet.

    Quote Originally Posted by Knurpht View Post
    If this is a desktop machine using wicked for networking, you can use YaST to activate the device on boot.
    I would rather learn command line way, since it might be applicable to other distros.

  9. #9

    Default Re: Load module on boot

    Quote Originally Posted by jetchisel View Post
    Hi,

    That Arch wiki is pretty straight forward imho since i already did something like what you're asking.
    First create a file name after your module and add an extension .conf

    Code:
    printf '%s\n' '# Load brcmfmac at boot' 'brcmfmac' > /tmp/brcmfmac.conf
    Check what is in that file

    Code:
    cat /tmp/brcmfmac.conf
    The output should be something like

    Code:
    # Load brcmfmac at boot
    brcmfmac
    Now as root copy or move that file in the directory /etc/modules-load.d/

    Code:
    cp -v /tmp/brcmfmac.conf /etc/modules-load.d
    The output should be something like

    Code:
    '/tmp/brcmfmac.conf' -> '/etc/modules-load.d/brcmfmac.conf'
    Check that file in ''/etc/modules-load.d/brcmfmac.conf

    Code:
    cat /etc/modules-load.d/brcmfmac.conf
    The output should be something the same as above
    Code:
    # Load brcmfmac at boot
    brcmfmac
    I did exact thing but using `sudo vim` and saving it as brcmfmac.conf. Thanks for your help.

  10. #10
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,952
    Blog Entries
    2

    Default Re: Load module on boot

    If you've created exactly what @jetchisel described and it's not working,
    Then IMO next step is to inspect your bootlog and look for all entries related to your module...
    = If the module is not mentioned at all
    = If there is an attempt to load the module but results in a failure.

    You should be able to write the previous bootlog to a file with the following, and then you can perform actions on the content of file. Name your file whatever you'd loke
    Code:
    journalctl -b -1 > bootlog_last_boot.txt
    If you can't or don't know how to analyze your bootlog, post it to a pastebin and post the link to that pastebin so someone else can look at it.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Page 1 of 2 12 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
  •