When do you compile a custom kernel?
For someone new to Linux, hearing tales of people compiling apps is scary. “WHOA! Command line. Text-only interface. Ack! Ack! Ack!” There were only two instances thus far that made me compile a custom kernel. One time I had to compile a custom kernel so that sleep will work on my laptop. Another time I had to compile a kernel was when I experienced kernel panic. Was it scary? Yes. I didn’t know what will happen to my laptop. I spent so much time configuring the kernel because there was just too many things to read and mark or unmark.
So for now this list will include the following times to compile a new kernel:
- kernel panic
- you need to patch something
- you need want to optimize your kernel
- you need to reconfigure certain modules
I know someone who says that compiling a custom kernel enables you to ‘trim off the fat’ from it. Sounds like a good thing, right? But it’s not an easy thing to do. You have to read up a lot on more technical matters about modules and configuring the kernel. It could be daunting but if you have a more experienced Linux user who is confident (even just a little bit confident will do!) it might not be too problematic. It would help if you have a different machine and you have internet access. Sometimes it is sudden but if you have a Linux geek for friends, you’d have people to guide you through it. :) Fortunately not everyone has to do it because the kernels that come with the distro seem to be ok — unless you really want something really different.
Tomorrow I’d be adding some links to resources on compiling a Linux kernel.
Tags: kernelRelated Stories
POSTED IN: Explanation
3 opinions for When do you compile a custom kernel?
it’s about time» Blog Archive » You must crack the nuts…
Jan 30, 2008 at 12:59 am
[…] This is a case in point : When do you compile a custom kernel? […]
alvlin
Jan 31, 2008 at 5:46 am
Luckily, once you doit the first time you can save the config file, and then use it again if you want to compile it again, or a new version (the old options will be ignored and the new ones will be marked as NEW for easy identification)
It is not as hard as it seems, as most “weird” options have a description like “If unsure, choose X” or “the default is the better for desktops” and alike. You do need to know your hardware, but for that the output of lspci should be enough.
I spent 2 hours the first time I did it. Now it takes 10 minutes while checking the new features :-)
Oh, by the way, I always compile it when I upgrade the system (and therefore when new versions of the kernel are installed). I don’t really feel a lot of performance gain, but it is nice to have everything you need in the kernel and nothing else. It is kind of a ritual :-D
Clair
Jan 31, 2008 at 9:17 am
@alvlin You are lucky to do configure for two hours only. Geh~ I wish I did something like that. I guess I was just too scared to mess up and there was no one with me. A ritual you say? Good for you :)
Have an opinion? Leave a comment: