How to insert a module in kernel automatically? - Linux

This is a discussion on How to insert a module in kernel automatically? - Linux ; Hi ! I have searched for materials to get the relevant answer but could'nt get the exact solution. I have a problem to load the module in the kernel automatically, i.e., while booting the module should be inserted in the ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: How to insert a module in kernel automatically?

  1. How to insert a module in kernel automatically?

    Hi !
    I have searched for materials to get the relevant answer
    but could'nt get the exact solution. I have a problem to load the
    module in the kernel automatically, i.e., while booting the module
    should be inserted in the kernel. Can anyone help...
    Thanx in advance.....


  2. Re: How to insert a module in kernel automatically?

    bobby wrote:
    > Hi !
    > I have searched for materials to get the relevant answer
    > but could'nt get the exact solution. I have a problem to load the
    > module in the kernel automatically, i.e., while booting the module
    > should be inserted in the kernel. Can anyone help...
    > Thanx in advance.....
    >


    The "initial ramdisk" is your friend.

    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett


  3. Re: How to insert a module in kernel automatically?


    Josef Moellers wrote:
    > bobby wrote:
    > > Hi !
    > > I have searched for materials to get the relevant answer
    > > but could'nt get the exact solution. I have a problem to load the
    > > module in the kernel automatically, i.e., while booting the module
    > > should be inserted in the kernel. Can anyone help...
    > > Thanx in advance.....
    > >

    >
    > The "initial ramdisk" is your friend.
    >
    > --
    > Josef Möllers (Pinguinpfleger bei FSC)
    > If failure had no penalty success would not be a prize
    > -- T. Pratchett


    I think you are expecting to load the module during the bootup
    itself.If that is the case then try for rc.local. you have to write a
    script in such a way that it will handle the module automatically.

    In rc.local(write this script) and try
    obj-m=file.o
    make -C /usr/src/kernels/(uname -r)/ SUBDIRS=$(PWD)
    modules
    insmod file.ko

    All the best


  4. Re: How to insert a module in kernel automatically?

    sujai wrote:
    > Josef Moellers wrote:
    >
    >>bobby wrote:
    >>
    >>>Hi !
    >>> I have searched for materials to get the relevant answer
    >>>but could'nt get the exact solution. I have a problem to load the
    >>>module in the kernel automatically, i.e., while booting the module
    >>>should be inserted in the kernel. Can anyone help...
    >>> Thanx in advance.....
    >>>

    >>
    >>The "initial ramdisk" is your friend.


    > I think you are expecting to load the module during the bootup
    > itself.If that is the case then try for rc.local. you have to write a
    > script in such a way that it will handle the module automatically.


    That may be too late.

    > In rc.local(write this script) and try
    > obj-m=file.o
    > make -C /usr/src/kernels/(uname -r)/ SUBDIRS=$(PWD)
    > modules
    > insmod file.ko


    You don't need to *build* a module every time you want to *load* it.

    Also, depending upon the module's requirements, a simple "insmod" might
    not be suficient, "modprobe" might be more appropriate.
    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett


+ Reply to Thread