Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added How a system boots up. This is corresponding to the issue 642. … #646

Merged
merged 5 commits into from
Oct 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions Operating Systems/OS_Boot_Process.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# How the Computer Boots Up

### Following steps takes place when a computer boots up :
Step 1. You turn on the Desktop/Laptop

Step 2. POST (Power On Self Test) takes place.

Step 3. BIOS (Basic Input Output Services) program is loaded.

Step 4. The BIOS loads the designated boot sector of the boot drive into the RAM (Random Access Memory).

### What is POST
POST, which stands for Power-On Self-Test, is a diagnostic process that a computer's central processing unit (CPU) and motherboard go through when the computer is first powered on. Its primary purpose is to check and verify that essential hardware components, such as the CPU, RAM (Random Access Memory), storage devices, and other critical components, are functioning correctly.

Here's an overview of how POST works:

1. Power-On: When you turn on a computer, the power supply sends electricity to the various components, and the CPU starts executing instructions from the computer's firmware or BIOS (Basic Input/Output System).

2. Initialization: The BIOS initializes essential system components, such as the CPU, RAM, and motherboard. It configures hardware settings and checks for the presence of peripherals like a keyboard, mouse, and storage devices.

3. Memory Test: One of the critical tasks of POST is to perform a memory (RAM) test. It checks for errors in the system's RAM, ensuring that it is functioning correctly. Any errors detected during this phase are typically reported to the user in the form of beep codes or error messages.

4. Hardware Detection: POST also detects and checks other hardware components, such as the hard drive or SSD, graphics card, and any connected devices. It verifies that these components are operational.

5. POST Beep Codes: In case of errors or issues during the POST process, many motherboards are equipped with a series of beep codes that can help diagnose the problem. The number and pattern of beeps can provide information about the specific issue.



6. Boot Device Detection: After successfully completing the initial checks, POST identifies the bootable storage devices, such as the hard drive or SSD, and determines the order in which they should be used for booting the operating system.

7. Handoff to Bootloader: Once the POST process is complete and all essential hardware components are verified, the BIOS hands off control to the operating system's bootloader, which initiates the loading of the operating system itself.

POST is an essential part of the computer startup process, as it helps ensure that the hardware components are in good working order before the operating system takes control. If POST encounters critical errors that prevent the computer from starting, it will typically provide error codes or messages to help diagnose and resolve the issue.

### BIOS
BIOS stands for Basic Input/Output System. It is a fundamental software component that exists in a computer's motherboard firmware. BIOS serves as the interface between the computer's hardware components and the operating system (OS). Its primary role is to initialize and control hardware during the boot-up process and provide low-level functions for the operating system.

Here are some key functions and characteristics of the BIOS:

1. Initialization: When you turn on your computer, the BIOS is the first software that runs. It initializes essential hardware components, such as the central processing unit (CPU), memory (RAM), storage devices (hard drives or SSDs), and input/output devices (keyboard, mouse, etc.).

2. Bootstrap Loader: The BIOS contains a small program called the "bootstrap loader" or "bootloader." This program is responsible for locating and loading the operating system's kernel from the bootable storage device (e.g., hard drive, SSD, USB drive) into memory, allowing the operating system to start running.

3. Configuration: BIOS provides a user-accessible interface (often accessed by pressing a specific key during the boot process, like F2 or Del) that allows users to configure various hardware settings. These settings can include CPU clock speed, system time and date, boot device order, and more.

4. Security: BIOS can also include security features, such as password protection and secure boot options, to prevent unauthorized access to the system and ensure that only trusted operating system components are loaded during startup.

5. Error Handling: During the Power-On Self-Test (POST) phase (part of the boot process), the BIOS checks the hardware components for errors. If any critical hardware errors are detected, the BIOS may provide error codes or messages to help diagnose the problem.

It's worth noting that in recent years, the BIOS has been largely replaced by a more modern firmware called UEFI (Unified Extensible Firmware Interface) in many computers. UEFI offers enhanced features, improved security, and a more user-friendly interface compared to traditional BIOS. However, the terms "BIOS" and "UEFI" are often used interchangeably by many people, as UEFI still serves the same fundamental purpose of initializing and controlling hardware during the boot process.

### UEFI vs BIOS
UEFI (Unified Extensible Firmware Interface) and BIOS (Basic Input/Output System) are both firmware interfaces that serve as the bridge between a computer's hardware and its operating system. However, there are several key differences between UEFI and BIOS:

1. Boot Process:

**BIOS**: BIOS follows a legacy boot process that involves a Master Boot Record (MBR) and a 16-bit boot loader. It has limitations on the size of bootable drives and partitions.

**UEFI**: UEFI uses a modern boot process that supports the GUID Partition Table (GPT), which allows for larger drive capacities and more partitions. UEFI also supports Secure Boot, which helps prevent unauthorized code from running during the boot process.

2. Initialization:

**BIOS**: BIOS initializes hardware sequentially, which can lead to longer boot times, especially on systems with multiple components.

**UEFI**: UEFI can initialize hardware in parallel, reducing boot times by taking advantage of modern multi-core processors.

Both of them serves the same purpose more or less. But UEFI is more modern and advanced than BIOS. It provides more features and better hardware compatibility than BIOS.