LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   modprobe problem: Error inserting ndiswrapper.ko Invalid module format (https://www.linuxquestions.org/questions/linux-hardware-18/modprobe-problem-error-inserting-ndiswrapper-ko-invalid-module-format-493287/)

Antarctica 10-17-2006 04:41 PM

modprobe problem: Error inserting ndiswrapper.ko Invalid module format
 
Hey all, this is an exact copy of a thread I posted on www.fedoraforum.org. I thought I could get some help here since nobody has replied over there yet. Here's the thread I posted over there:

Hey all, I'm trying to help a friend of mine get wireless Internet working on her computer and we seem to have run into a problem. She is running Fedora Core 5 and has the Netgear MA101 wireless USB Adapter. At one time I tried running modprobe ndiswrapper and the computer froze. So I looked at the FAQ on NdisWrapper's Wiki and it told me to download the 16K stack kernel for her system since some cards have issues with Fedora Core's 4K stack size. Well, during that time I was searching, she formatted her computer and tried to install Windows 2000 but encountered an error. So, I formatted her computer and installed again Fedora Core 5. Since she has no Internet on her computer, she has to rely solely on wireless Internet through her Netgear MA101 wireless USB adapter. By the way, I'm not sure which revision it is. So, I went through the following process to get Internet working on her computer.
  1. I installed kernel-2.6.15-1.2054.stk16.i686_FC5.rpm
  2. I then installed kernel-devel-2.6.15-1.2054.stk16.i686_FC5.rpm to her computer.
  3. I compiled and installed in order the following programs by running ./configure, make, and make install: libusb-0.1.12, usbutils-0.72, and wireless_tools.28.
  4. Next, after making a symbolic link to the kernel source, I compiled and installed ndiswrapper-1.23 by running only make and make install.
  5. After installing ndiswrapper, we created a directory called /ndisdrivers, and copied the Windows XP drivers for the MA101 device from the original CD to /ndisdrivers.
  6. We then installed the MA101 driver and checked the device to see if the driver is installed and that the hardware is present by running ndiswrapper -l. All went successful.
  7. Following the tutorial on MANIX-Place , I ran depmod -a.
  8. Then I ran modprobe ndiswrapper and received the following output:
    Code:

    FATAL:  Error inserting ndiswrapper
    (/lib/modules/2.6.15-1.2054_FC5/misc/ndiswrapper.ko):  Invalid module format


I've searched around the Internet for a while and cannot seem to find anyone with a similar problem for Fedora Core 5 and a 16K stack size kernel. The only thing that I could probably do is recompile or upgrade GCC with the 16K stack kernel or upgrade her kernel and kernel-devel to the 2.6.17-1.stk16.i686_FC5 kernel and start over. Can anyone help us please?

dracolich 10-18-2006 01:38 PM

I think you need to know if you have version A or B of the MA101. Run lsusb -v and see what it says about it. If there's anything about atmel it's the B. A quick Google search shows a lot of people have similar problems and I found this on another forum

Quote:

atmel driver works, not ndiswrapper
Submitted by brsnstck on Wed, 05/25/2005 - 11:25.

I discovered that you need to compile the atmel driver for MA101 netgear wireless usb device, and that ndiswrapper doesn't work with the ma101 drivers supplied with netgear. Go to http://atmelwlandriver.sourceforge.net/downloads.html and get the atmel driver.

Antarctica 10-18-2006 04:57 PM

I'll try that.
 
Yeah, I knew the version would be a big difference, but I didn't know where to begin. Now, I told my friend to run dmesg and she got a long list of output. She emailed me the output, and at the very bottom (the last line), it reads

Code:

ndiswrapper: version magic '2.6.15-1.2054_FC5.stk16 686 REGPARM 16KSTACKS gcc-4.1' should be '2.6.15-1.2054_FC5 686 REGPARM 4KSTACKS gcc-4.1'
So, I'm thinking that I need to recompile gcc-4.1 and any dependencies with the 16K stack kernel. Do you think that will fix the problem?

dracolich 10-18-2006 05:23 PM

Looks to me like it's saying ndiswrapper is compiled with 16k stacks but it should've been compiled with 4k. If that's the case then it's a kernel issue because that's where 4k or 16k is set. I use a kernel with 4k and ndiswrapper always tells me 4k kernel support might not work right but mine, version 1.21, is fine. Before changing kernel stuff (or gcc stuff) have you tried modprobe -f? The -f is the force option to [hopefully] override errors such as this. You might also try a different ndiswrapper version. Myself and many others have had cases when a new version won't install or work properly but the version prior works like a champ.

dxqcanada 10-18-2006 05:28 PM

Re: Invalid module format
 
This occurs when the module has been built against a kernel that is not the currently running kernel.

If you built a new kernel and modules from new sources then setup your boot loader to load this new kernel.
Then reboot into this new kernel and load the ndis module.

Antarctica 10-18-2006 07:25 PM

Hey all, thanks for your help. I asked my friend to go into GRUB and boot into the new kernel, but she told me that she saw only one kernel: 2.6.15-1.2054_FC5. I'm not sure, but isn't she supposed to see another kernel, 2.6.15-1.2054.stk16_FC5? When I was at her house, I installed the 16K stack kernel and the 16K stack kernel-devel from Linuxant. I could ask her to reinstall those two. Also, we used the RPMs to install the kernels. Maybe we could try building them from source?

By the way, the version of ndiswrapper we compiled and installed from source is 1.23, so it's a fairly recent version.

Anyway, like I said before, I installed the 16K stack kernels because modprobe ndiswrapper froze when we used the 4K stack kernels, and the Fedora page of the NdisWrapper Wiki told me to use the 16K stack kernels on Fedora Core 5 if the computer froze.

I'll tell my friend to use modprobe -f ndiswrapper and see if that works. Thanks in advance for all your help. Wish us luck!

Antarctica 10-18-2006 09:40 PM

Yay, progress!
 
Hey all of you! I just wanted to update my posts. She told me that she has the rev B, so I got her to download the Atmel wlan driver for her Netgear MA101 wireless ethernet device from Sourceforge

I'm getting her to run make install to install the driver since make was already done in the download. Hopefully we'll get this working. Does anybody know what to do after running make install?

Antarctica 10-18-2006 10:23 PM

Just another update...
 
I've found out, with help from dracolich, that I need to use the atmel driver instead of ndiswrapper since my friend is using the MA101 wireless USB device, rev B. The latest version she downloaded was from the top of the Atmel site, which was atmelwlandriver-3.4.1.1.tar.bz2. She extracted it and opened the terminal. Then she changed to the atmelwlandriver directory and ran make install. I tried to get her to run make, but that wouldn't work for some reason. I'm out of luck here. Can somebody show me how to get the Atmel driver working for Fedora Core 5? Perhaps, if you want, you could show me a recent tutorial? Thanks in advance.

oldjoe 11-25-2006 04:04 PM

Same problem with D-Link DWL-G120
 
I ge the same 'invalid module format' when I try to run modprobe. I do the dmesg and get a long output. At the bottom of the output I get this:

ndiswrapper: version magic '2.6.18-1.2849.fc6 SMP mod_unload 686 REGPARM 4KSTACKS gcc-4.1' should be '2.6.18-1.2849.fc6 SMP mod_unload 586 REGPARM 4KSTACKS gcc-4.1'


How do I get my wireless adapter working. I have been trying to fix this for weeks. I am ready to give up because of the time I have put into getting this to work. Please help!


All times are GMT -5. The time now is 11:39 PM.