LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Trimming a installed kernel (https://www.linuxquestions.org/questions/slackware-14/trimming-a-installed-kernel-497398/)

fibster 10-31-2006 09:44 PM

Trimming a installed kernel
 
Hey All,

Anyone care to explain how to trim my kernel down. I have Pat's 26173 and read i believe on shilo's site you could trim it down. I'm not looking to do another kernel just trim it. Do i go to usr/source and run a command? Appreciate any help.

Todd aka fibster

Shade 10-31-2006 11:59 PM

Fibster,

the general procedure is to go to /usr/src/<kernelversion> and run make menuconfig. Then, you deselect support for anything you don't need. Check on what hardware you have with the command lspci. If you're unsure, leave it in. Continue trimming until you're happy with the size. If for some reason, the trimmed kernel won't boot, boot from the old kernel (add a new entry to lilo instead of just replacing the old kernel).

Just ask if you need more info.

-- Shade

MS3FGX 11-01-2006 01:58 AM

It is also helpful to run "lsmod" while running the stock kernel, and then making sure to include anything that was loaded, as these are almost certainly modules your hardware requires.

Bruce Hill 11-01-2006 05:47 PM

The Linux operating system is unique, in that you can rebuild your kernel. This allows you to add support for hardware (i.e. install a driver in Windows) or remove support for hardware that you don't have. With Pat's kernels, however, hundreds of modules are available, but they're not loaded unless the kernel detects that you have that piece of hardware. Therefore, you're not really going to notice any difference in your kernel just by trimming only a few things you happen to know about or can determine from "lspci" and "lsmod" output. They are both important -- "lspci" is very basic, and "lsmod" with Pat's kernels will show you most of your modules.

Whichever way you go, there isn't a single command to "trim down your kernel." It will take a lot of dilligent work, and learning about your hardware and how you use your Linux system.

A good place to start is Kwan Lowe's Kernel Rebuild Guide.

As for learning about your hardware, <Linux> - Google Search is your friend.


All times are GMT -5. The time now is 09:51 PM.