What can be the reason for "Invalid module format"?

10,811

Module and kernel are not the same version OR, some times, you can get this error if you didn't used the same compiler for modules and kernel.

In your case, you recompiled the kernel and you didn't change/rebuild initrd. The screenshot what you posted now, show us a bad initrd with old modules. You should reboot with the old kernel (if you didn't overwrite it) and rebuild initrd also.

Regards

Share:
10,811

Related videos on Youtube

yum
Author by

yum

Updated on September 17, 2022

Comments

  • yum
    yum over 1 year

    I'm following the steps to compile kernel 2.6.32 from source,

    and have no problem to go the the last step:

    ...
    make modules_install 
    make install
    

    And I've also configured grub.conf correctly.

    But when I try to reboot,it fails to boot:

    insmod: error insertimg '/lib/ehci-hcd.ko': -1 Invalid module format
    ...
    

    What can be the reason?

    Error when booting

  • yum
    yum about 13 years
    But when kernel panic happens,I can not type any shell commands.
  • Marcela Lozano
    Marcela Lozano about 13 years
    You forget to rebuild initrd.
  • yum
    yum about 13 years
    Nope,make install does this for you automatically.