Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The kernel for my device includes so many files for other devices and situations that my device cannot use. The kernel carries around the files for everything and is much bigger than just the files for my device.

Whats the reason for this? Why not remove the unnecessary files and have a much smaller kernel?

share|improve this question
because the complexity in distribution would be atrocious, and everyone would have to compile their own kernel every time they needed an update, causing a serious support problem. for embedded devices which get upgrades rarely, compiling your own with only the components you want becomes worthwhile. – Frank Thomas Oct 6 '13 at 7:22
Wouldn't this be better for unix.SE? – Ben Crowell Jul 29 '14 at 14:14
up vote 5 down vote accepted

You could actually build a kernel to your specific hardware if you wanted to. I think a good distribution to illustrate this is gentoo - you can run kernels tuned to your hardware or run genkernel.

You could use a generic kernel, which is bigger, or build a kernel to your needs. Forget something that can't be loaded as a module, and you rebuild the whole kernel.

There's of course kernel modules (which is how many third party drivers are packaged), but the point of having a default sane set of kernel modules is to be able to know that your system is reasonably likely to work. Imagine needing to spend a few hours compiling your kernel because you forgot to enable X (this happened to me, the last time I tried to install gentoo)!

You do not, however have the drivers for all devices - you often end up installing drivers yourself - for example, nvidia has seperate drivers outside the noveau packages many distros have (and this is outside the kernel) and the same is true of many network cards. There's also mechanisms that just load necessary modules as needed

If you want a minimal set of drivers, on a slim kernel, built to the specifications of your own system, do it. Just remember its a lot of work, and the generic kernel is usually a sane set of tradeoffs the distro developers chose cause its reliable.

share|improve this answer
The android kernels are in the order of 5mb, about how big would a kernel be if it were pared down for a single device, and no extras added? How much memory space would be saved? Would it be worth the effort? – codingtent Oct 7 '13 at 9:02
ubuntu's kernel package is somewhere between 90-120 mb so, in some cases worth it. – Journeyman Geek Oct 7 '13 at 10:12
I've been quite lazy when it comes to updating my kernel, but the kernels I have built for my x86_64 are about 3.5MB (vmlinuz) + 1.8MB ( (from kernel versions in the range 2.6.37-3.2.1). Most drivers are built-in. I see that my /lib/modules is 44MB though... (Yes, I use Gentoo :) ) – thomasa88 Dec 7 '13 at 18:27

Because, Developers never know which hardware YOU are going to use it for your linux. And yes you can customize your files according to your Hardware.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.