For example, if you want the 3. Note that the filenames in these directory listings are sorted according to the ASCII collating sequence; 2. The very latest kernels may require updated versions of kernel-package from upstream Debian to build correctly; usually they can be installed directly from the Sid deb package from packages. Another easy way to get the kernel sources is to use Git.
If you use this method you'll need to skip the next extraction step. If you got the sources using git, you need to run this command in linux You will need to extract that file by right-clicking on it and choosing "extract here".
Or you can do it manually in a terminal window using the command tar. Make sure the file name you write matches what the real file name is! If you download the kernel from the kernel. Apply kernel patches 1.
You would download the patches you need into a folder of your choice. Enter the extracted kernel source directory, and open up a terminal there. You would run the patch command for all patches you want to add to the kernel. Configure the Kernel Enter the newly extracted source folder, open a terminal, and enter make oldconfig.
Questions may come up during this and all you really need to do is press your "enter" key after each question to choose the default answer. You don't need to type in an answer. If you do enter an answer and you chose a wrong one it could make your kernel unusable. After the make oldconfig is finished you will get the command prompt back and you can then choose to change some of your kernel's configuration to remove unnecessary options or to add options that you do want.
If you are upgrading the kernel, realize that the layout of kernel options often changes, and you may need to reselect something that was previously selected under a different menu before. To configure a stripped-down kernel with only support for your current hardware, use make localmodconfig This will configure the kernel based on what modules are currently loaded, plus what CPU features are detected.
You should double-check the results in the GUI configurations below, and add any external USB device drivers may be necessary. It may also add virtualization features, based on your CPU, that you may want to disable.
If you want to configure your kernel some more before building it, you can type make menuconfig and then go through all the kernel options to add or remove things. You can use make xconfig instead of make menuconfig. Configure the kernel to your liking but make sure that you don't remove something you need.
Change the processor to your specific model. Other performance suggestions can be found by searching the web. The more fluff you remove, the faster the kernel will be. If you know you have specific hardware, compile it into the kernel instead of a module.
If you are unsure leave it as a module. Modules are inserted when needed. For information on what hardware you have, the output of lspci is helpful and installing the app lshw and running as root is also very informative. Practice makes perfect, and the entire process takes much less time with experience. If necessary, clean the source folder: The kernel will take a while to build so take a break while you wait for it.
It can take an hour, more or less, depending on how big the kernel you compiled is and how fast your computer is, how many drivers you are building, and how many threads of execution and cores your CPU supports. Note that you can customize the number of threads, i. The default command uses all cores available. This will generate a lot of heat, so make sure your machine is well ventilated. Install the Kernel and the Extra Kernel Deb Files When you get the command prompt back you can use a file manager to look the next level up from the extracted source directory and see if you have up to four packages with the.
The kernel-image and kernel-headers packages should be installed, the source and doc packages are optional and usually not needed. The easiest way to install these debs is to type in the terminal as root in the folder with the debs: Gebi will also do the job in Mepis 8. If not, the following commands in a root terminal will fix it: If for some reason it's not there, consult MX Boot Repair Installing Missing Modules Often after you have compiled the kernel there will be a few missing modules.
Consult the Users Manual as needed. After rebooting using the new kernel module-assistant needs to be initialized using m-a update Recompiling A Kernel Same as above really. All you would need to do if you want to compile the same kernel again is to uninstall the kernel using Synaptic or apt-get.
Then follow the guide above to build a newer kernel. You uninstall a kernel before you compile, build and install again because if you don't you will run into problems because of the previous and the new kernels having the same name.
Uninstalling fixes that for you.