Bootstrapping in UNIX / LINUX

Bootstrapping in computer science is the technique for producing a self-compiling compiler. That is, compiler / assembler written in the source programming language that it intends to compile. An initial core version of the compiler is generated in a different language mostly assembly language. Successive developed versions of the compiler are developed using this minimal subset of the language.

When a computer is turned on, it is booted up with the code that is stored in ROM. The same code tries to figure out how much to load and start your kernel. The kernel verifies all the system’s hardware, and initializes the system’s init process, which is always PID 1. A lot of things will happen before a login prompt can appear for the user to login. File systems must be checked and mounted, and the system daemons started. These procedures are managed by a series of shell scripts that are run in sequence in init. The above entire process is called as Booting process.

There are two ways where a UNIX / LINUX OS can boot, ‘Automatic mode’ & ‘Manual mode’

Without any external assistance if the system performs the whole boot procedure, then it is called ‘Automatic Mode’. In ‘manual mode’, at first system follows the automatic procedure up to a point before most initialization scripts have been run, And then turns control over to an operator. Up to this point computer will be running in ‘Single User mode’, Most of the system process will not be running, while other users cannot login as well.

Steps Involved in Boot process:

It is involved in six different steps:

  1. Loading the code and initializing the kernel
  2. Detecting the Devices and configuring them
  3. Creating spontaneous system processes
  4. Operator intervention (manual boot only)
  5. Execution of system startup scripts
  6. Multiuser operation