The Linux kernel , as you may already know, is at the heart of the Linux operating system. One of the main responsibilities of any operating system kernel is to provide an interface to the underlying hardware; the kernel handles all communications between applications and hardware. In addition, the kernel implements and oversees a variety of tasks , including the following:
Process creation, scheduling, and termination
Memory management (paging, swapping, and mapping)
Access and security control
You can loosely categorize the kernel into two main components : device drivers and device-independent subsystems . The device drivers implement the actual communications with the physical hardware, whereas the subsystems mediate access to hardware resources by providing each and every process with fair access (known as scheduling ). These components are typically not built into the core kernel, but are instead separate executable objects, or Linux Kernel Modules (LKM) , that can be loaded and unloaded as needed. In other words, the Linux kernel is modular in nature and is not one large monolithic entity; it can be configured and built as a monolithic kernel, however, as you will see in a minute.
In this chapter, you learn enough about the Linux kernel to understand how the kernel works on the surface. You will do this by building a small, lean, monolithic kernel ”one that has a minimal set of device drivers ”that is ideal for use in routers and firewalls. You probably will not want to use this kernel on your desktop or laptop machine on a day-to-day basis. However, you can try this out now (to see how easy it is) and then reinstate the default kernel shipped with Fedora afterward. Then, if you ever need to build a dedicated router or firewall machine, you ll know how.
Before building the actual kernel, however, let s discuss the rationale for building a new version of the kernel and its associated advantages.