How Computers Boot Up

General Legacy Boot Process
  1. CPU jumps to the reset vector when the power is turned on.
  2. CPU executes the BIOS code to start the Power On Self Test (POST).
  3. BIOS loads the Master Boot Record (MBR) and executes the bootstrapper code.
  4. The bootstrapper determines the active partition and loads the OS kernel.

Hard Drive Structure

Data stored in a hard drive can be accessed through physical expressions (e.g., CHS, a combination of cylinder, head, and sector) or logical ones (e.g., LBA, arranging and numbering all sectors in a linear sequence).

A hard drive can be divided into four (primary) partitions at most. The boundaries of partitions are stored in the partition table located in the hard drive’s first sector, called the master boot record (MBR). A partition is typically formatted in a specific file system so that the operating system can manage the storage efficiently.

Source: Mass-Storage Structure
Source: What is MBR, it’s Working and Hacking !!

Legacy 8086 CPU Architecture

Source: JavaTpoint
Source: JavaTpoint
Source: Kuka Zade@Quora
A typical PC memory map (Source: Jon Ρetrosky)

Linux Boot Process

        |                        |

0A0000 +------------------------+
| Reserved for BIOS | Do not use. Reserved for BIOS EBDA.
09A000 +------------------------+
| Command line |
| Stack/heap | For use by the kernel real-mode code.
098000 +------------------------+
| Kernel setup | The kernel real-mode code.
090200 +------------------------+
| Kernel boot sector | The kernel legacy boot sector.
090000 +------------------------+
| Protected-mode kernel | The bulk of the kernel image.
010000 +------------------------+
| Boot loader | <- Boot sector entry point 0000:7C00
001000 +------------------------+
| Reserved for MBR/BIOS |
000800 +------------------------+
| Typically used by MBR |
000600 +------------------------+
| BIOS use only |
000000 +------------------------+

Source: The Linux/x86 Boot Protocol: Memory Layout
Source: Linux Boot Process Explained Step by Step in Detail
Source: Analyzing the Linux boot process

Windows Boot Process

Source: Windows® 7 Resource Kit by Tony Northrup Mitch Tulloch and Jerry Honeycutt
Source: Cybersecurity – Attack and Defense Strategies – Second Edition
By : Yuri Diogenes, Dr. Erdal Ozkaya
Source: Advanced troubleshooting for Windows boot problems
Source: Secure the Windows boot process

References

Leave a Reply