Understanding the Linux boot and startup processes is important to being able to both configure Linux and to resolving startup issues.
There are two stages to what most people call the Linux boot process. In reality there are two processes that are required to boot a Linux computer and make it usable: boot and startup.
The Boot sequence is completed when the kernel is initialized and the init (or systemd in more recent distributions)process is launched. The Startup process then takes over and finishes the task of getting the Linux computer into an operational state.
The Boot Process
The boot process can be initiated in one of a couple ways. First, if power is turned off, turn on the power to begin the boot process. If the computer is already running a local user, including root as well as unprivileged users, can programmatically initiate the boot sequence by using the GUI or command line to initiate a reboot. A reboot will first do a shutdown and then restart the computer.
Overall the Linux boot process is fairly simple to understand. It is comprised of the following steps which will be described in more detail in the following sections.
- BIOS POST
- Boot loader – GRUB
- Kernel initialization
- Start init or systemd, the mother of all processes. Beginning with Fedora 14, init has been replaced by systemd.
The first major section in this chapter covers the Linux boot process in significant detail from BIOS POST up through starting init or systemd.
The Startup Process
The Startup process follows the boot process and it brings the Linux computer up to a state in which it is usable for productive work.
Using SysV Init
- Run rc.sysinit
- Run rc which runs the start scripts for the configured runlevel
- Start target services directly using systemd.
- Do not start services that are not immediately required, just create a socket on which to listen for clients of those services.
The Startup process, including the System V start scripts or systemd is covered in the subsequent sections of this Chapter.