System startup and shutdown procedures – System Administration – Linux operating system

System startup and shutdown procedures in Linux involve a series of steps that are executed to initialize the system during boot-up and gracefully shut it down. These procedures are managed by various components, including the boot loader, init system, and system services. Here’s an overview of the typical system startup and shutdown procedures in Linux:

  1. System Startup:a. Power-On and Boot Loader:
    • When the system is powered on, the boot loader (such as GRUB or LILO) is executed, which resides in the Master Boot Record (MBR) or EFI System Partition (ESP).The boot loader loads the Linux kernel and optional initial RAM disk (initramfs) into memory.
    1. Kernel Initialization:
    • The Linux kernel is decompressed and initialized with essential hardware drivers and core functionality.The kernel mounts the root file system specified in the boot loader configuration.
    2. Init System:
    • The init system, traditionally SysVinit or more commonly systemd, is responsible for managing the system initialization process.The init system starts the initial user space process, which is typically systemd (PID 1).
    3. Target Initialization:
    • The init system reads the target or runlevel specified in its configuration.The target defines the system state and the set of services to be started.systemd uses targets like multi-user.target (default for server systems) or graphical.target (default for desktop systems).
    4. Service Initialization:
    • The init system starts essential system services and daemons based on the target.
    • Services may include network management, system logging, device initialization, and other core components.
  2. System Shutdown:a. User Initiated Shutdown:
    • A user initiates the system shutdown through commands like “shutdown” or “reboot” or through a graphical interface.The shutdown command sends a signal to the init system to initiate the shutdown process.
    1. Initiated Shutdown:
    • The init system receives the shutdown signal and starts the shutdown procedure.It sends termination signals to running processes and stops services in a specific order.
    2. Unmounting File Systems:
    • The init system unmounts file systems, ensuring they are no longer in use.This includes unmounting network shares, detachable devices, and the root file system.
    3. Deactivating System Services:
    • Services and daemons are stopped in the reverse order of their initialization.This ensures that dependent services are properly shut down before their dependencies.
    4. Kernel Shutdown:
    • The init system signals the kernel to shut down.The kernel terminates running processes and halts the system.
    5. Power Off:
    • The system hardware is powered off, either manually or automatically, depending on the system configuration.

It’s important to note that specific distributions or configurations may have variations in the startup and shutdown procedures. However, the general process involves the boot loader loading the kernel, the init system starting user space processes and services, and the orderly shutdown of services and the kernel during system shutdown.

SHARE
By John

Leave a Reply

Your email address will not be published. Required fields are marked *

No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.