The beginning of a Linux Story

Rihaab WadekarRihaab Wadekar
4 min read

Welcome to the day-6 blog of the Linux workshop Guided by Mr Pranav Jambare .

The following Topics were covered on Day 6 of the workshop.


Booting Process

  • Booting is the process of starting a computer. It can be initiated by hardware such as a button press or by a software command.

  • Booting a Linux installation involves multiple stages and software components, including firmware initialization, execution of a boot loader, loading and startup of a Linux kernel image, and execution of various startup scripts and daemons.

  • In Linux, there are 6 distinct stages in the typical booting process.

  1. BIOS

  2. MBR

  3. GRUB

  4. Kernel

  5. Init d / system.d

  6. Run level

Bios

  • BIOS stands for Basic Input/Output System.

  • The BIOS loads and executes the Master Boot Record (MBR) boot loader.

  • Then, the BIOS searches for, loads, and executes the boot loader program, which can be found in the Master Boot Record (MBR).

  • Once the boot loader program is detected, it's then loaded into memory and the BIOS gives control of the system to it.

MBR

  • MBR stands for Master Boot Record, and is responsible for loading and executing the GRUB boot loader.

  • The MBR is located in the 1st sector of the bootable disk, which is typically /dev/hda, or /dev/sda, depending on your hardware.

  • It includes the 446 bootloaders 64 partition table 2 magic, such as LILO and GRUB, which helps start the operating system during the booting process.

GRUB

  • Sometimes called GNU GRUB, which is short for GNU GRand Unified Bootloader.

  • It is the typical boot loader for most modern Linux systems.

  1. GRUB 1 - We can get code and point to another level.

  2. GRUB 1.5 - Allow the file system(FS) to communicate with the hardware(HW).

  3. GRUB 2.0 - Responsible for loading of Kernel.

Kernel

  • The kernel is often referred to as the core of any operating system, Linux included.

  • It has complete control over everything in your system.

  • It is also responsible for initializing virtual devices into the system.

init d/system.d

  • It is the mother of all the processes i.e First process.

  • It initializes the services.

  • It identifies the default target.

Run Level

  • A runlevel is an operating state on a Unix and Unix-based operating system that is preset on the Linux-based system.

  • Runlevels determine which programs can execute after the OS boots up.

  • The runlevel defines the state of the machine after boot.

  • . Runlevels are numbered from zero to six.

  • Modes are:

    • 0 - Halt state/poweroff.target

    • 1 - Single user mode/rescue.target

    • 2 - Multiuser mode without networking

    • 3 - Multiuser mode with networking

    • 4 - User definable

    • 5 - GUI graphical target

    • 6 - reboot.target


ACL

  • ACL stands for Access Control Lists.

  • Access control list (ACL) provides an additional, more flexible permission mechanism for file systems.

  • It is designed to assist with UNIX file permissions.

  • ACLs can be set using the syntax-

      setfacl -m u:<username>:<permissions> <directory_name>
    
  • The below command is used for viewing ACLs on a file or directory.

      getfacl <filename/dir_name>
    
  • We can remove ACLs by the following-

      setfacl -x u:<username>: <filename>
    

Processes

  • Processes in Linux are essential components of the operating system that execute programs and manage system resources.

  • Every action you perform on a computer involves one or more processes.

Types of processes

  1. Parent and Child process : When a new process is created, it is referred to as the "child process" and the process that creates it is called the "parent process".

    Parent processes are processes that create and manage other processes

  2. Zombie Processes : A zombie process is a terminated child process that has completed its task, but its exit status is still needed by its parent.

  3. Orphan process : An orphan process is a child process whose parent process has terminated before it did.


Alias

  • An alias is a user-defined shortcut or nickname for a command or a sequence of commands.

  •     #Defining an Alias:
        alias aliasName="command_or_commands"
    
10
Subscribe to my newsletter

Read articles from Rihaab Wadekar directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Rihaab Wadekar
Rihaab Wadekar