How Operating System Boots up?
We can describe it in 5 steps:
-
PC power On.
-
CPU initializes itself and looks for a firmware program (BIOS) stored in BIOS Chip (Basic input-output system chip is a ROM chip found on mother board that allows to access & setup computer system at most basic level.)
- In modern PCs, CPU loads UEFI (
Unified extensible firmware interface
)
- In modern PCs, CPU loads UEFI (
-
CPU runs the BIOS which tests and initializes system hardware. Bios loads configuration settings. If something is not appropriate (like missing RAM) error is thrown and boot process is stopped. This is called POST (Power on self-test) process.
- (UEFI can do a lot more than just initialize hardware; itβs really a tiny operating system. For example, Intel CPUs have the Intel Management Engine. This provides a variety of features, including powering Intelβs Active Management Technology, which allows for remote management of Business PCs.)
-
BIOS will handoff responsibility for booting your PC to your OSβs bootloader.
- BIOS looked at the MBR (Master Boot Record), a special boot sector at the beginning of a disk The MBR contains code that loads the rest of the OS, known as
bootloader
. The BIOS executes the bootloader, which takes it from there and begins booting the actual OS (windows or linux or mac). - Typically, present at the
0th index
of the disk. - In other words, BIOS or UEFI examines a storage device on your system to look for a small program, either in MBR or on an EFI system partition, and runs it.
- BIOS looked at the MBR (Master Boot Record), a special boot sector at the beginning of a disk The MBR contains code that loads the rest of the OS, known as
-
The bootloader is a small program that has the large task of booting the rest of the operating system (Boots Kernel then, User Space).
- Windows uses a bootloader named
Windows Boot Manager (Bootmgr.exe)
. - most Linux systems use
GRUB
, and Macs use something calledboot.efi
.
- Windows uses a bootloader named