Init module
- In general, Linux programs can only be started with another Linux program. For example, log in to the Linux terminal program Mingetty.
- But who does the terminal program start with? When you start Linux on your computer, the kernel loads and starts the INIT program.
- The INIT program then loads the hard disk and starts the terminal program. When you log in to the terminal program, it launches the command line interface shell.
- After Linux is started on the computer, the INIT program monitors any signals that turn off the computer, such as power failure signals and restart commands that occur on uninterruptible power supplies (UPS).
First, what is init:
Init is one of the most indispensable programs in Linux system operation.
The so-called Init process, which is a user-level process initiated by the kernel.
After the kernel has booted itself (already loaded into memory, started running, and has initialized all device drivers and data structures, etc.), the boot process is completed by starting a user-level program init. So, Init is always the first process
(Its process number is always 1).
The kernel will find it in a few places where it used to be in the past, and its correct location (for Linux systems)
It's/sbin/init. If the kernel cannot find Init, it will try to run/bin/sh, and if it fails, the boot of the system
Will fail.
Linux Init Process Detailed