LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 07-20-2005, 02:13 AM   #1
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Rep: Reputation: 30
ndiswrapper can't find my kernel... where is it?


I'm trying to get ndiswrapper installed to get a usb radio dongle working on my PC.

I've read loads of documentation, and have been greatly helped by this forum. However, being a newbie, I'm lost as to what to do next. Here's what I've done so far.

Downloaded ndiswrapper-1.1.tar.gz
unwrapped it and so created an 'ndiswrapper' folder on my desktop.
I became a super user with su, then did 'cd ndiswrapper-1.1' to move to the directory.
I then typed 'make' as I am supposed to and got the following:


[root@localhost ndiswrapper-1.1]# make
make -C driver
make[1]: Entering directory `/home/adrian/Desktop/ndiswrapper-1.1/driver'
Can't find kernel sources in /lib/modules/2.6.8.1-12mdk/build;
give the path to kernel sources with KSRC=<path> argument to make
make[1]: *** [prereq_check] Error 1
make[1]: Leaving directory `/home/adrian/Desktop/ndiswrapper-1.1/driver'
make: *** [all] Error 2
[root@localhost ndiswrapper-1.1]#

In that folder - /lib/modules/2.6.8.1-12mdk/ - there is a folder called 'kernel' that is 16.9MB in size along with 10 files all having names that are 'modules.something or other'.

There is no folder called 'build' though.

I know that this is a kernel related issue but I am a real newbie at Linux (although this is my 4th attempt to get a Linux distro working how I want it to!) so please keep answers simple.

Is my kernel installed? Do I have the source? Where is it? - These are questions I don't know the answer to - sorry.


I was using Mandrake 10.1 community, but downloaded disc 1 of Mandrake 10.1 and I installed it over the Community version.... Or at least that is what I think I did!!!!!!

Thanks folks.

Last edited by Adrian Baker; 07-20-2005 at 02:18 AM.
 
Old 07-20-2005, 02:38 AM   #2
palanca
LQ Newbie
 
Registered: Jul 2005
Location: Italy
Distribution: Mandriva
Posts: 6

Rep: Reputation: 0
hi you!

well, I'm a too, so my replies could seem exhilarating to somebody, but why not trying....

did you install linux source code? This in often requested in some installation and it's not installed as default.
you need installation cd's, the rpm to install may be something like
kernel-source-stripped-2.6-2.6.8.10mdk or so.... it will install upon /urs/src/linux or it will create a symbolic link with that name that point to the directory where kernel source sits.

ok, maybe is not enough, but it's a starting point

bye
 
Old 07-20-2005, 02:55 AM   #3
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Original Poster
Rep: Reputation: 30
Hi there

Thanks for the reply.

I did do something like this. I clicked on the configure your computer icon and went to the software link. I then clicked on the kernel source code thingy and installed it.

However, I'm beginning to wonder if my 'upgrade' from the community edition has caused the problem. Did the Community version have the same kernel as the Full version of 10.1?
 
Old 07-20-2005, 03:05 AM   #4
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 47
Do an "ls /usr/src" and see if it's got kernel sources in it.

If it hasn't, you'll need to install them. If it has, but there's no "linux" entry, you'll need to create a symbolic link to the source of your current kernel. Something like:

"ln -sf /usr/src/linux-2.6.8 /usr/src/linux"

Or you can specify the correct path like the error message says. . .
 
Old 07-20-2005, 05:53 AM   #5
joshknape
Member
 
Registered: Jul 2005
Posts: 216

Rep: Reputation: 30
kernel sources

Hello...this is exactly the problem I'm having. The kernel sources don't seem to be present in my Linux distribution (Xandros), and I clearly can't install Ndiswrapper or the new ACPI without them. Xandros Networks (the package manager) keeps trying to download kernel sources from the internet, which obviously is impossible, because I can't get my wireless equipment working until I install Ndiswrapper. I told it (with one of the menu options) to use the installation CD, but it still won't install the sources.

I also typed the commands someone gave me (sudo apt-get update; sudo apt-cache kernel-sources; apt-get install [package name]). That didn't seem to work either.
 
Old 07-20-2005, 07:09 AM   #6
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Original Poster
Rep: Reputation: 30
Thanks for the helpful reply oneandoneis2. It helped me sort out the problem, but a new one arose - can I ask for some more help please?

