LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Depmod not finding ndiswrapper module (https://www.linuxquestions.org/questions/linux-newbie-8/depmod-not-finding-ndiswrapper-module-674964/)

ifeatu 10-08-2008 12:31 AM

Depmod not finding ndiswrapper module
 
I have been trying to get my wireless card for my Dell 1525 installed using this tutorial

I keep getting the following error after running the depmod command:

Code:

[root@localhost modprobe.d]# /sbin/depmod ndiswrapper
WARNING: Module ndiswrapper is not an elf object


At this point ndiswrapper is installed properly (from what I understand) and my driver is also installed properly shown by the following cmd:

Code:

[root@localhost modprobe.d]# /usr/sbin/ndiswrapper -l
bcmwl6 : driver installed
        device (14E4:4315) present

[root@localhost modprobe.d]# /usr/sbin/ndiswrapper -l
bcmwl6 : driver installed
device (14E4:4315) present

I cannot understand the whole module thing, and what it is attempting to do through this step...can you please shed some light on this?!

Hangdog42 10-08-2008 07:29 AM

Quote:

/sbin/depmod ndiswrapper
That syntax is wrong. You should run depmod -a, not depmod ndiswrapper.


Quote:

I cannot understand the whole module thing, and what it is attempting to do through this step...can you please shed some light on this?!
Modules are essentially portions or extensions of the kernel that are compiled as separate bits so that you can load, or unload them as needed. The depmod command generates a file of dependencies for all the modules you've got on your system so that the kernel knows what other portions of the kernel (or other modules) need to be there in order for a given module to work. For example, on my system the Intel wireless driver requires a couple of other modules in order to work, and depmod generates the map file (System.map) that tells the kernel about those other modules.

ifeatu 10-08-2008 10:05 AM

modprobe not working
 
Quote:

Originally Posted by Hangdog42 (Post 3304019)
That syntax is wrong. You should run depmod -a, not depmod ndiswrapper.

okay...I got that command working but the very next step yields yet another roadblock:


Code:

[root@localhost Desktop]# /sbin/modprobe ndiswrapper
FATAL: Module ndiswrapper not found.

Why would it say that the module is not found? I even tried doing:

Code:

[root@localhost Desktop]# /sbin/modprobe /etc/modules/ndiswrapper
FATAL: Module /etc/modules/ndiswrapper not found.

This has been frustrating me for hours!!

Hangdog42 10-08-2008 11:27 AM

Quote:

Why would it say that the module is not found?
This suggests a few possibilities. If you installed ndiswrapper from a pre-compiled package, it may not have been the package for your kernel version, in which case ndiswrapper installed in the wrong place. If you compiled from source, you may not have run make install. some more details around how you installed ndiswrapper would likely be useful.


Quote:

FATAL: Module /etc/modules/ndiswrapper not found.
Modules are never stored in /etc, they are always stored in /lib/modules/yourkernelversion, and modprobe knows this. You should never have to specify the location of the module.

ifeatu 10-08-2008 01:45 PM

make install help
 
okay...so I took your advise and got the latest version of ndiswrapper
I unpackaged it and ran "make install" (as the INSTALL file instructed me to do) and then ran a "make" this is the result that I got (I believe I got this same result before which went unresolved)

Code:

[ifeatu@localhost ndiswrapper-1.53]$ make
make -C driver
make[1]: Entering directory `/home/ifeatu/Desktop/ndiswrapperNew/ndiswrapper-1.53/driver'
Makefile:23: *** Kernel tree not found - please set KBUILD to configured kernel.  Stop.
make[1]: Leaving directory `/home/ifeatu/Desktop/ndiswrapperNew/ndiswrapper-1.53/driver'
make: *** [all] Error 2

Please advise as to what is going on here.

Total-MAdMaN 10-08-2008 01:50 PM

That looks like it can't find the source code for the kernel. Install the kernel source code package for your current kernel using the package manager of your distro.

ifeatu 10-08-2008 05:51 PM

Still not working after Source install
 
Quote:

Originally Posted by Total-MAdMaN (Post 3304355)
That looks like it can't find the source code for the kernel. Install the kernel source code package for your current kernel using the package manager of your distro.

Okay...I took your advice and installed my kernel source using this tutorial and I'm still getting the same error when I try to "make" ndiswrapper...I'm running Fedora Core 9 on an Inspiron 1525. Any other suggestions?

Hangdog42 10-08-2008 06:01 PM

Quote:

Originally Posted by ifeatu (Post 3304626)
Okay...I took your advice and installed my kernel source using this tutorial and I'm still getting the same error when I try to "make" ndiswrapper...I'm running Fedora Core 9 on an Inspiron 1525. Any other suggestions?

If you followed that tutorial, then the source code has been installed in a place that ndiswrapper isn't looking for it. The source code should be in the /usr/src/linux directory, and from that tutorial it is in /usr/src/redhat. Double check that this is where it is, and then create a soft link in /usr/src pointing to the source code:

ln -s /usr/src/redhat /usr/src/linux

If you change directory into /usr/src/linux, then you should be in the kernel source directory.

ifeatu 10-08-2008 09:03 PM

Quote:

Originally Posted by Hangdog42 (Post 3304632)
If you followed that tutorial, then the source code has been installed in a place that ndiswrapper isn't looking for it. The source code should be in the /usr/src/linux directory, and from that tutorial it is in /usr/src/redhat. Double check that this is where it is, and then create a soft link in /usr/src pointing to the source code:

ln -s /usr/src/redhat /usr/src/linux

If you change directory into /usr/src/linux, then you should be in the kernel source directory.

Okay, so I created that link that you referenced...how does this address the KBUILD issue though still getting the same error:

Code:

[root@localhost ndiswrapper-1.53]# ls
AUTHORS    driver  loadndisdriver.8  ndiswrapper.8    README
ChangeLog  INSTALL  Makefile          ndiswrapper.spec  utils
[root@localhost ndiswrapper-1.53]# make install
make -C driver install
make[1]: Entering directory `/home/ifeatu/Desktop/ndiswrapperNew/ndiswrapper-1.53/driver'
Makefile:23: *** Kernel tree not found - please set KBUILD to configured kernel.  Stop.
make[1]: Leaving directory `/home/ifeatu/Desktop/diswrapperNew/ndiswrapper-1.53/driver'
make: *** [install] Error 2

I was thinking about setting the environmental variable to the directory you specified (/usr/src/linux) but it won't let me set a variable to a directory...should I attempt to set the environmental variable to the path of something else...if you say "the kernel" FYI I have no idea where that is at this point. Thanks for your help so far...I'll really working at this as hard as possible.

ifeatu 10-08-2008 09:12 PM

card not working
 
also as another point...ndiswrapper IS in fact installed...as I alluded to earlier in my posts but for some reason the paths that it created differed from that of my kernel version or whatever...I'm really confused as to why the card just doesnt work at this point
Here is the command that proves both ndiswrapper and the drivers for my wireless NIC are installed:

Code:


       
Code:

       
[root@localhost ndiswrapper-1.53]# /usr/sbin/ndiswrapper -l
bcmwl6 : driver installed
        device (14E4:4315) present



But when I go to Network Configuration in GNOME it shows wlan0 as inactive...when I activate it it says "eth1" does not seem to be present" (I thought it was wlan0?!)
Under the Hardware tab it has two devices...my ethernet (which I'm using now) and my wireless (wlan0) which apparently is in a configured status...

I'll throw you for another loop...I installed ubuntu before I had fedora on here, and ubuntu had the curtousy to at least show available wireless Networks to connect to, but it wouldn't connect to them...

jschiwal 10-08-2008 10:03 PM

ndiswrapper has a program and a kernel module. If you install from an rpm, then there will be two packages. When I used ndiswrapper on SuSE, I would extract the ndiswrapper.spec file and copy it to the SPECS directory. Then I would copy the source tarball to the SOURCES directory and build the two rpm packages using the rpmbuild program. Then I would install the package using the rpm command.

Install the "wireless-tools" package. Use "lsmod" to see if the ndiswrapper kernel module is loaded. Use the iwlist command to see if the wireless device detects access points. You won't get an IP address (using DHCP) until after the WPA-PSK process is finished. If you see Access Points listed, then proceed configuring WPA.

Hangdog42 10-09-2008 07:44 AM

Quote:

Okay, so I created that link that you referenced...how does this address the KBUILD issue though still getting the same error:
Did you ever run make, or did you just jump straight to make install?

ifeatu 10-09-2008 10:58 AM

Quote:

Originally Posted by Hangdog42 (Post 3305149)
Did you ever run make, or did you just jump straight to make install?

I get the same error whether I run "make" or "install"...so I took some initiative and walked through the "make process for ndiswrapper...it accesses a folder called driver and then a file called "Makefile" so I opened that make file and tried to give it an explicit path to KBUILD...
here is an excerpt of the code (I commented out the original path of KBUILD:
Code:

#KBUILD ?= $(shell readlink -f /lib/modules/$(KVERS)/build)
KBUILD = /usr/src/redhat/BUILD/kernel-2.6.26/linux-2.6.26.i686
ifeq (,$(KBUILD))
$(error Kernel tree not found - please set KBUILD to configured kernel)
endif

# Kernel Makefile doesn't always know the exact kernel version, so we
# get it from the kernel headers instead and pass it to make.

VERSION_H := $(KBUILD)/include/linux/utsrelease.h

so now the code errors out when it attempts to find the file utsrelease.h (above) I tried to do a "find" for that file and came up with nothing, I think that's something I'm supposed to have after compiling the kernel. Naturally I thought it was a kernel recompile issue...recompiled my kernel, but to no avail...very...very...confused.

Hangdog42 10-10-2008 07:37 AM

I think that ndiswrapper is expecting KBUILD to be an environment variable, not one in the script. Try setting it as an environment variable and see if that helps:

export KBUILD=/usr/src/redhat/BUILD/kernel-2.6.26/linux-2.6.26.i686


Quote:

..very...very...confused.
If it is any consolation, you're not alone. Ndiswrapper is usually not this hard, and unfortunately the ndiswrapper team has re-done their website and trashed a lot of useful information.


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