Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am trying to compile madwifi-0.9.4 and create an access point on a linux box which is currently acting as a nat.
Linux version 2.6.18-92.1.22.el5xen (firstname.lastname@example.org) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42))
This is the link which was in build -> ../../../usr/src/kernels/2.6.18-92.1.22.el5-xen-i686
I removed that link and changed this link to ../../../usr/src/kernels/2.6.18-128.1.10.el5-xen-i686
This is what is listed under /usr/src/kernels/2.6.18-128.1.10.el5-xen-i686
drwxr-xr-x 26 root root 4096 May 25 00:06 arch
drwxr-xr-x 2 root root 4096 May 25 00:06 block
drwxr-xr-x 4 root root 4096 May 25 00:06 crypto
drwxr-xr-x 65 root root 4096 May 25 00:06 drivers
drwxr-xr-x 66 root root 4096 May 25 00:06 fs
drwxr-xr-x 19 root root 4096 May 25 00:06 include
drwxr-xr-x 2 root root 4096 May 25 00:06 init
drwxr-xr-x 2 root root 4096 May 25 00:06 ipc
-rw-r--r-- 1 root root 57326 May 7 12:18 kabi_whitelist
drwxr-xr-x 5 root root 4096 May 25 00:06 kernel
drwxr-xr-x 5 root root 4096 May 25 00:06 lib
-rw-r--r-- 1 root root 48181 May 7 12:19 Makefile
drwxr-xr-x 2 root root 4096 May 25 00:06 mm
-rw-r--r-- 1 root root 167736 May 7 12:19 Module.kabi
-rw-r--r-- 1 root root 1089 May 7 12:19 Module.markers
-rw-r--r-- 1 root root 373792 May 7 12:19 Module.symvers
drwxr-xr-x 41 root root 4096 May 25 00:06 net
drwxr-xr-x 4 root root 4096 May 25 00:06 samples
drwxr-xr-x 10 root root 4096 May 25 00:06 scripts
drwxr-xr-x 4 root root 4096 May 25 00:06 security
drwxr-xr-x 18 root root 4096 May 25 00:06 sound
-rw-r--r-- 1 root root 46693 May 7 12:19 symsets-2.6.18-128.1.10.el5xen.tar.gz
drwxr-xr-x 2 root root 4096 May 25 00:06 usr
Checking requirements... ok.
Checking kernel configuration... ok.
make -C /lib/modules/2.6.18-92.1.22.el5xen/build SUBDIRS=/home/keith/wifi/madwifi-0.9.4 modules
make: Entering directory `/usr/src/kernels/2.6.18-128.1.10.el5-xen-i686'
CC [M] /home/keith/wifi/madwifi-0.9.4/ath/if_ath.o
In file included from <command line>:1:
/home/keith/wifi/madwifi-0.9.4/ath/../include/compat.h:140: error: redefinition of 'skb_end_pointer'
include/linux/skbuff.h:417: error: previous definition of 'skb_end_pointer' was here
/home/keith/wifi/madwifi-0.9.4/ath/../include/compat.h:145: error: redefinition of 'skb_tail_pointer'
include/linux/skbuff.h:835: error: previous definition of 'skb_tail_pointer' was here
/home/keith/wifi/madwifi-0.9.4/ath/../include/compat.h:150: error: redefinition of 'skb_set_network_header'
include/linux/skbuff.h:1021: error: previous definition of 'skb_set_network_header' was here
/home/keith/wifi/madwifi-0.9.4/ath/../include/compat.h:155: error: redefinition of 'skb_reset_network_header'
include/linux/skbuff.h:1016: error: previous definition of 'skb_reset_network_header' was here
/home/keith/wifi/madwifi-0.9.4/ath/../include/compat.h:160: error: redefinition of 'skb_mac_header'
include/linux/skbuff.h:1036: error: previous definition of 'skb_mac_header' was here
/home/keith/wifi/madwifi-0.9.4/ath/../include/compat.h:165: error: redefinition of 'skb_reset_mac_header'
include/linux/skbuff.h:1046: error: previous definition of 'skb_reset_mac_header' was here
make: *** [/home/keith/wifi/madwifi-0.9.4/ath/if_ath.o] Error 1
make: *** [/home/keith/wifi/madwifi-0.9.4/ath] Error 2
make: *** [_module_/home/keith/wifi/madwifi-0.9.4] Error 2
make: Leaving directory `/usr/src/kernels/2.6.18-128.1.10.el5-xen-i686'
make: *** [modules] Error 2
I am not sure if I have the source code for the kernel installed, this is where I am lost. I see `/usr/src/kernels/2.6.18-128.1.10.el5-xen-i686'.
A couple of suggestions:
1. if you're not sure of what kernel you're running (and want to build a module for) the type
in a terminal.
2. For building a module I always use module-assistant which makes everything quite simple. You should be able to find a package for your distro. You will need the headers for your kernel but m-a will download them for you if you don't have them installed.
I was able to install madwifi with apt-get, I also have the headers and kernel-devel to match my kernel version. When I modprobe ath_pci I get
FATAL: Module ath_pci not found. I tried to do a find for ath_pci I can't locate this module which is leading me to believe it was not compiled? I will look at what you suggested and any other help would be appreciated.
Also this is the Kernel I am using Linux 2.6.18-92.1.22.el5xen
I appreciate the suggestions but module assistant seems to be for debian, I can't locate a rpm or redhat version for centos. It seems really easy on Debian boxes from what I have been reading. If anyone could give me some pointers on how to resolve my issue with compiling the module it would be helpful. As I said I used apt-get which was part of the dag repo for redhat to install madwifi. I had no errors during the install but I cannot find ath_pci anywhere on my system, its leading me to believe it was not installed?
Also I did yum install kernel-xen-devel which it installed in /usr/src/kernels
drwxr-xr-x 20 root root 4096 May 25 18:31 2.6.18-128.1.10.el5-xen-i686
lrwxrwxrwx 1 root root 28 May 25 15:27 2.6.18-128.1.10.el5xen-i686 -> 2.6.18-128.1.10.el5-xen-i686
drwxr-xr-x 18 root root 4096 May 25 04:41 2.6.18-92.1.22.el5.centos.plus-i686
Uname -a gives me Linux TrunkmonkeyNat 2.6.18-92.1.22.el5xen #1 SMP Tue Dec 16 13:08:49 EST 2008 i686 i686 i386 GNU/Linux.
When I run make in the madwifi directory I get this error
./kernelversion.c:13:30: error: linux/utsrelease.h: No such file or directory
Makefile.inc:91: *** KERNELCONF: /lib/modules/2.6.18-92.1.22.el5xen/build/.config does not exist.. Stop.
This is what I have for a soft link in /lib/modules/2.6.18-92.1.22.el5xen/build
lrwxrwxrwx 1 root root 45 May 25 15:37 2.6.18-128.1.10.el5-xen-i686 -> /usr/src/kernels/2.6.18-128.1.10.el5-xen-i686
I believe there is something wrong with how I have the kernel-devel and or the link set up.
I installed madwifi with yum, after the install I ran the command for modprob ath_pci it showed up in my ifconfig at Wlan0 Master. When I rebooted the box it hung would not reboot I had to power it off. After reboot the module was not loaded, when trying modprobe it was not listed in ifconfig.
It's been a while but I now have the madwifi driver installed, bridged access point is up. I can now see my essid from clients the only problem is when I join I can't surf. The access point will let me join but once in I can't get out to the net. I can ssh that box fine, when I am in that box I can ping the gateway and google fine. Any ideas of what to look for ?