Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Not taking my .config into account for compile
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
evilAngel
n00b
n00b


Joined: 21 Jul 2004
Posts: 53
Location: France

PostPosted: Tue Dec 02, 2008 10:20 am    Post subject: Not taking my .config into account for compile Reply with quote

Hey all,

I am experiencing a problem.
I installed a gentoo from stage3 with hardened-source.

After compiling the kernel, i realized that iptables was missing.

Therefore, i moved to /usr/src/linux.
I typed "make mrproper" , then "make menuconfig".
I ticked iptables/netfilter options.

Then I launched "make && make modules_install".

I copied the arch/x86/boot/bzIMage to my /boot folder.

I reboot my system.

However, when listing the /proc/config.gz file, iptables/netfilter are not activated.

Am I doing something wrong ?

Thanks
Back to top
View user's profile Send private message
honp
Guru
Guru


Joined: 25 Sep 2006
Posts: 355
Location: Good old Prague, Czech rep.

PostPosted: Tue Dec 02, 2008 11:11 am    Post subject: Reply with quote

And what about grub?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23112

PostPosted: Wed Dec 03, 2008 4:07 am    Post subject: Reply with quote

Check the output of uname -a to see whether the kernel you are running is the newly built one. It sounds like you booted the old kernel again.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Wed Dec 03, 2008 5:05 am    Post subject: Reply with quote

Hi, can you post this plz :

Code:

# emerge --info
# cd /usr/src && ls -la
# cat /boot/grub/grub.conf
Back to top
View user's profile Send private message
evilAngel
n00b
n00b


Joined: 21 Jul 2004
Posts: 53
Location: France

PostPosted: Wed Dec 03, 2008 11:06 am    Post subject: Reply with quote

Quote:
And what about grub?

I deleted the former kernel (/boot/gentoo-hardened-2.6.25) and copied my /usr/src/arcg/x86/boot/bzImage under the same name (/boot/gentoo-hardened-2.6.25) in order not to change Grub config.

Quote:
# emerge --info
# cd /usr/src && ls -la
# cat /boot/grub/grub.conf

When I have access to my PC, il will post the output of these commands.
Back to top
View user's profile Send private message
huckabuck
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2007
Posts: 110
Location: Bronx, NY

PostPosted: Wed Dec 03, 2008 12:17 pm    Post subject: Reply with quote

You still need to update grub with newly built kernel, even if it is the same name, I just went thru this with 2.6.26-r3 kernel rebuild.

# grub --no-floppy

grub> root (hd0,0)
grub> setup (hd0)
grub> quit

reboot
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Wed Dec 03, 2008 12:23 pm    Post subject: Reply with quote

huckabuck wrote:
You still need to update grub with newly built kernel, even if it is the same name, I just went thru this with 2.6.26-r3 kernel rebuild.


No you don't have, Grub read the /boot/grub/grub.conf to know which kernel to boot. You only need to reinstall grub when there is a new version of grub only.
Back to top
View user's profile Send private message
evilAngel
n00b
n00b


Joined: 21 Jul 2004
Posts: 53
Location: France

PostPosted: Wed Dec 03, 2008 6:23 pm    Post subject: Reply with quote

Here are the ouput from my gentoo:

Code:
# emerge --info
Portage 2.1.4.5 (hardened/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-hardened-r10 i586)
=================================================================
System uname: 2.6.25-hardened-r10 i586 Geode(TM) Integrated Processor by AMD PCS
Timestamp of tree: Wed, 19 Nov 2008 18:15:02 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i486-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i486-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -mtune=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ "
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 cli cracklib crypt cups dri gdbm gpm hardened iconv isdnlog midi mudflap ncurses nptl nptlonly openmp pam pcre perl pic pppd python readline reflection session spl ssl sysfs tcpd urandom x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt intel mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Code:
# cd /usr/src && ls -la
total 12
drwxr-xr-x  3 root root 4096 Nov 19 20:49 .
drwxr-xr-x 12 root root 4096 Nov 19 19:45 ..
-rw-r--r--  1 root root    0 Jun 11 19:44 .keep
lrwxrwxrwx  1 root root   25 Nov 19 20:49 linux -> linux-2.6.25-hardened-r10
drwxr-xr-x 23 root root 4096 Dec  2 09:24 linux-2.6.25-hardened-r10

Code:
# cat /boot/grub/grub.conf
default 0
timeout 30

title Gentoo Hardened 2.6.25-r10
root (hd0,0)
kernel /boot/kernel-2.6.25-hardened-r10 root=/dev/hda3

