The kernel will get a root filesystem, either an initramfs, passed as a pointer from the bootloader, or by mounting the block device given on the kernel command line by the root= parameter. Once it has a root filesystem, the kernel will execute the first program, by default named init, as described in the section Early user space in Chapter 4, Configuring and Building the Kernel. Then, as far as the kernel is concerned, its job is complete. It is up to the init program to begin starting other programs and so bring the system to life.
To make a minimal root filesystem, you need these components:
- init: This is the program that starts everything off, usually by running a series of scripts. I will describe how init works in much more detail in Chapter 10, Starting Up – The init Program
- Shell: You need a shell to give you a command prompt...