How to compile new kernel in order to turn on SELinux
Ok, as I can see, images from Linode don't include SELinux support in kernel. May be in order to reduce clients troubles, I don't know…
As I think I have to build new kernel with SELinux support. Would you advise me how to do it? I've never do it
13 Replies
the Linode guide
I tried once following the Centos 6.5 instructions but I don't think I did it right. Because files end with .debug when I look at the boot directory and I am not sure if I am doing it right.
Thank you.
EDIT: btw SELINUX is the example option in the guide, so it should have everything you need.
It is still trying to complete "make -j3 bzImage" command. wow.
The only warning I had was "Cannot find LILO." during "make install". I made a search about it and people says it doesn't matter.
I renamed vmlinuz as vmlinuz-3.19.3-custom as instructed but after completing everything, and rebooting the server, uname gives me back following:
Linux li152-129.members.linode.com 3.19.3 #2 SMP Thu Apr 16 22:18:54 UTC 2015 x8664 x8664 x86_64 GNU/Linux
there is no cutstom suffix.
Perhaps tried 6-7 times now and I can't make it work. Feeling like an idiot.
"uname -a" changes from 3.19.1 to 3.19.3 but it doesn't use my 3.19.3-custom.
Any other suggestion would be great. Thanks.
@smozgur:
"uname -a" changes from 3.19.1 to 3.19.3 but it doesn't use my 3.19.3-custom.
If you get this change that means that you're running the new kernel you compiled. I'm not sure why it's not exactly the output you expect it to be without seeing your system first hand, but if you can log in and uname shows the right kernel version number, then it sounds like it worked. Have you tried setting up SELinux afterwards?
Thanks for the replies.
I was about to move on but I then discovered the most impressive feature of Linode cloud service: upload my own virtual machine! So I built a minimal (default) Centos server in my local computer, uploaded it to my Linode, changed Kernel as necessary (it is still required as I learned by experiencing), then restarted my machine, wow! It works!!!
Just in case, I made a backup as Golden master of my disk, so I wouldn't need to upload again (then I learned, I already have a Clone feature - what a beautiful place is this!).
Now I am happy! I am guessing that Centos installation in Linode doesn't include some SELinux related applications that Minimum Centos includes. So when I built and uploaded my Centos, then after changing Kernel, everything worked!
It is time to create another Linode now!
Thanks for the help!