Incidentally, before my question, I read your "Linux is not Windows!" article and it was brilliant. The whole linux thing makes SO much more sense now. Yes I am a 'Windows escapee', but I'm so sick of it that I WILL make Linux my new home. I was so frustrated at how hard it all is to learn, but your article inspired me and my frustration vanished.
Let me learn more!!!

Anyway here goes.
I did ls /usr/src, then tried again with ndiswrapper::


[adrian@localhost adrian]$ ls /usr/src
ati-3.11.1/ linux@ linux-2.6.8.1-10mdk/ RPM/

[adrian@localhost adrian]$ su
Password:

[root@localhost adrian]# cd Desktop
[root@localhost Desktop]# cd ndiswrapper-1.1

[root@localhost ndiswrapper-1.1]# make KSRC=/usr/src/linux
make -C driver
make[1]: Entering directory `/home/adrian/Desktop/ndiswrapper-1.1/driver'
make -C /usr/src/linux SUBDIRS=/home/adrian/Desktop/ndiswrapper-1.1/driver \
NDISWRAPPER_VERSION=1.1 \
EXTRA_VERSION= modules
make[2]: Entering directory `/usr/src/linux-2.6.8.1-10mdk'
CC [M] /home/adrian/Desktop/ndiswrapper-1.1/driver/hal.o
CC [M] /home/adrian/Desktop/ndiswrapper-1.1/driver/iw_ndis.o
CC [M] /home/adrian/Desktop/ndiswrapper-1.1/driver/loader.o
CC [M] /home/adrian/Desktop/ndiswrapper-1.1/driver/misc_funcs.o
CC [M] /home/adrian/Desktop/ndiswrapper-1.1/driver/ndis.o
CC [M] /home/adrian/Desktop/ndiswrapper-1.1/driver/ntoskernel.o
CC [M] /home/adrian/Desktop/ndiswrapper-1.1/driver/pe_linker.o
CC [M] /home/adrian/Desktop/ndiswrapper-1.1/driver/proc.o
CC [M] /home/adrian/Desktop/ndiswrapper-1.1/driver/wrapper.o
CC [M] /home/adrian/Desktop/ndiswrapper-1.1/driver/usb.o
CC [M] /home/adrian/Desktop/ndiswrapper-1.1/driver/divdi3.o
LD [M] /home/adrian/Desktop/ndiswrapper-1.1/driver/ndiswrapper.o
Building modules, stage 2.
MODPOST
Warning: could not find versions for .tmp_versions/ndiswrapper.mod
CC /home/adrian/Desktop/ndiswrapper-1.1/driver/ndiswrapper.mod.o
LD [M] /home/adrian/Desktop/ndiswrapper-1.1/driver/ndiswrapper.ko
make[2]: Leaving directory `/usr/src/linux-2.6.8.1-10mdk'
make[1]: Leaving directory `/home/adrian/Desktop/ndiswrapper-1.1/driver'
make -C utils
make[1]: Entering directory `/home/adrian/Desktop/ndiswrapper-1.1/utils'
cc -Wall -g -DNDISWRAPPER_VERSION=\"1.1\" -c -o loadndisdriver.o loadndisdriv er.c
gcc -o loadndisdriver loadndisdriver.o
make[1]: Leaving directory `/home/adrian/Desktop/ndiswrapper-1.1/utils'


All looks good so far I thought.....

then I installed it:

