![]() |
Compiling kernel 2.6.14.6 with grsec Centos 4.2
Warning use this guide at your own risk! It works on my server it doesn't mean it will work on yours.
you need gcc to compile kernel. Code:
yum install gcc Code:
yum install ncurses-devel Code:
CD /usr/local/src Code:
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.14.6.tar.gz Code:
tar -zxf linux-2.6.14.6.tar.gz Code:
wget http://grsecurity.net/grsecurity-2.1.8-2.6.14.6-200601211647.patch.gz Code:
gunzip < grsecurity-2.1.8-2.6.14.6-200601211647.patch.gz | patch -p0 Code:
cd linux-2.6.14.6 Code:
make clean && make mrproper Code:
cp /boot/config-`uname -r` .config Code:
make menuconfig now to actually compile the kernel Code:
make bzImage Code:
make modules Code:
make modules_install copy the new files into your /boot directory. Code:
cp .config /boot/config-2.6.14.6-grsec Code:
/boot/grub/grub.conf Code:
title CentOS (2.6.14.6-grsec) thats it your done save and exit. |
kernel is a security thing, right? what does it actually do?
|
The kernel is the brain of the OS. With out it, Linux wouldn't run. Adding grsec to the kernel helps prevent the kernel from being hacked.
|
I'm going to give this a go...
[QUOTE=Soulwatcher] you need gcc to compile kernel. [/QUTOE] Already have it for some Perl modules I installed... Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Making the stuff was a bit boring to watch. Quote:
Quote:
|
Yes when the server boots up just select the old kernel and you will be fine. Make sure you use your servers root=LABEL=/ as it may be different than mine. I should have added that, I will go back and change the guide to reflect that.
|
Wow thanks it worked like a charm for me
|
Actually, the root=LABEL=/ line can be changed to root=/ and it will then work on anyones system. The LABEL bit is optional, and only used when you actually label partitions with fdisk. Generally, it's just easier not to use it for this sort of thing. So your full kernel command line would become :-
kernel /vmlinuz-2.6.14.6-grsec ro root=/ |
All times are GMT -5. The time now is 02:45 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
HTML Help provided by HTML Help Central.