Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    insmod: error inserting 'kernel.ko': -1 Invalid parameters

    I am getting this error when i am try to insert kernel.ko into kernel

    My system
    fedora 12 with gcc 4.4.2

    insmod kernel.ko
    insmod: error inserting 'kernel.ko': -1 Invalid parameters

    my program
    __________________kernel.c________________________ ___________

    #include <linux/module.h> /* Needed by all modules */
    #include <linux/kernel.h> /* Needed for KERN_INFO */

    int init_module(void)
    printk("Hello world 1.\n");
    return 0;

    void cleanup_module(void)
    printk("Goodbye world 1.\n");
    _________________________END______________________ _____________

    obj-m += kernel.o

    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

    -----------------------------------------FILE GENERATED---------------------------------------------------
    -rw-r--r--. 1 root root kernel.c
    -rw-r--r--. 1 root root Makefile
    -rw-r--r--. 1 root root kernel.o
    -rw-r--r--. 1 root root modules.order
    -rw-r--r--. 1 root root Module.symvers
    -rw-r--r--. 1 root root kernel.mod.c
    -rw-r--r--. 1 root root Module.markers
    -rw-rw-r--. 1 root root kernel.mod.o
    -rw-r--r--. 1 root root kernel.ko

    ___________________________END____________________ ___________________

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Canada, Prince Edward Island
    Can't see anything wrong with your module...Why would you name it kernel.c, its seems to me that's asking for trouble..
    Make mine Arch Linux

  3. #3
    Yeah, try renaming your module and file to anything but kernel, it should then work... also
    printk("Hello world 1.\n");
    should really be
    printk(KERN_INFO "Hello world 1.\n");
    but wouldn't be the cause of your problem here.

  4. $spacer_open
  5. #4



    I think u should be in super user mode to insert module.Please check that ....


Posting Permissions

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