Linux Boot And Startup Process

 || Linux Boot And Startup Process ||

Hello Everyone, Hope the Installation was easy to Understand and Successful 😅. Now lets Move on to next part of Topic i,e. Linux Boot and Startup Process. In General we will be discussing about what goes in background when system is turned ON. 

There are two sequence of events that are required to boot Linux Computer: Boot and Startup.

The Boot sequence starts when the PC is turned ON, and is completed when the kernel is Initialized and  Systemd is Launched. Overall Process is Compromised of  following sections:

💫 BIOS POST

💫 Boot Loader [ GRUB2 ]

💫 Kernel Initialization

💫 Start Systemd 

The Boot Process can be initiated in two ways : Power On an Restart/ Reboot.

Lets Begin with BIOS POST:

When power is turned ON, System runs the POST [ Power On Self Test ] which is part of the BIOS (Basic I/O System). BIOS was designed to initialize hardware components, an POST is part of BIOS whose task is to ensure that the computer hardware functioned Correctly. Note that if POST fails, Computer may not turned On an you wont be able to do any activity until its fixed.

The Logical Partition Responsible for initiating BIOS is stored in "/" Partition. As mentioned earlier if "/" Partition is corrupted overall System fails to Boot. In Case of Windows OS its C-Drive.

Now once BIOS checks the Operability of the hardware, it Issue BIOS Interrupt which Locates the Boot sectors [ GRUB ]. Once the valid Boot record is found i,e. is GRUB it loads it onto the RAM and Control is then Transferred to Boot Sector.

In Between Boot Sectors, There are three boot Loaders used by Linux Distributions:

GRUB, GRUB2, and LILO of which GRUB2 is the newest as of now and widely used and appreciated.

GRUB stands For "Grand Unified Bootloader, Version 2" .Now what GRUB2 does is find the Operating System Kernel an load it onto the Memory an get it Running.

GRUB2 is most Compatible as Boot Loader  for kernels used for different types of Linux Distributions In market.

Kernel:

Now all of the kernels are in a self extracting, Compressed format to save space. The Kernels are located in the /boot directory, along with initial RAM disk image, and device maps of Hard-drives.

After the selected kernel is loaded into memory and begins executing, it must first extract itself from the compressed state before it could perform any useful work. 

Once the Kernel has Extracted itself, it load Systemd which is replacement for the old SysV init program and then turns control over to it.

This is the end of Boot Process.

Now, The Startup Process:

The Startup Process follows the boot process which brings Linux Computer to an Operational State.

Systemd:

Systemd can be called as mother of all process an is responsible for bringing the Linux host up in which productive work can be done.

What Systemd does is configure the filesystem, to determine which state or target it should boot the Host. Once the Systemd Configures the file it runs (assigns) the Runlevel  [ 0-6 ] Programs.

If it is Desktop workstation, This is Typically graphical.target i,e. runlevel 5 

If it is Server , its Multi-user.target which is like runlevel 3.

To simply check Runlevel of Operating system,

Command: runlevel

Output: 5 (Single User)

In usual cases if its runlevel 3 , simply Command: init 5 an you will have desktop workstation Running.

Now, Turn ON PC an see how long it takes until you see Login Page/ Desktop. And Now You know, what goes in background until system is ready to perform Task.

Isn't it crazy that it won't even take a minute to get all this things Done.

Next We will be Learning Basic Commands to the Linux OS an get More Familiar to it!!

Thank You!!!












Comments

Popular posts from this blog

Linux Network Configuration And Troubleshooting Commands

Linux and Lone