LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-08-2008, 12:31 AM   #1
ifeatu
Member
 
Registered: Sep 2008
Distribution: Fedora 9
Posts: 68

Rep: Reputation: 15
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?!
 
Old 10-08-2008, 07:29 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.
 
Old 10-08-2008, 10:05 AM   #3
ifeatu
Member
 
Registered: Sep 2008
Distribution: Fedora 9
Posts: 68

Original Poster
Rep: Reputation: 15
modprobe not working

Quote:
Originally Posted by Hangdog42 View Post
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!!
 
Old 10-08-2008, 11:27 AM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.
 
Old 10-08-2008, 01:45 PM   #5
ifeatu
Member
 
Registered: Sep 2008
Distribution: Fedora 9
Posts: 68

Original Poster
Rep: Reputation: 15
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.
 
Old 10-08-2008, 01:50 PM   #6
Total-MAdMaN
Member
 
Registered: May 2008
Distribution: Gentoo
Posts: 306

Rep: Reputation: 34
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.
 
Old 10-08-2008, 05:51 PM   #7
ifeatu
Member
 
Registered: Sep 2008
Distribution: Fedora 9
Posts: 68

Original Poster
Rep: Reputation: 15
Still not working after Source install

Quote:
Originally Posted by Total-MAdMaN View Post
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?
 
Old 10-08-2008, 06:01 PM   #8
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
Originally Posted by ifeatu View Post
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.
 
Old 10-08-2008, 09:03 PM   #9
ifeatu
Member
 
Registered: Sep 2008
Distribution: Fedora 9
Posts: 68

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Hangdog42 View Post
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.
 
Old 10-08-2008, 09:12 PM   #10
ifeatu
Member
 
Registered: Sep 2008
Distribution: Fedora 9
Posts: 68

Original Poster
Rep: Reputation: 15
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...
 
Old 10-08-2008, 10:03 PM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 10-09-2008, 07:44 AM   #12
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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?
 
Old 10-09-2008, 10:58 AM   #13
ifeatu
Member
 
Registered: Sep 2008
Distribution: Fedora 9
Posts: 68

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Hangdog42 View Post
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.
 
Old 10-10-2008, 07:37 AM   #14
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ndiswrapper Error:couldn't add module alias: at /usr/sbin/ndiswrapper-1.9 line 717. Skuggi Linux - Wireless Networking 1 06-07-2007 11:57 AM
ndiswrapper / depmod /modprobe error android6011 Linux - Software 3 04-24-2006 06:03 PM
Depmod not working for my driver module bhuvanmital Fedora 3 04-24-2006 05:05 AM
Finding the kernel headers needed for Ndiswrapper? gandhi Debian 2 03-19-2005 08:02 PM
compiling a kernel: module-init-tools conflict, depmod problem, modules sterrenkijker Debian 3 03-08-2004 10:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration