Correct place to put modules to be loaded at startup?

Forum Forums New users New Users and General Questions Correct place to put modules to be loaded at startup?

  • This topic has 4 replies, 3 voices, and was last updated Jan 12-10:16 pm by Robin.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #74902
    Member
    Robin

      Hi all, and a Happy New Year!

      What is the intended place/file to put the module names I want to have additionally loaded at startup?

      I’ve found two places in system, and can’t determine the correct one for antiX (19.3 full, 32bit, Live Persist-all, most recently apt-upgraded):

      There is a folder
      /etc/modules-load.d
      containing a file

      $ cat /etc/modules-load.d/cups-filters.conf
      # Parallel printer driver modules loading for cups
      # LOAD_LP_MODULE was 'yes' in /etc/default/cups
      lp
      ppdev
      parport_pc
      

      and probably I could add another file into this folder, containing the desired module names.

      But there is also a file

      $ cat /etc/modules
      # /etc/modules: kernel modules to load at boot time.
      #
      # This file contains the names of kernel modules that should be loaded
      # at boot time, one per line. Lines beginning with "#" are ignored.
      
      loop

      present on the system, which also claims to contain the modules to be loaded at boot time.
      So I have no idea which of the files I should use to add the module
      snd-aloop
      which needs to be loaded before alsa-utils will start at boot from /etc/init.d

      Or is there a complete different method to be used in antiX?

      Many thanks for any suggestions.
      Robin

      Windows is like a submarine. Open a window and serious problems will start.

      #74945
      Member
      sybok
        Helpful
        Up
        0
        ::

        Hi, an intricate topic for un*init*iated (such as me).

        A quick web search ‘debian load (single) modules at startup’ leads e.g. to
        https://raspberrypi.stackexchange.com/questions/761/how-do-i-load-a-module-at-boot-time
        An answer by ‘Jivings’ in this link suggests using ‘/etc/modules’.
        Also, it mentions (when explaining Arch linux) that ‘/etc/modules-load.d/’ is for systemd.

        My guess is that if you have (order-related) dependencies on the startup, then you should use the ‘/etc/modules-load.d/<whatever>.conf’.
        Honestly, I have no idea what is the order of starting modules and when ‘alsa-utils’ is started.
        There are ‘/etc/rc[1-6S].d/’ directories and in my case (antiX-19.2 testing, 64-bit), there are files ‘/etc/rc[016].d/K01alsa-utils’ (symlinks to ‘/etc/init.d/alsa-utils’).
        This would suggest that one may need to put it prior to ‘K01alsa-utils’.

        Hopefully, someone may shed some (more) light on this.

        • This reply was modified 1 year, 3 months ago by sybok.
        • This reply was modified 1 year, 3 months ago by sybok. Reason: tags added
        #74960
        Moderator
        christophe
          Helpful
          Up
          0
          ::

          @sybok:

          un*init*iated

          Good one! 😉

          confirmed antiX frugaler, since 2019

          #74997
          Member
          sybok
            Helpful
            Up
            0
            ::

            There was a think I had in mind in case you would not mind an experiment but did not mention hoping someone else will resolve it.
            Add two lines in the ‘/etc/modules’

            snd-aloop
            alsa-utils

            Hopefully, the latter gets re-loaded after the ‘snd-aloop’ was activated and it could work fine.

            #75151
            Member
            Robin
              Helpful
              Up
              0
              ::

              @sybok For sure I will experiment on this. But I’d prefer to know what I’m doing before starting, and whether there is a known default procedure for antiX in this concern. This was my question about. But obviously I’m restricted to try and error method…
              I’m not sure what method will survive antiX system upgrades or remastering of Live USB.
              Will report what works finally as soon I have managed to tested all this once.

              Windows is like a submarine. Open a window and serious problems will start.

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.