LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-05-2005, 07:00 AM   #1
live_dont_exist
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat 9.0,FC3,FC5,FC10
Posts: 257

Rep: Reputation: 30
Kernel compilation confusion


Hi All,

Im installing Ncap(Network drivers for Gigabit NICs) drivers on EL4. Now the point is that I downloaded all the Ncap stuff from the website ; ntop.org I think.
When I extract all the files ; I have /boot and /lib . The /boot has the vmlinuz in it which I dump in /boot and then I run mkinitrd to create an image.Everything works fine till here...

When I try and boot into my new "Ncap test" kernel it doesnt work and the Kernel panics.So then I look online and find that the kernel source needs to be copied into /usr/src/ .I download the source and put it in to /usr/src.Try and boot..no luck. Then I find out that the kernel needs to be recompiled.Now this becomes a bit complex.

So now when I look into the downloaded Ncap kernel directory this is what I see.

[root@sniff 2.6.8]# pwd
/root/ncap/Linux2.6/lib/modules/2.6.8

[root@sniff 2.6.8]# ls -al
total 52
drwxr-xr-x 3 root root 4096 Mar 29 2005 .
drwxr-xr-x 3 root root 4096 Dec 5 14:24 ..
lrwxrwxrwx 1 root root 20 Dec 5 14:24 build -> /usr/src/linux-2.6.8
drwxr-xr-x 5 root root 4096 Mar 29 2005 kernel
-rw-r--r-- 1 root root 2805 Mar 29 2005 modules.alias
-rw-r--r-- 1 root root 69 Mar 29 2005 modules.ccwmap
-rw-r--r-- 1 root root 920 Mar 29 2005 modules.dep
-rw-r--r-- 1 root root 73 Mar 29 2005 modules.ieee1394map
-rw-r--r-- 1 root root 132 Mar 29 2005 modules.inputmap
-rw-r--r-- 1 root root 81 Mar 29 2005 modules.isapnpmap
-rw-r--r-- 1 root root 4285 Mar 29 2005 modules.pcimap
-rw-r--r-- 1 root root 346 Mar 29 2005 modules.symbols
-rw-r--r-- 1 root root 1456 Mar 29 2005 modules.usbmap
lrwxrwxrwx 1 root root 20 Dec 5 14:24 source -> /usr/src/linux-2.6.8
[root@sniff 2.6.8]#

I copied the entire 2.6.8 directory to /usr/lib/modules and tried booting but no luck.Im a bit confused here.Can someone throw some light on this??...

Will be glad to provide any additional information.All help is welcomed with open arms....

Thnx
Arvind
 
Old 12-05-2005, 10:44 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
I'm not really sure what your trying to do. The site you mentioned ntop.org didn't seem to have anything related to this ncap package your speaking of.

What exact Gigabyte NIC do you have on this machine? Linux natively supports a wide range of Gigabyte NIC's by default in most cases.

If you can provide a link to this ncap, that might be helpful as well.
 
Old 12-06-2005, 12:48 AM   #3
live_dont_exist
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat 9.0,FC3,FC5,FC10
Posts: 257

Original Poster
Rep: Reputation: 30
Hi,
Thnx 4 the reply....Heres what I am duing:-

1.Heres the link from where I downloaded it from
http://luca.ntop.org/nCap/
And heres what Ncap is
http://www.nmon.net/nCap.html

2.We're building an IDS where Snort does the sniffing and our s/w does the managing.Now the dev team have come back and said that everything is programatically optimized but if data is sent to Snort at over 80Mbps packets start getting dropped (entire packet is needed...not just the header..code req).

3.Ncap says that it has its own N/w drivers and kernel modules and professes to bypass the TCP/IP stack thus using Ncap API's and a NCAP specific device driver and so on...u get the picture...

4.Ncap on the site has a downloaded..I think(precompiled kernel) but Im not sure coz its the first time Im playing with the kernel.
So I download the 2.6.8 kernel ; extract vmlinuz ; mkinitrd image into /boot and put the kernel with its modules into /lib/modules
and the source of the 2.6.8 kernel into /usr/src/2.6.8..and reboot

Doesnt work...

