Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

What are the correct steps to compile a Linux kernel? Are these steps the same or different for different kernel versions i.e for 2.2, 2.4 and 2.6.

share|improve this question

migrated from Jul 26 '10 at 11:54

This question came from our site for professional and enthusiast programmers.

Can you give more information about your distribution? This will allow us to specify a more accurate way to accomplish this task. – Tom Wijsman Jul 26 '10 at 12:08
I am using Ubuntu on VMWare and trying to compile linux kernel after patching it for KML(Kenele Modle Linux) – Adnan Jul 26 '10 at 12:13
up vote 0 down vote accepted

You can follow this guide from the Ubuntu Help Community,
you might want to go for the "Alternate Build Method: The Old-Fashioned Debian Way".

It does not mather what version you take, just don't go too old... The best option is to pick the newest.

share|improve this answer
the guide didnt solve my problem but a tip about initramfs in the comments worked. So i am accepting this answer – Adnan Jul 26 '10 at 13:23



will compile the kernel, but there is a bit more to it.

Here is a nice write up on how to do it.

I wouldn't bother with the older kernels, but I don't think the ideas behind the process have changed much, but stuff like make menuconfig may not work with the old stuff (and you may have to replace it with make config) etc...

share|improve this answer

Best howto I've EVER read. This is for Ubuntu or Debian.

(It's been there for almost years and it's being updated constantly so don't worry it won't disappear. But yeah you can save it just to make sure.)

share|improve this answer

I never compiler kernel older than 2.6, so I can't help you there, but here is part of Gentoo's manual which discusses how to compile kernel. Please note that some distributions may have their own means of kernel compilation. Telling us exactly what you want to do will help us answer your question.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .