Pages

Friday, April 26, 2024

Understanding the Boot Process in Redhat Linux & CentOS 5&6

The boot process in Redhat Linux and CentOS involves several stages, each responsible for initializing different components of the system. Here's a breakdown of the boot process:

 

  1. BIOS (Basic Input/Output System):

    • Performs system integrity checks.
    • Searches, loads, and executes the boot loader program.
    • Detects and loads the MBR (Master Boot Record) boot loader.
  2. MBR (Master Boot Record):

    • Located in the 1st sector of the bootable disk (/dev/hda or /dev/sda).
    • Contains information about the GRUB (Grand Unified Bootloader) boot loader.
  3. GRUB (Grand Unified Bootloader):

    • Displays a splash screen and waits for user input.
    • Loads the default kernel image specified in the grub configuration file (/boot/grub/grub.conf).
    • Has knowledge of the filesystem.
    • Loads and executes the kernel and initrd images.
  4. Init:

    • Reads the /etc/inittab file to determine the default run level.
    • Defines the available run levels (0-6) and their corresponding modes (halt, single user, multiuser, etc.).
    • Sets the default run level based on the configuration.
    • Loads all appropriate programs based on the default run level.
  5. Runlevel Programs:

    • Services and programs started during bootup.
    • Located in directories corresponding to each run level (/etc/rc.d/rc*.d/).
    • Symbolic links are available under /etc/rc*.d/ for convenience.
    • Programs starting with 'S' are executed during startup, while those starting with 'K' are executed during shutdown.
    • The sequence number in the program names determines the order of execution.

    For example:

    • S12syslog starts the syslog daemon with a sequence number of 12.
    • S80sendmail starts the sendmail daemon with a sequence number of 80.
    • Programs with lower sequence numbers are executed before those with higher numbers.

 





No comments:

Post a Comment