Results 1 to 10 of 10

Thread: Error using Insmod/modprobe.

  1. #1

    Default Error using Insmod/modprobe.

    Hi All,

    I am a newbie to linux using Open suse 11.3 - 32 bit OS with kernel 2.6.34.7-0.7-Desktop . I was trying to compile and insert a module. The module compiles fine and creates tool.ko file(am compiling it from Desktop). Next when I try to use "insmod tool.ko" , it gives em this error:
    insmod: error inserting 'tool.ko': -1 Operation not permitted

    I tried to use modprobe instead , thinking it might install the dependencies(if any) by itself: "modprobe -v tool.ko" but it gives me this error
    FATAL: Module tool.ko not found

    I went over some linux forum posts and tried to resolve it but no use !
    I copied all the files from Desktop to the /lib/modules/2.6.34.7-0.7-Desktop/build folder and then ran the commands but still face the same problem. Used this "/sbin/depmod -a " thinking it might update the modeprob.conf file, but no use !
    Thank you for help in advance !

    -
    Ram

  2. #2
    Join Date
    Aug 2008
    Location
    Behind the 8 ball
    Posts
    116

    Default Re: Error using Insmod/modprobe.

    You don't need the .ko extension, this this
    Code:
    modprobe -v tool
    Good luck,
    Hiatt

  3. #3

    Default Re: Error using Insmod/modprobe.

    Quote Originally Posted by jthiatt08 View Post
    You don't need the .ko extension, this this
    Code:
    modprobe -v tool
    Good luck,
    Hiatt
    Thanks.. that did not work either ! It seems its a problem with application and it s compatibility with other driver present on the system !

  4. #4

    Default Re: Error using Insmod/modprobe.

    Okayyyyyyy !! Now its too much ! I have been reading endless posts that are leading me no where !
    I was trying to resolve the issue ...Here is some information...Any help or comments greatly appreciated !
    "rpm -qa | grep kernel " gives this :
    kernel-desktop-2.6.34.7-0.7.1.i586
    nfs-kernel-server-1.2.1-8.3.1.i586
    kernel-firmware-20100617-2.2.noarch
    kernel-desktop-devel-2.6.34.7-0.7.1.i586
    kernel-source-2.6.34.7-0.7.1.noarch
    kernel-devel-2.6.34.7-0.7.1.noarch

    "insmod tool.ko" gives this
    insmod: error inserting 'tool.ko': -1 Invalid module format

    "modinfo /home/administrator/Downloads/mpi_test/drv/tool.ko" gives this...
    filename: /home/administrator/Downloads/mpi_test/drv/tool.ko
    srcversion: C324262993FF2C24605E7B6
    depends:
    vermagic: 2.6.34.7-0.7-desktop SMP preempt mod_unload modversions 686
    parm: spc_test_name:ushort
    parm: hp_array:array of long

    "dmesg" gives this info :
    4004.370062] tool: no symbol version for module_layout

    Any Idea whats wrong ?? I noticed only one difference kernel-desktop-2.6.34.7-0.7.1.i586 and vermagic: 2.6.34.7-0.7-desktop SMP preempt mod_unload modversions 686 ....WHat is this supposed to mean ?

    --Thanks
    Ram

  5. #5
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Error using Insmod/modprobe.

    On 03/24/2011 12:36 AM, justkar4u wrote:
    >
    > Okayyyyyyy !! Now its too much !


    it may not be possible for me to help you, but lets start from the
    basic information the real helplers here might need to help you:

    what module are you trying to compile and insert?
    and (if you don't mind) why?

    did you compile from source? please give us the complete URL to the
    source package you downloaded

    > Any Idea whats wrong ?? I noticed only one difference
    > kernel-desktop-2.6.34.7-0.7.1.i586 and vermagic: 2.6.34.7-0.7-desktop
    > SMP preempt mod_unload modversions 686 ....WHat is this supposed to mean
    > ?


    kernel modules _must_ match the kernel it is compiled for use
    with...(i assume you followed a step-by-step, please give us the URL
    to that guide) along the way the guide said to download the kernel
    headers (or something like that), you MUST install _the_ kernel
    headers for _the_ kernel you intend to insert the module into--check
    that the two match completely..

    i see you named your home "administrator" which causes me to ask if
    you became root in the terminal before issuing the "insmod tool.ko"
    command....that is to say that in linux you must log in as a regular
    user (you can name him/her 'administrator' if you wish) and then
    become root in the terminal (or use root powered application, like
    yast) to actually _be_ the super user aka root..

    caution, do not log into the desktop environments of KDE, Gnome, LXDE
    or any other DE of any *nix like operating system...read more on that
    here:
    http://en.opensuse.org/SDB:Login_as_root
    http://tinyurl.com/ydbwssh
    http://tinyurl.com/4nsaqst
    http://tinyurl.com/6ry6yd

    in several of those you will see how to switch user from the normal
    user named "administrator" to root..

    let us know how you get on..

    --
    DenverD
    CAVEAT: http://is.gd/bpoMD
    [NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.1.8, nVidia
    173.14.28 3D, Athlon 64 3000+]
    "It is far easier to read, understand and follow the instructions than
    to undo the problems caused by not." DD 23 Jan 11

  6. #6

    Default Re: Error using Insmod/modprobe.

    Hi there,

    You could also check these two issues:

    Verify you are using the same version of GCC as was used to compile your kernel (check with cat /proc/version and gcc --version)

    can' compile fuse module - VPSlink Forums

    If you are using a provided makefile, verify how it is building the module:

    Kernel Module Devlopment insmod issues

    Cheers,
    LewsTherin

  7. #7

    Default Re: Error using Insmod/modprobe.

    Hi ,

    Its a driver which I am trying to compile and insert. Unfortunately it is an internal tool used by the company, so I cannot provide any link for anything. I tried installing the kernel headers but it said "linux-glibc-devel' providing 'kernel-headers' is already installed".
    The step by step procedure for compiling and installing is nothing. Just download the source from this place -> do a make and then do an insmod ! thats it !

    I am looged in as a normal user and then for compiling and inserting , i looged in as Su.

    the gcc and compile versions are same ..I looked at the make file and it does specify the proper path as mentioned in the link given by LewsTherinTelemon. ! So Here I am stuck with no clue again !

    -
    Ram

  8. #8
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Error using Insmod/modprobe.

    On 03/24/2011 07:06 PM, justkar4u wrote:

    > Its a driver
    > which I am trying to compile and insert. Unfortunately it
    > is an internal tool used by the company,


    it is an internal tool used by the company you work for, or ??

    can the company which makes this internal tool not give you any help
    in compiling, setting up, trouble shooting, etc?

    if they can't how could we?


    > so I cannot provide any link
    > for anything. I tried installing the kernel headers but it said


    what is the "it" in that sentence fragment above? that is, what it
    said the following


    > "linux-glibc-devel' providing 'kernel-headers' is already installed".



    did you install the needed kernel bits using YaST? zypper? other (what)?



    > The step by step procedure for compiling and installing is nothing.
    > Just download the source from this place -> do a make and then do an
    > insmod ! thats it !


    is that the procedure given to you by the company making the device
    driver?


    > I am looged in as a normal user and then for compiling and inserting ,
    > i looged in as Su.


    there is usually a security concern if you run make as root....did the
    company making the device driver tell you to compile as root?


    > the gcc and compile versions are same ..I looked at the make file and
    > it does specify the proper path as mentioned in the link given by
    > LewsTherinTelemon. ! So Here I am stuck with no clue again !


    bottom line: i can't see how this could be an openSUSE problem...i
    think it much more likely to be something else...tell, me this tool
    and the source provided:

    - is it 64 bit?
    - 32 bit?
    - PPC?
    - no arch?

    is it certified for use with openSUSE 11.3, or maybe with SLES 11..
    what is it? i mean it may have been made for a Spark for all we know..

    all of those kinds of questions i hoped to sort though by being able
    to download and test compile/install on my 11.3 32...

    i can't help more other that to say that from here i can't solve you
    problem...you are very welcome to hang out here until a real guru
    comes along who can......but, i would highly recommend your company
    either provide you the training you deserve, hand you a step-by-step
    you can follow, or hire a qualified Linux administrator you can learn
    from while on the job...

    ymmv--that is just my opinion and not meant to be a put down or
    hurtful in any way whatsoever..

    --
    DenverD
    CAVEAT: http://is.gd/bpoMD
    [NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.1.8, nVidia
    173.14.28 3D, Athlon 64 3000+]
    "It is far easier to read, understand and follow the instructions than
    to undo the problems caused by not." DD 23 Jan 11

  9. #9

    Default Re: Error using Insmod/modprobe.

    On 03/24/2011 07:06 PM, justkar4u wrote:

    > Its a driver
    > which I am trying to compile and insert. Unfortunately it
    > is an internal tool used by the company,


    it is an internal tool used by the company you work for, or ??

    can the company which makes this internal tool not give you any help
    in compiling, setting up, trouble shooting, etc?

    if they can't how could we?
    >>

    Completely valid question. The senior engineer were trying to help but only when they were free. I was trying to solve it in the meanwhile by referring to online help. Nope they dont have any troubleshooting tips since its a simple internal tool for debugging purposes only and does not have clear documentation.


    > so I cannot provide any link
    > for anything. I tried installing the kernel headers but it said


    what is the "it" in that sentence fragment above? that is, what it
    said the following


    > "linux-glibc-devel' providing 'kernel-headers' is already installed".



    did you install the needed kernel bits using YaST? zypper? other (what)?
    >>

    Zypper.. I am a newbie but i learn fast !


    > The step by step procedure for compiling and installing is nothing.
    > Just download the source from this place -> do a make and then do an
    > insmod ! thats it !


    is that the procedure given to you by the company making the device
    driver?


    > I am looged in as a normal user and then for compiling and inserting ,
    > i looged in as Su.


    there is usually a security concern if you run make as root....did the
    company making the device driver tell you to compile as root?


    > the gcc and compile versions are same ..I looked at the make file and
    > it does specify the proper path as mentioned in the link given by
    > LewsTherinTelemon. ! So Here I am stuck with no clue again !


    bottom line: i can't see how this could be an openSUSE problem...i
    think it much more likely to be something else...tell, me this tool
    and the source provided:

    - is it 64 bit?
    - 32 bit?
    - PPC?
    - no arch?

    is it certified for use with openSUSE 11.3, or maybe with SLES 11..
    what is it? i mean it may have been made for a Spark for all we know..
    >>

    A lot of ppl try to build new modules all the time and experiment with OS and face issues. Its not like ppl intall only certified softwares on their systems...So I believe its perfectly normal for me to refer the forum in trying to resolve any similar issues that might have been answered already or ask for help!

    all of those kinds of questions i hoped to sort though by being able
    to download and test compile/install on my 11.3 32...

    i can't help more other that to say that from here i can't solve you
    problem...you are very welcome to hang out here until a real guru
    comes along who can......but, i would highly recommend your company
    either provide you the training you deserve, hand you a step-by-step
    you can follow, or hire a qualified Linux administrator you can learn
    from while on the job...
    >>

    Senior ppl in the organization dont like to be bothered with small stuff (BUT it is big thing for us newbie's). SO I was trying to resolve it somehow myself by taking help from forum...Nevertheless the issue was solved by a senior member here , but i had to re-install suse and he had to update install steps in the guide !!

    ymmv--that is just my opinion and not meant to be a put down or
    hurtful in any way whatsoever..

    >>
    [color=red]
    No worries .. I am here to learn and hopefully help ppl in future just like u guys do I believe no one was born with all the knowledge ...We all learn eventually and I understand what you meant and dint take it in a wrong way ! Cheers
    --
    DenverD


    replied in the quotes ...

  10. #10
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Error using Insmod/modprobe.

    On 03/25/2011 04:36 AM, justkar4u wrote:
    >
    > I understand what you meant and dint take it in
    > a wrong way ! Cheers


    glad to hear that!
    good luck to you....come back...there is a LOT to learn here...the
    senior engineers would do you a big favor by _requiring_ you to learn
    more about the *nix way of doing stuff..

    it is where the future is..

    i know the world's prime desktop and game maker is doing their very
    best to break into the enterprise space but i doubt they will not be
    successful..

    if you are gonna work the supercomputers of the future you will not
    need to know which button to double click on . . .

    --
    DenverD
    CAVEAT: http://is.gd/bpoMD
    [NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.1.8, nVidia
    173.14.28 3D, Athlon 64 3000+]
    "It is far easier to read, understand and follow the instructions than
    to undo the problems caused by not." DD 23 Jan 11

Posting Permissions

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