title Gentoo Hardened 2.6.25-r10 (rescue)
root (hd0,0)
kernel /boot/kernel-2.6.25-hardened-r10 root=/dev/hda3 init=/bin/bb


Also this output:
Code:
# ls -la /boot
config-kernel-2.6.25-hardened-r10
grub
kernel-2.6.25-hardened-r10
kernel-2.6.25-hardened-r10.backup
kernel-2.6.25-hardened-r10.old
kernel-2.6.25-hardened-r10.old2



CONFIG FILE:
Code:
# zgrep -i filter /proc/config.gz
# CONFIG_NETFILTER is not set


Code:
# grep -i filter /usr/src/linux/.config
CONFIG_NETFILTER=y
CONFIG_NETFILTER_DEBUG=y
CONFIG_NETFILTER_ADVANCED=y
.....


Any idea ?
Thanks
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Wed Dec 03, 2008 10:33 pm    Post subject: Reply with quote

you did install the kernel by copying it from bzimage, but didn't copy the kernel config file yourself in boot, but there is one there, and i suppose it's the old one that is taken (as the same is the same as the old one and the new one).
This is because (as kernel-2.6.25-hardened-r10.old presence could proof it) that you did kernel install auto previously

1/ grep -i filter /boot/config-kernel-2.6.25-hardened-r10
you might still see CONFIG_NETFILTER is not set

2/ cd /usr/src/linux && make install
so the kernel will rename yours to .old add the new kernel, but also will copy the current (correct) config file to your boot
Back to top
View user's profile Send private message
cgmoller
n00b
n00b


Joined: 21 Sep 2006
Posts: 56
Location: Boston, MA, USA

PostPosted: Thu Dec 04, 2008 12:21 am    Post subject: Reply with quote

Try this.

Check your boot partition in /etc/fstab. If the noauto option is present then that is your problem.
What you are doing is installing your new kernel to the *mount point* not the partition.
you can confirm this / current status by running mount.
(I believe that the Gentoo install guide suggests noauto as a security measure and after a while you forget these things. I did. voice of experience :? https://forums.gentoo.org/viewtopic-t-708140-highlight-.html)

to fix, umount /boot
delete *everything* in the *mount point*
touch mount_point_only_no_files
mount /boot
cd /usr/src/linux; make; make modules_install; make install
optionally re run grub-install
Back to top
View user's profile Send private message
evilAngel
n00b
n00b


Joined: 21 Jul 2004
Posts: 53
Location: France

PostPosted: Thu Dec 04, 2008 9:32 am    Post subject: Reply with quote

OK, i will try all these solutions.

Thanks
Back to top
View user's profile Send private message
evilAngel
n00b
n00b


Joined: 21 Jul 2004
Posts: 53
Location: France

PostPosted: Tue Dec 16, 2008 9:37 pm    Post subject: Reply with quote

I removed all files from my /boot folder; except the grub folder.
I moved to /usr/src/linux and launched
Code:
make install


It gave me back an error as I am not using LILO.

However, it put a vmlinuz file and a System.map file in my /boot folder.

I updated my /boot/grub/grub.conf file to match vmlinuz name.

I reboot.

And when typing
Code:
zgrep -i netfilter /proc/config.gz
, still having
Quote:
CONFIG_NETFILTER is not set


However, my /usr/src/linux/.config file has all netfilter options activated.

Don't know what is wrong....
Back to top
View user's profile Send private message
mattjgalloway
l33t
l33t


Joined: 16 Mar 2004
Posts: 761
Location: Coventry, UK

PostPosted: Mon Dec 22, 2008 6:09 pm    Post subject: Reply with quote

Sorry, just coming into this post a bit late, but I figured I *may* be able to help.

Are you definitely mounting your boot mount (assuming it's on a different mount to your root partition) before doing the make install? (Show us cat /etc/mtab and cat /etc/fstab if you like)

Also, try doing a make clean in /usr/src/linux as that will get rid of everything and start again. (Make sure you move away your .config file first just to be sure you have it safe - back it up!)
_________________
AMD64 3200+, 1024MB RAM, Gentoo Linux
MacBook Core Duo, 1024MB RAM, Leopard
Back to top
View user's profile Send private message
evilAngel
n00b
n00b


Joined: 21 Jul 2004
Posts: 53
Location: France

PostPosted: Thu Dec 25, 2008 10:27 pm    Post subject: Reply with quote

Thanks for help.

Sorry, i was in a hurry to get the server back. So i installed a binary distro (Debian).

But i'll give a new try to Hardened ASAP
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum