Custom Linux Kernels with Debian and Fedora - page 3
The Debian Way of Customizing Kernels
When you open
xconfig for the first time it's pretty overwhelming. Linux kernels are rather large now, so it takes awhile to wade through the configuration. As the whole point of this exercise is to wade through the configs and weed out the stuff you don't want and to include the stuff you do want, just settle in and take your time. After going through it once you'll have a re-usable custom
.config file which will streamline future kernel-buildings. Just copy it to the top-level directory of your source tree every time you build a new kernel.
We'll take a quick tour of necessary and common options, so you're still going to have to make some decisions on your own.
xconfig gives information on every option, plus the Documentation/ directory in your kernel source tree is cram-full of information.
Your first decision is in the "Code Maturity Level Options -> Prompt for development and/or incomplete code/drivers (EXPERIMENTAL)." If you want a plain old stable kernel without any wacky stuff, uncheck this. If you want to test new experimental features, then include this.
Say no to "Configure standard kernel features (for small systems) (EMBEDDED)." Unless of course you know this is something you want, which means you're probably a kernel developer.
Include everything under "Loadable module support."
"Processor Type and Features" is where you can make some noticeable performance tweaks. Turn off SMP if you're not running a multi-core or multi-processor machine. Select your CPU type. Select memory support for your amount of physical RAM. Turn off all the laptop stuff if you're not running a laptop.
"Block layer" is where you enable support for large disks and files, which means larger than two terabytes.
Under "Bus options" turn off PCMCIA guff on systems that are not laptops.
Under "Executable File Formats" include everything.
Under "Networking" get rid of all the network protocols you're not going to use like Appletalk, Bluetooth, radio, or IPX. On machines that are not routers or firewalls, you can also get rid of routing options and QoS, and even Netfilter/iptables if you really want to go lean. Don't go too crazy wiping out networking options unless you are very sure you do not want them, because you could break some networking feature that you need. Enable "IP: kernel level autoconfiguration (IP_PNP)" for diskless netbooting.
If you're configuring a kernel for a routerboard like a Soekris or PC Engines WRAP board you might consider removing support for SATA, SCSI, and PATA drives, since they are not supported on most of these.
The rest is reviewing hardware and filesystem support, and cryptography options, plus a few other odds and ends. I recommend supporting all cryptography, which has become an everyday necessity. I probably spend the most time hunting down and getting rid of laptop-related features on desktop systems, or features related to specific laptops such as Dell and Toshiba, and then the dozens of hardware drivers I'll never need.
As a general rule you can turn off anything related to generating debugging messages; these are interesting mainly to kernel hackers, and sometimes not even then.
- Please read the abundant documentation that comes in the kernel sources. This is priceless knowledge directly from the kernel developers.
- Debian Kernel Handbook
- Compiling a Custom Linux Kernel
This article originally appeared on Enterprise Networking Planet, a JupiterWeb site.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 5Linux Top 3: Linux from Scratch, Ubuntu 14.01 Beta and Arch Updates