Kernel customization: What should be modules and built-in?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It is up to you to decide what to use (there might be one or 2 exceptions).
I like my kernels as lean and static as possible. The only thing that is not static in my setup (one of the exceptions): Alsa This is due to the fact that software that uses alsa looks specifically for a module. This might change in the future and if it does I'll switch to a static entry.
Using modules might also mean that you need to add to/edit your initrd file to make sure the module is available during boot.
My advise would be: Build as static as possible (but that is a personal opinion).
Thanks for your answer. I have already disabled unnecessary gpu and wlan drivers and will disable ethernet too (no ethernet on laptop). What would make the biggest difference (performance-wise and kernel size-wise) to disable? Suggestions are welcome.
A kernel that is configured to only use what you need/want is the best. Telling you which options to enable/disable is hardly doable without knowing the hardware details of your setup, I can however give you some general information on how to make you kernel mean and lean:
- Check your hardware and only enable that what you have. Use tools like lspci, lshal, dmesg and manuals (etc) to determine your hardware. Example: If you have an intel based machine disable the amd specific stuff (or vice versa).
- Only enable laptop specific entries that are relevant for your specific laptop.
- Ask yourself which filesystem(s) you want to use (on your laptop and which you might need to mount from an external source): Disable all others (do you actually need ntfs, reiserfs, xfs, btrfs, etc).
- Initially disable deprecated options.
In general I would advise you to check all the options. Sometimes the help tab will help you in deciding.
BTW: Do make sure you have a fall-back option, disabling an option that you do need might make your system unresponsive!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.