From Windows-Wimp to Command-Line Warrior. Part 14: Cook your own kernel, Gentoo handbook, page 7
4 September 2005
In part three of this series, Research now will save time later , I asked you to find any manuals, boxes or anything else which might give you a clue about exactly what components make up your computer. Don't worry if that did not work out so well, the LiveCD system will probably also tell you enough about your system to get going.
In common speech, people often abbreviate the GNU/Linux operating system to just 'Linux' because it is less of a mouthful, consider 'Linux User Group' or 'Linux Journal'. However strictly speaking 'Linux, refers to the kernel produced by Linus Torvolds and his merry men (and women).
The rest of the system is maintained by other people, a lot of it comes from the Free Software Foundation (who maintain the 'GNU project'). Other parts may come from the Gnome Foundation, the Apache Foundation, X11, IBM, Sun Microsystems, the Mozilla Foundation and lots of volunteer groups and other entities, etc etc.
The Linux kernel is one of the most important parts because it deals with the hardware. It co-ordinates the drivers and manages memory and lots of other (not so) interesting things. It is an amazing program and consistently outperforms all the other alternatives.
In terms of this guide, the most important thing is that the kernel needs to know what hardware you have. There are two ways that this can be achieved:
- Genkernel: this approach is what most GNU/Linux Distributions go for.
Basically the kernel has support for all hardware that you are likely to have and detects what hardware you have at boot-time. This means that the kernel has lots of drivers built in so it takes up more disk space and uses more RAM.
- Manual Kernel: in this approach you fill out a few forms with exactly
what hardware you have. All hardware that you don't own is left unsupported and so the kernel is smaller and faster. Most Gentoo users go for this.
Page 7 of the handbook explains how to set up your kernel manually. It is really easy and you can redo it as many times as you like.
If at the end of the guide, you find that the kernel that you cooked doesn't boot then put the LiveCD back in and follow my instructions about how to Chroot Again.
After the config, I always use the following command to compile it (Taken from Bob P's install guide), just remember that the boot partition needs to be mounted!
> make && make modules && make modules_install && make install
At this point don't worry too much about supporting every single device you have, just concentrate on the basics: processor, graphics card and so on. Consider it a practice, a rough copy; once you have booted your new system and are free of the LiveCD, it is easy to tweak the kernel to your heart's content!


