Language Selection

English French German Italian Portuguese Spanish

HOWTO: Installing Grsecurity patched kernel in debian/ubuntu

Filed under


This is based on the same walkthrough I posted for grsecurity on red hat based kernels except this is for debian based kernels. The current stable debian kernel is vulnerable to about all of the new local exploits and if you are running the 2.4 kernel you are vulnerable to even more. Debian even had one of their servers hacked with the local root exploits, they only released a patched kernel for the testing branch to my knowledge.
The PDF version can be found HERE.
Ok so here goes.

If you have not done any compiling or built any kernels you must get the packages needed.

sudo apt-get install build-essential bin86 kernel-package

sudo apt-get install libqt3-headers libqt3-mt-dev (needed for make xconfig)

First get what is needed and patch the kernel.

cd /usr/src



tar -xjvf linux-

gunzip < grsecurity-2.1.9- | patch -p0

mv linux- linux-

ln -s linux- linux

cd linux

copy your current config over

do uname -r to see what kernel your running and copy it, example:

cp /boot/config-2.6.15-26-686L .config

*Configure the kernel:

sudo make xconfig

if you are doing this on a server use makeconfig

make sure you select the basic stuff that is needed, iptables, your processor type, and then go in Security Options and to grsecurity, select which level of security you want and any other options you may want.

*In a terminal make sure you are in /usr/src/linux with full root access.

We will build a ".deb" file that can be installed in our Ubuntu system, using make-kpkg.

*In a terminal type:

make-kpkg clean

make-kpkg -initrd --revision=ck2 kernel_image

If there wasn't errors this will build the kernel and a ".deb" file will be created at /usr/src.
*To install it:

sudo dpkg -i kernel-image-2.6.17*.deb

Now reboot and if you did everything correctly it should boot back up and you will be using the new grsecurity kernel.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

hmm, sorry about the bbcode

hmm, sorry about the bbcode errors, you should still know what to copy

re: bbcode

I fixed it best I could using html.

You talk the talk, but do you waddle the waddle?


for who ever does this walkthrough, I copied the deb package making off my ck tutorial and left that in one place
make-kpkg -initrd --revision=ck2 kernel_image

when you do that you can make it whatever you want, even that would work just remember that kernel is grsecurity.

Also on the installing on server, use make menuconfig to make your config

I was too worried about the bbcode and made a few typos, couldnt find a way to edit.

More in Tux Machines

Solus Is Now Using Linux Kernel 4.1.10, Lots of Packages Updated

Even if Solus is running a little late, it doesn't mean that its developers are not actively working on it. In fact, quite a lot of interesting stuff has been happening with Solus and all the planned changes will be available in the stable version. Read more

Android 6.0 up close: Google Now on Tap is almost amazing

Can you believe it? After months of waiting and anticipation, Google's Android 6.0 Marshmallow release is finally on its way into the world. I'll have a detailed overview of what's different with Marshmallow and why it all matters for regular users soon. First, I wanted to take an up-close look at one of Android 6.0's most interesting features: Google Now on Tap. As I mused when Google gave us our first glimpse at Now on Tap this summer, this feature really seems like the future of Android -- like something that has the potential to change the way we interact with our mobile devices. Read more

Today in Techrights

Linux Foundation Launches OpenChain Workgroup for Open Source Standards

Open source code is supposed to reduce redundancy by saving developers from reinventing the wheel. To help it do a better job of that, the Linux Foundation this week announced a new OpenChain Workgroup, a new initiative that aims to standardize common practices to make open source more efficient. Read more