[root@localhost ndiswrapper-1.1]# make install KSRC=/usr/src/linux
make -C driver install
make[1]: Entering directory `/home/adrian/Desktop/ndiswrapper-1.1/driver'
make -C /usr/src/linux SUBDIRS=/home/adrian/Desktop/ndiswrapper-1.1/driver \
NDISWRAPPER_VERSION=1.1 \
EXTRA_VERSION= modules
make[2]: Entering directory `/usr/src/linux-2.6.8.1-10mdk'
Building modules, stage 2.
MODPOST
Warning: could not find versions for .tmp_versions/ndiswrapper.mod
make[2]: Leaving directory `/usr/src/linux-2.6.8.1-10mdk'
mkdir -p /lib/modules/2.6.8.1-12mdk/misc
install -m 0644 ndiswrapper.ko /lib/modules/2.6.8.1-12mdk/misc
/sbin/depmod -a
make[1]: Leaving directory `/home/adrian/Desktop/ndiswrapper-1.1/driver'
make -C utils install
make[1]: Entering directory `/home/adrian/Desktop/ndiswrapper-1.1/utils'
install -D -m 755 loadndisdriver /sbin/loadndisdriver
install -D -m 755 ndiswrapper /usr/sbin/ndiswrapper
install -D -m 755 ndiswrapper-buginfo /usr/sbin/ndiswrapper-buginfo

NOTE: Windows driver configuration file format has changed since 1.0-rc2. You must re-install Windows drivers if they were installed before.
make[1]: Leaving directory `/home/adrian/Desktop/ndiswrapper-1.1/utils'
mkdir -p -m 0755 /usr/share/man/man8
install -m 644 ndiswrapper.8 /usr/share/man/man8

I then installed the windows drivers:

[root@localhost ndiswrapper-1.1]# ndiswrapper -i /home/adrian/Desktop/netrtusb.inf
Installing netrtusb

Then checked to see if it had worked:

[root@localhost ndiswrapper-1.1]# ndiswrapper -l
Installed ndis drivers:
netrtusb driver present, hardware present

Then modprobe:

[root@localhost ndiswrapper-1.1]# modprobe ndiswrapper
FATAL: Error inserting ndiswrapper (/lib/modules/2.6.8.1-12mdk/misc/ndiswrapper.ko): Invalid module format


Oh dear - problems!!!! I have no idea what this means.

I then did a dsmeg to see if I could work out what was going wrong and after several pages of readout, it said at the bottom:


[root@localhost ndiswrapper-1.1]# dmesg
(several pages of messages not copied here)

