Greetz
Compiling a kernel is like anything else new and perceived as complex, a bit scary. There really is no need however. As long as you keep your working kernel and only add to your bootloader, you can always go back to safe ground.
The docs on how to do this are extremely good, imho, for one big reason - ultra practical and uncaring of image. What I mean is this - There are real "leets" and poser leets and while posers worry about how they appear to others, real leets don't often even realize they are in anyones eyes because all that matters is the job at hand and how best to do it.
You can find one edition here for 2.6 and 3.x kernels
Bob's Kernel Building
I am specifically referring to choosing "make xconfig" over "make menuconfig". I love CLI as much as many or I wouldn't be working in Linux, let alone Slack, but some jobs suit CLI and others are best handled by a graphic solution. Where "menuconfig" is menu driven, showing you a single page at a time, Xconfig sports a Graphic divided into 3 sections - Kernel Section, Subsections and Items, and Help Messages.
For any who have not tried it here is a screenie
XCONFIG
So everytime you select a header you also see what's in it, just as you would Directories and Files in a File Manager. The Help section can be a time saver and a life saver since besides merely giving details about the item (you may have no idea whether you have MTRR and need support or not) it often says "Unless you know you have one of these old devices, it is safe to say 'No' here" or "If you're not sure you can safely say 'Yes' here and it adds little or nothing to kernel size, or choose 'Module'". It's very helpful and makes it far easier for anyone who wishes to learn to compile a kernel safely.
If you follow all the steps, using the
Code:
zcat /proc/config.gz > /usr/src/linux/.config
as stated in the docs,
insures that you begin with the config of the very kernel upon which you are presently running and "make oldconfig" insures that you only have to deal with changes that have been added to your new kernel. Already you have made kernel building nearly trivial. Then, when you run "make xconfig" you can
1) visually see that all is as expected
2) remove any obvious bloat for junk you don't need, which can improve speed some
3) also as indicated in this doc, you can specify your exact CPU, and if your machine is modern and stable, low latency, tickless kernels and greatly improve the "snapiness" of your system.
For those not having the time to visit the doc page, and to remain On Topic, this is AlienBob's comment about initrd
Quote:
Build the ext3 and ext4 (needs the jbd driver as well) and reiser/xfs/jfs fileystem drivers into the kernel instead of compiling them as modules - that way I do not need to create an additional ”initrd“
(see under “Filesystems” in the configurator).
|
If you remember how stressful it used to be to edit partitions with DOS Fdisk, and how when Partition Magic came along it almost made it fun, this is similar to what "make xconfig" accomplishes in kernel customizing. It is very good experience and well worth the hour or two you might invest if you really take your time about it (unless you're still rocking a Celeron 300A :P ).