The card itself is fine..I installed that on an EL4 system and assigned it an IP.It works and is capturing data and communicating with other machines in the subnet without any problem.
Still ...the card is:-
Intel PRO/1000 MT Server Adapter

There is doc available on the website I mentioned just incase you have the time.

Appreciate the time..any help/suggestions on where Im goofing up are welcome.

Arvind

p.s..I tried a recompile yday but it only screwed things up further.Im doing a format/reinstall as I write this so I can try things out carefully again.
 
Old 12-06-2005, 12:08 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
Is this the first time you have attempted to compile a kernel?

No, no, I don't mean that in a "catty" way! It sounds to me like you don't know quite what you're doing here and you're seriously thrashing-about.



Let's assume that the pre-compiled kernel isn't what you want to be using. Let's assume that you want to start with your existing (preferably 2.6) kernel ... first, get back to that. And then, let's assume that what this company has provided is a new kernel module that you want to be able to load. That should, I would presume, consist only of one single module, unless they are using some kind of a "patched" kernel.

(Note: I did not read their web-site too closely.)

So the first thing you should try to do is to get back to a stable, 2.6 based system without their software. You will need the source-code tree /usr/src/linux... corresponding to that kernel, because kernel-module compilation does need to refer to that. And then you're going to compile the module.

When the kernel module is successfully built, I expect that you should be able to load it dynamically (modprobe) and test it without rebooting...

I see that they provide a vmlinuz image, but .. who knows how they got it. Engineers tend to focus on the hardware, and if the stuff works on their test-jig they tend to think that their job is through. Trouble is, a well-running Linux system consists of the whole shebang: kernel, libraries, init-scripts, drivers for their hardware and drivers for yours. Try to simply dump a "vmlinuz from gawd-knows-where" and, yeah, a KP does not surprise me in the slightest.

The last page of their user-guide PDF seems to refer to how to integrate their code into a stock Linux, although the documentation was obviously written by an engineer.

Good luck. Now: think like EEs do... If you don't have a pocket-protector, buy one before proceeding. Put tape on your glasses, wear pinstripe shirts of the wrong size, and (temporarily) disavow all social contact with the opposite sex...

Last edited by sundialsvcs; 12-06-2005 at 12:16 PM.
 
Old 12-07-2005, 06:56 AM   #5
live_dont_exist
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat 9.0,FC3,FC5,FC10
Posts: 257

Original Poster
Rep: Reputation: 30
Hi Sundial,
That is a very good assessment of my kernel related skills...yeah tis the first time...Ive never even opened up the kernel dir b4...but my boss ..well sorta gave me the license to have fun n try n figure out wat ws going rong..so...the "thrashing about" as u call it ..

Well seriously...thnx 4 the help..I actually did format the whole thing and Im back to a normal installation. I have the source too for 2.6.8.

A few pts just so u get a perfectly clear picture:-

1.I have their vmlinuz and have the source for 2.6.8 on which their code seems to have been tested.

2.If I untar their stuff , I can see around 12 different files starting with modules.* . Im assuming these are already compiled modules but as I said Im an absolute noob.

3.So I just take these modules n stuff n put them in /lib/modules ..so now
cd /lib/modules
...
...
2.6.8 -> 12 files (modules.*)

4.Create Initrd image...tweak grub..reboot

5.Kernel Panic...cant find rootfs!!...

My other 2.6.9.5 kernel is working OK..but I cant seem to boot into this.
I do not have the source for these modules so I can compile them and install them.Do I need it?Wont just the modules.* do enough?

Lemme know whenever you have time.

Thnx
Arvind
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel compilation : to remove a kernel which files should be deleted b0nd Linux - Newbie 2 08-17-2005 11:35 AM
Kernel compilation problems, distorted video and kernel panic shamrock_uk Linux - Laptop and Netbook 5 08-12-2005 10:53 PM
does kernel-source installs with the compilation cum installtion of a new kernel? luqman Linux - General 18 03-04-2005 07:33 AM
Confusion about Kernel Update... DropHit Red Hat 4 12-15-2003 10:10 AM
kernel confusion -- which source for 2.4.18-bf2.4 graybeard Linux - Distributions 1 02-17-2003 06:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:18 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