Wireless Help

Rick Stevens rstevens at vitalstream.com
Thu Jan 5 03:08:14 UTC 2006


On Wed, 2006-01-04 at 19:47 -0700, brad.mugleston at comcast.net wrote:
> Rick and List - My replies are within the email below.
> 
> Thanks,
> 
> Brad Mugleston, KI0OT
> 
> There are 10 types of people in this world.  Those that
> understand binary and those that don't.
> 
> On Tue, 27 Dec 2005, Rick Stevens wrote:
> 
> > On Mon, 2005-12-26 at 12:11 -0700, brad.mugleston at comcast.net wrote:
> > > Merry Day after Christmas - hope everyone had a good holiday.
> > >
> > > Now down to business - To catch everyone up.
> > >
> > > Wanted to upgrade my notebook to FC4 from FC2.  The upgrade
> > > didn't work so I formated and did a fresh install of FC4.
> > >
> > > As it has a wireless card I needed to install NdisWrapper (or I
> > > think I do) to get it running, note I did find a sys file on the
> > > Linksys web site for this card and it said it was for FC3 - if
> > > this would work without NdisWrapper can someone direct me as to
> > > how to install it?
> > >
> > > Back to NdisWrapper - it needs the source code for the current
> > > kernel - in the past I've just downloaded it as an RPM and
> > > followed the instructions.  This time strangeness happened.
> > >
> > > The instructions say to link the source to the module directory
> > > with the following command
> > >
> > > ln -s /usr/src/linux-<kernel-version> /lib/modules/VERSION/build
> > >
> > > I did that replacing "linux-<kernel-version>" and "VERSION"
> > > with the proper (I believe) wording and got the error that the
> > > link was already there. Asuming that it was from the source
> > > install I tried to go on with the NdisWrapper install and got the
> > > error that the link was to the wrong version (which looking at
> > > it, it was - how that happened I have no idea).
> > >
> > > I deleted the link and tried to redo it and get an error -
> > > any suggestions on how to procede.  I'm thinking the instructions
> > > are for an older version of FC.
> >
> > Hi, Brad.
> >
> > ndiswrapper uses the Windows drivers (the .inf and .sys files), so
> > any reference to a ".sys" file that's appropriate for FC3 is kinda
> > misleading--the .sys file is the Windows driver.
> >
> > Now, as to kernel source code.  Make sure you do a "yum install
> > kernel-devel".  This will install the kernel headers and such needed to
> > build most drivers.  NOTE: This is NOT the kernel source code.  For
> > that, you need to do a bit more (details later).
> >
> 
> DONE
> 
> > Since you just did an FC4 install, I HIGHLY recommend you perform the
> > following actions first:
> >
> > # yum -y update
> > (reboot to the new kernel when that's done)
> > # yum -y install kernel-devel
> >
> 
> DONE
> 
> > Ok, you should have enough to build ndiswrapper at this point.  Go into
> > your ndiswrapper build directory and do "make" and "make install".
> > Go fetch the .inf and .sys files from your Windows CD for the card and
> > put them in a directory somewhere (I typically use /usr/local/WinDrv),
> > then "ndiswrapper -i /path/to/windows/.inf/file"  to install the Windows
> > driver.
> >
> 
> Does not work - on running "make" I get the following error:
> 	can't find kernel sources in /lib/modules/2.6.14-1.1653_FC4/build

See end of this posting.

> Looking there build si a link to /usr/src/redhat/SOURCES and
> looking in there it looks like (as if I would know) the sources.
> 
> So, I decided to go ahead and install the kernel as discribed
> below (please continue down)
> 
> > Set up your alias in /etc/modprobe.conf:
> >
> > alias wlan0 ndiswrapper
> >
> > and "modprobe ndiswrapper" to bring it up.
> >
> > ---- CLIP HERE FOR USEFUL INFO ON GETTING THE FULL KERNEL SOURCE ----
> > Now, regarding kernel source:  As I said, FC4 doesn't have anything akin
> > to the old "kernel-source" RPM from the good old kernel 2.4 days.  You
> > have to do it manually.  Here's what I do:
> >
> > 1.  You have to go to a Fedora mirror somewhere and get the
> > "kernel-(version).src.rpm".  My favorite mirror would be:
> >
> >     ftp://mirrors.kernel.org/fedora/core/updates/4/SRPMS
> >
> 
> GOT this
> 
> > >From there, download the source RPM for the kernel you're interested in
> > and save it somewhere.
> >
> > 2.  Go to your download directory and install the source RPM:
> >
> > rpm -ivh kernel-(version).src.rpm
> >
> 
> Did this
> 
> > 3.  Now you get to build the kernel source.  Change directory to the
> > "SPECS" directory in the source RPM build tree:
> >
> > # cd /usr/src/redhat/SPECS
> >
> > Now you have to choose a direction to go.  You now configure the source
> > for your type of CPU and such.  Execute one of the following commands:
> >
> > # rpmbuild -bp --target=i686 kernel-2.6.spec
> > # rpmbuild -bp --target=x86_64 kernel-2.6.spec
> >
> 
> rpmbuild had not been installed so I installed it from the CD's
> and it runs
> 
> > (you get the idea...use "--target=your-cpu-of-choice")
> >
> > The system will now go through a bunch of gyrations, unpacking source,
> > doing patches and the like.  When it's done, you have what was
> > essentially the old "kernel-source" contents, but it's in a different
> > directory and there's two versions...the "red hat" version and a
> > "vanilla" version.
> >
> > 4.  Copy the kernel source to your /usr/src directory:
> >
> > # cd /usr/src/redhat/BUILD/kernel-2.6.(majvers)
> > # mv linux-2.6.(majvers) /usr/src/linux-2.6.(majvers.patch)
> >
> 
> Did this
> 
> 
> > Note that "(majvers)" will only contain the major version number (e.g
> > "2.6.14", whereas "(majvers.patch)" should be the major version and
> > whatever patch level you're working with (e.g. "2.6.14-1.1653_FC4").
> >
> > 5.  You can now "cd /usr/src/linux-2.6.(majvers.patch)" and build
> > away.

Oh.  Sorry.  Two more things.  First, go to the new kernel source
directory and edit the "Makefile".  In there, you'll find a definition
called "EXTRAVERSION=".  You need to make that match your patch level.
For example:

	VERSION = 2
	PATCHLEVEL = 6
	SUBLEVEL = 14
	EXTRAVERSION = -1.1653_FC4   <<<--- MODIFY THAT!

Ok, so far, so good.  Now, you can do "make xconfig" and configure the
kernel.  When the configuration screen comes up, select the "folder"
icon.  In the dialog, select the "/boot" directory.  In there, select
the "config-2.6.14-1.1653_FC4" file.  That's the configuration that
you're using.  Click on the "disk" icon to save the configuration, then
exit the configuration screen.

At this point, you've configured the kernel, but you haven't built it.
If you want to actually build it, here are the steps:

	# make bzImage;make modules

That builds the kernel.  If you should want to install it (remember,
this will overwrite the kernel you installed via yum):

	# make modules_install;make install

Voila! 

> Build what?  make under ndiswrapper still not working.
> 
> > Ok, examples are always nice, so here's how I did the latest FC4 kernel:
> >
> >     # mkdir /usr/xxx
> >     # cd /usr/xxx
> >     # ftp
> > ftp://mirrors.kernel.org/fedora/core/updates/4/SRPMS/kernel-2.6.14-1.1653_FC4.src.rpm
> >     # rpm -ivh kernel-2.6.14-1.1653_FC4.src.rpm
> >     # cd /usr/src/redhat/SPECS
> >     # rpmbuild -bp --target=i686 kernel-2.6.spec
> >     # cd ../BUILD/kernel-2.6.14
> >     # mv linux-2.6.14 /usr/src/linux-2.6.14-1.1653_FC4
> > (the next two are optional...)
> >     # rm -f linux linux-2.6;ln -s linux-2.6.14-1.1653_FC4 linux
> >     # ln -s linux-2.6.14-1.1653_FC4 linux-2.6
> >
> > >From there, "cd /usr/src/linux-2.6.14-1.1653_FC4" and "make xconfig" to
> > configure your kernel.
> > Ta dah!
> >
> > Sure hope that helps.
> >
> Well, that's where I sit - it's been a learning experience but
> I'm running short on time as it's starting to be my busy season
> at work - and no I dont do this for work.

Ok, you need to see where the "/lib/modules/`uname -r`/build" symlink is
pointing.  If it's a directory, the "yum -y install kernel-devel" should
have filled it in.  If it's empty, then delete the directory and point
it at your CONFIGURED kernel source from the "rpmbuild" stuff:

	# cd /lib/modules/`uname -r`
	# rm -rf build
	# ln -s /usr/src/linux-`uname -r` build

That will force the link to point at your actual, configured kernel
source.

That should do it.

----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-                   To err is human, to moo bovine.                  -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list