LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   modprobe ndiswrapper (FATAL: Error inserting ndiswrapper ) (https://www.linuxquestions.org/questions/slackware-14/modprobe-ndiswrapper-fatal-error-inserting-ndiswrapper-806922/)

dh2k 05-10-2010 04:24 AM

modprobe ndiswrapper (FATAL: Error inserting ndiswrapper )
 
I have managed to use ndiswrapper to try and use Windows XP driver (inf, sys etc) and ndiswrapper is now configured and can see the device;
I verified this with 'ndiswrapper -l'
which shows device present with correct device id as matched in 'lsusb'.

The ndiswrapper guide from the source docs then advise to 'modprobe ndiswapper' to insert and load the module to allow a wlan0 device to be configured with wireless-tools.

But I get the error:
Code:

FATAL: Error inserting ndiswrapper (/lib/modules/2.6.29.6/misc/ndiswrapper.ko): Invalid module format
I thought the '.ko' format was correct for 2.6.x kernel and '.o' was for 2.4.x kernel.

Where am I going wrong??

gold_leaf 05-10-2010 05:41 AM

Just to check, you wouldn't be trying to load 32 bit drivers onto a 64 bit system or vice versa? I know that trying this brings up an error like this.

dh2k 05-10-2010 05:53 AM

sorry, here is more system/setup info:

default hugesmp.s kernel 32-bit in use straight from install;

no kernel modding/hacking/custom-builds etc;

ndiswrapper built on same system it is being used on;

ndiswrapper built from slackbuilds.org with source & slackbuild script from slackbuilds from 32-bit source;

installed '.tgz' from consequent slackbuild from '/tmp' using 'installpkg'.


32-bit system, Slackware 13, full install from 32-bit, dvd iso;

on this box: 256MB RAM; 900MHz;

I am using same 32-bit slack on other boxes with more open-source compliant hardware without problems.

windows XP 32-bit driver is for a WinBond Usb2Wlan USB Wireless adapter (NB, for other linux users/searches, STAY AWAY FROM THIS HARDWARE VENDOR - a nightmare!!)

lumak 05-10-2010 12:46 PM

You should not be using the huge kernel. It is for install only as well as non special setups. That is, only needing it to function as is out of the box.

If you have to install any kind of your own drivers, you should be using the generic kernel.

This does require you to create an initrd image however. There is a helper script included in Slackware under /usr/share/mkinitrd??

BTW...
2.6.29.6 is for non smp systems. chances are you are running the 2.6.29.6-smp??? list the output of "uname -r"

dh2k 07-13-2010 01:14 PM

Quote:

Originally Posted by lumak (Post 3963566)
This does require you to create an initrd image however. There is a helper script included in Slackware under /usr/share/mkinitrd??

Code:

uname -r
2.6.29.6

I have created an initrd using generic kernel 2.6.29.6 (non-smp) but still getting same error:

Code:

FATAL: Error inserting ndiswrapper (/lib/modules/2.6.29.6/misc/ndiswrapper.ko): Invalid module format
why can I not insert ndiswrapper as a module using modprobe?

ndiswrapper is a slackbuild after I created the initrd with generic kernel - same machine, same kernel, no additional options/parameters passed for the SBo - just a plain vanilla Slackbuild using "./ndiswrapper*.SlackBuild".

bgeddy 07-13-2010 01:43 PM

Check the outputs of the following
Code:

uname -r -v
/sbin/modinfo -F vermagic ndiswrapper


dh2k 07-13-2010 05:50 PM

Code:

root@eva-earth:~/Projects/W2kXP# uname -r -v
2.6.29.6 #1 Mon Aug 17 01:16:02 CDT 2009
root@eva-earth:~/Projects/W2kXP#

Code:

root@eva-earth:~/Projects/W2kXP# /sbin/modinfo -F vermagic ndiswrapper
2.6.29.6-smp SMP mod_unload 686
root@eva-earth:~/Projects/W2kXP#

Ah - I see the 'smp' - but why? The kernel I have built ndiswrapper is with is non-smp - so does that mean the slackbuild version of ndiswrapper is an smp build version? - I have read the readme and also gone through the slackbuild script in 'ndiswrapper.tar.gz' and there is no mention of 'smp' or any method of passing smp (or non-smp) as a parameter/option when building the slackbuild package.

T3slider 07-13-2010 06:22 PM

From CHANGES_AND_HINTS.TXT:
Code:

Use one of the provided generic kernels for daily use.  Do not report
  bugs until/unless you have reproduced them using one of the stock
  generic kernels.  You will need to create an initrd in order to boot
  the generic kernels - see /boot/README.initrd for instructions.
  The huge kernels are primarily intended as "installer" and "emergency"
  kernels in case you forget to make an initrd.  For most systems, you
  should use the generic SMP kernel if it will run, even if your system is
  not SMP-capable.  Some newer hardware needs the local APIC enabled in the
  SMP kernel, and theoretically there should not be a performance penalty
  with using the SMP-capable kernel on a uniprocessor machine, as the SMP
  kernel tests for this and makes necessary adjustments.  Furthermore, the
  kernel sources shipped with Slackware are configured for SMP usage, so you
  won't have to modify those to build external modules (such as NVidia or
  ATI proprietary drivers) if you use the SMP kernel.

  If you decide to use one of the non-SMP kernels, you will need to follow the
  instructions in /extra/linux-2.6.33.4-nosmp-sdk/README.TXT to modify your
  kernel sources for non-SMP usage.  Note that this only applies if you are
  using the Slackware-provided non-SMP kernel - if you build a custom kernel,
  the symlinks at /lib/modules/$(uname -r)/{build,source} will point to the
  correct kernel source so long as you don't (re)move it.

You need to reconfigure your kernel sources for the non-smp kernel or you will not be able to properly build any out-of-tree kernel modules.

dh2k 08-03-2010 05:29 AM

mkinitrd'ed with generic-2.6.29.6-smp, then lilo bootloader configured appropriately and 'modprobe ndiswrapper' is working perfectly.
Thank you for all support.


All times are GMT -5. The time now is 08:43 AM.