ndiswrapper: version magic '2.6.8.1-10mdk 686 gcc-3.4' should be '2.6.8.1-12mdk 686 gcc-3.4'
[root@localhost ndiswrapper-1.1]#
[root@localhost ndiswrapper-1.1]# Disabled Privacy Extensions on device c0322b60(lo)
bash: syntax error near unexpected token `('
[root@localhost ndiswrapper-1.1]# IPv6 over IPv4 tunneling driver
bash: IPv6: command not found
[root@localhost ndiswrapper-1.1]# mtrr: 0xd8000000,0x4000000 overlaps existing 0xd8000000,0x100000
bash: mtrr:: command not found
[root@localhost ndiswrapper-1.1]# bootsplash 3.1.6-2004/03/31: looking for picture.... found (800x600, 10377 bytes, v3).
bash: syntax error near unexpected token `('
[root@localhost ndiswrapper-1.1]# bootsplash: status on console 0 changed to on
bash: bootsplash:: command not found
[root@localhost ndiswrapper-1.1]# bootsplash 3.1.6-2004/03/31: looking for picture.... found (800x600, 10377 bytes, v3).
bash: syntax error near unexpected token `('
[root@localhost ndiswrapper-1.1]# bootsplash: status on console 1 changed to on
bash: bootsplash:: command not found
[root@localhost ndiswrapper-1.1]# bootsplash 3.1.6-2004/03/31: looking for picture.... found (800x600, 10377 bytes, v3).
bash: syntax error near unexpected token `('
[root@localhost ndiswrapper-1.1]# bootsplash: status on console 2 changed to on
bash: bootsplash:: command not found
[root@localhost ndiswrapper-1.1]# bootsplash 3.1.6-2004/03/31: looking for picture.... found (800x600, 10377 bytes, v3).
bash: syntax error near unexpected token `('
[root@localhost ndiswrapper-1.1]# bootsplash: status on console 3 changed to on
bash: bootsplash:: command not found
[root@localhost ndiswrapper-1.1]# bootsplash 3.1.6-2004/03/31: looking for picture.... found (800x600, 10377 bytes, v3).
bash: syntax error near unexpected token `('
[root@localhost ndiswrapper-1.1]# bootsplash: status on console 4 changed to on
bash: bootsplash:: command not found
[root@localhost ndiswrapper-1.1]# bootsplash 3.1.6-2004/03/31: looking for picture.... found (800x600, 10377 bytes, v3).
bash: syntax error near unexpected token `('
[root@localhost ndiswrapper-1.1]# bootsplash: status on console 5 changed to on
bash: bootsplash:: command not found
[root@localhost ndiswrapper-1.1]# eth0: no IPv6 routers present
bash: eth0:: command not found
[root@localhost ndiswrapper-1.1]# eth1: no IPv6 routers present
bash: eth1:: command not found
[root@localhost ndiswrapper-1.1]# cdrom: This disc doesn't have any tracks I recognize!
> cdrom: This disc doesn't have any tracks I recognize!
bash: cdrom:: command not found
[root@localhost ndiswrapper-1.1]# ndiswrapper: version magic '2.6.8.1-10mdk 686 gcc-3.4' should be '2.6.8.1-12mdk 686 gcc-3.4'
bash: ndiswrapper:: command not found
[root@localhost ndiswrapper-1.1]# [root@localhost ndiswrapper-1.1]#


As I said, I'm new to all this, but keen to learn. I seem to have a mismatch of kernels. Am I using 2.6.8.1-10mdk kernel, or am I using 2.6.8.1-1-12mdk kernel?
Has ndiswrapper used the wrong source?
Do I have the wrong source installed?

Help much appreciated. Thanks.
 
Old 07-20-2005, 07:32 AM   #7
charlescpc
Member
 
Registered: Nov 2004
Location: knoxville tn
Distribution: Mandrake
Posts: 142

Rep: Reputation: 15
The easiest way to get nidiswrapper installed in Mandriva is to use the version that comes with Mandriva. I know this works with version 10.1 and 10.2 Official. I DO NOT KNOW ABOUT THE COMMUNITY VERSIONS.

Here are the easy steps for newbie to get it working.

You need to remove all the previous attempts and start new.

1) go to mandrake control center install the software. From the add software menu.

2) make a directory and put the windows drivers you are going to use in there.

3) then go to terminal as su(root). In the directrory that has the windows drivers you are going to use. type in ndiswrapper -i xxxxxx.inf <= you windows drivers

4) ndiswrapper -l to see if they are loaded correctly. Then type ndiswrapper -m
to make ndiswrapper run every time you start linux then go to etc/modprobe.preload and insert the line ndiswrapper

5) type in modprobe ndiswrapper

6) then go into mandrake control center and go to network add new interface and set up you card. It should show up there now to use.

Then you should be ready to get to the internet.

IF YOU USE THE NDISWRAPPER THAT COMES WITH MANDRIVA YOU DO NOT NEED TO INSTALL THE KERNEL SOURCE.

You can use the mandrake control center to set up the card or use iwconfig ifconfig etc.
Mandrake control is easier and works.

If you have been trying with a downloaded version ndiswrapper (which is a major pain) then go to this site http://perpetualmadness.com/misc/ndiswrapper.html and go throught the steps to remove the previous attempts and use the version that comes with mandriva.

I have started using their version and have done about 10 different cards all of them worked first time. Do a search for ndiswrapper list and it shows the cards it supports. If the card is supported it should work.

Hope this helps
 
Old 07-20-2005, 07:33 AM   #8
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 47
Glad you liked the article!

Run the command "uname -r" to find the version of the kernel you're currently running - if it doesn't match up with your kernel sources, you've found the problem!
 
Old 07-20-2005, 12:11 PM   #9
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Original Poster
Rep: Reputation: 30
Yup - problem found.

I'm using kernel 2.6.8.1-12mdk apparently, but seem to have the source for 2.6.8.1-10mdk!!

Ok, now I need to find the correct kernel and uninstall the other one. I sure am learning some stuff about how Linux works.......

I presume the kernel I want is on CD2 or CD3 of the 10.1 Official download. I only downloaded CD1 so I'll download the other two and see whats on them. I'll keep you posted......
 
Old 07-20-2005, 03:48 PM   #10
ChillyWillie
LQ Newbie
 
Registered: May 2005
Location: Rhode Island, USA
Distribution: Ubuntu 7.04 (Feisty) & FC7
Posts: 28

Rep: Reputation: 15
charlescpc has a good post and I want to make sure no one else overlooks it. I just learned to use urpmi and the Mandrake software package tools for the first time yesterday. I have to say that it's *much* easier doing things that way.

Rather than looking for a similar kernel version, you should first try searching for a mandrake specific rpm through one of the servers on Easy URPMI and installing that. If your windows drivers dont' work (try several of them if you can find them using the list on the ndiswrapper Wiki), then you can go ahead and compile your kernel headers. Until then though, don't waste all that time!

Thanks Charlie for the great advice!
 
Old 07-21-2005, 02:48 AM   #11
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Original Poster
Rep: Reputation: 30
Good advice...but I can only surf the 'net in windows until I get this sorted out, so the URPMI site isn't much use !
 
Old 07-21-2005, 04:26 AM   #12
charlescpc
Member
 
Registered: Nov 2004
Location: knoxville tn
Distribution: Mandrake
Posts: 142

Rep: Reputation: 15
Adrian Baker,
If you are having trouble getting the right Kernel source loaded. I would suggest you try my easy way. Go to this web address and print it the section on installing ndiswrapper. http://perpetualmadness.com/misc/ndiswrapper.html

Then do the first few steps that tell you how to clean it up. If you have the three install cds for Mandriva then ndiswrapper is on it. Just load the software in from Mandrake Control Center.

Then make a directory and put the windows drivers in it.

Then change to the directory and type ndiswrapper -i xxxxxxxx.inf <= your driver from terminal as root

then type ndiswrapper -m

then type modprobe ndiswrapper

Go to mandrake control center go to the internet setting and set up your card.

That's it......

If you want to load the card every time on startup edit the /etc/modprobe.preload file and add this line ndiswrapper

That's the easiest way I have seen. You don't need a connection to the internet unless you have tried ndiswrapper from a download and got things messed up. Then follow the link to clean it up and start a fresh install.
 
Old 07-21-2005, 03:26 PM   #13
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Original Poster
Rep: Reputation: 30
Thanks for the replies, but still no success

Charlescpc - I can't use your easy method. My wireless interface is a USB D-link G122 USB dongle and ndiswrapper 0.9 that comes with Mandrake DOESN'T recognise the drivers for this device. However, ndiswrapper-1.1 DOES work with this interface.


As you know from earlier posts, I had the wrong kernel source installed. So, using Windows, I downloaded 10.1 Official (all 3 CD's) and made a totally fresh install of 10.1

I then unzipped ndiswrapper-1.1, cd'd to the ndiswrapper folder and started all over again....

However, I still have a problem with my kernel source

I did 'make' and got the error message:
"Can't find Kernel source in /lib/modules/2.6.8.1-12mdk/build"

So, I looked for my kernel source and there in /lib/modules/2.6.8.1-12mdk is the folder called 'kernel' along with 10 'modules.something' files.

So, i did:

make KSRC=/lib/modules/2.6.8.1-12mdk

but still get the error message about "Can't find kernel source..."

So, any ideas why this is?? I think I'm back to my original question now..... After my reinstall... wher is my kernel?????
 
Old 07-21-2005, 03:34 PM   #14
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 47
You *could* just use the kernel sources you have & compile a new kernel with them. Then you'd definitely know your kernel matched your kernel sources!
 
Old 07-21-2005, 03:59 PM   #15
ChillyWillie
LQ Newbie
 
Registered: May 2005
Location: Rhode Island, USA
Distribution: Ubuntu 7.04 (Feisty) & FC7
Posts: 28

Rep: Reputation: 15
The problem with that is the kernel source package that comes with the 10.1 Official CDs is 2.4.27! Don't ask me why, because I'm trying to find out myself.

Another question I've been pondering over: Why don't the urpmi repositories have the latest stable builds for most software packages? ndiswrapper and python are two specific examples that I've come across.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 - Cant find kernel sources while installing (Kernel 2.6.11) krayhze Linux - Wireless Networking 6 05-23-2006 06:30 AM
Unable to find ndiswrapper interface willplatts Linux - Wireless Networking 1 11-27-2005 11:37 AM
Ndiswrapper cant find "right" kernel source Anders.H Slackware 21 09-28-2005 04:08 PM
Where to find Kernel Source to install ndiswrapper ProoN Linux - Wireless Networking 5 07-09-2005 11:33 PM
Can't find ndiswrapper jmielens Linux - Wireless Networking 7 08-31-2004 12:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 01:32 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration