SHARE
TWEET

Building Kernel 3.2.68 and GrSecurity for Debian Stable

kaiux Mar 25th, 2015 (edited) 362 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # building Kernel 3.2.68 and GrSecurity for Debian Stable
  2. # @Copyright 2015 - Kaio Rafael (@kaiux)
  3.  
  4. mkdir kernel_stable; cd kernel_stable
  5.  
  6. wget -c https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.2.68.tar.xz
  7. wget -c https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.2.68.tar.sign
  8. wget -c http://grsecurity.net/stable/grsecurity-3.1-3.2.68-201503251805.patch
  9. wget -c http://grsecurity.net/stable/grsecurity-3.1-3.2.68-201503251805.patch.sig
  10.  
  11. xz -d linux-3.2.68.tar.xz
  12. gpg --verify linux-3.2.68.tar.sign
  13. gpg: Signature made Fri 06 Mar 2015 02:19:51 PM AMT using RSA key ID 6092693E
  14. gpg: Cant check signature: public key not found
  15. gpg --recv-keys 6092693E
  16.  
  17. tar -xf linux-3.2.68.tar
  18.  
  19. cd linux-3.2.68/
  20. # from my old compilation .config file; you can choose the debian default kernel as well
  21. cp /projects/kernels/source-3.2.30/linux-3.2.30/.config .config
  22. make oldconfig
  23. patch -p1 < ../grsecurity-3.1-3.2.68-201503251805.patch
  24. make menuconfig
  25.  
  26. # you should enable all GrSecurity following the path:
  27. # exit and save the modification
  28. Security Options -> GrSecurity -> Configuration Method - Automatic
  29.  
  30. # run this to generate the .deb with kernel files
  31. fakeroot make deb-pkg
  32.  
  33. ls ../linux*.deb
  34.  
  35. # I got this as output
  36. #../linux-firmware-image_3.2.68-grsec-1_amd64.deb        ../linux-image-3.2.68-grsec_3.2.68-grsec-1_amd64.deb
  37. #../linux-headers-3.2.68-grsec_3.2.68-grsec-1_amd64.deb  ../linux-libc-dev_3.2.68-grsec-1_amd64.deb
  38.  
  39.  
  40. #http://en.wikibooks.org/wiki/Grsecurity/Configuring_and_Installing_grsecurity
  41. #http://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-common-building
RAW Paste Data
Top