Click to See Complete Forum and Search --> : Clueless On How To Recompile (Mandrake)


Teknion
01-27-2005, 04:04 PM
I've just jumped head first into a Linux project to learn about firewalls and so on...

I wanted to start playing with iptables, which said you need CONFIG_NETFILTER turned on....

After hours of searching (since I don't have a (usr/src/linux directory) I found autoconf.h in usr/include/linux

I turned

#undef CONFIG_NETFILTER

into

#define CONFIG_NETFILTER 1

From what I read on the net, now I need to recompile the kernel. But all the guides seem to be geared towards compiling a newly downloaded version....

The "dummy" version I found was no good either since right as soon asI tried to do 'make menuconfig', it gives me an error

make: *** No rule to make target 'menuconfig'. Stop

Just not sure where to go/what to do from here.....

bsm2001
01-27-2005, 04:13 PM
you have to install the kernel source from the cd for the running kernel.

goto start->system->configuration->packaging->install software
enter root password
select all packages by group
development
kernel
then kernel-source-2.6.8-12mdk
then follow the prompt to insert the cd

cybertron
01-27-2005, 06:34 PM
Originally posted by Teknion
After hours of searching (since I don't have a (usr/src/linux directory) I found autoconf.h in usr/include/linux

I turned

#undef CONFIG_NETFILTER

into

#define CONFIG_NETFILTER 1

I almost hate to say this, but I'm pretty sure you don't want to do that. I would bet that where they meant to add CONFIG_NETFILTER was in the kernel configuration after you do make menuconfig. Somewhere in there it will have a netfilter option that will allow you to turn netfilter on, which will in turn add CONFIG_NETFILTER YES to your .config (which is where all the kernel settings are stored before compilation). I would put the above back the way it was and do as bsm2001 recommended. I'm pretty sure you'll find your netfilter option in there.

Teknion
01-28-2005, 10:09 AM
Yeah, I got a msg from my friend saying I found the reference in the wrong place, so I changed it back.

Ends up I can't do menu config because I don't have the kernel source on my install....

So since my machine had nothing on it, I just reinstalled with the source included =)

How do you find out your kernel version? for future reference....

Choozo
01-28-2005, 10:51 AM
In a console/terminal: uname -a

gampy
02-11-2005, 04:08 AM
Please read the article I've recently added to my latest web site project.

http://chucky.homeip.net/linuxGuides/Kernel_Build/kernelBuild_01.html