Fact-checked by Grok 2 weeks ago

Booting

Booting, also known as , is the startup process by which a computer initializes its components, performs diagnostic checks, loads the operating into , and prepares the device for and software execution. The derives from the phrase "pulling oneself up by one's bootstraps," emphasizing the computer's ability to initialize itself without external assistance. This fundamental sequence ensures that the 's resources, such as the CPU, , and devices, are properly configured before the operating takes control. The process begins immediately upon powering on the device and is essential for transforming raw into a functional environment. The booting sequence typically unfolds in several distinct phases. First, the (POST) runs to verify the integrity of core hardware like the processor, memory, and peripherals, often indicated by beeps or LED signals if issues arise. Next, the firmware—traditionally the (BIOS) or its modern successor, the (UEFI)—initializes the hardware, checks the boot order of devices (such as hard drives, SSDs, or USB drives), and locates a bootable medium. The , a small program stored on the boot device, then loads the operating system files into (RAM), transferring control to the kernel, which completes the initialization of drivers and system services. This multi-stage handover ensures reliability, with UEFI offering advantages over legacy BIOS, including faster startup times, support for larger storage devices, and enhanced security features like verification. Modern booting processes incorporate security mechanisms to protect against and unauthorized modifications. Secure Boot, for instance, verifies the cryptographic signatures of the , , and drivers before loading them, preventing rootkits or bootkits from compromising the system at startup. Additionally, optimizations such as fast boot modes—common in Windows and other OSes—reduce initialization time by resuming from a pre-saved state rather than performing a full cold boot. Booting can occur as a cold boot (full startup from a powered-off state) or warm boot (restart without cutting power), each tailored to different scenarios like or routine reboots. These elements collectively define booting as a critical, layered procedure that underpins all operations.

Fundamentals

Definition and Basic Process

Booting is the process by which a device transitions from a powered-off or state to a fully operational condition capable of executing user applications, achieved through the sequential loading and initialization of and the operating into memory. This mechanism, often referred to as "booting" due to the metaphorical idea of the lifting itself up, ensures that essential hardware and software components are properly configured before control is passed to higher-level programs. The process differs between a cold boot, which starts from a complete power-off state and involves full reinitialization including (), and a warm boot, which is a software-initiated restart (such as via a command) that skips some hardware checks to enable faster without interrupting power. In a cold boot, all circuits are reset, and the performs comprehensive diagnostics, whereas a warm boot retains certain initialized states for efficiency. The basic steps of booting begin with the (CPU) receiving a reset signal, prompting it to load the —a predefined containing the initial instruction for execution. then runs the POST to verify and initialize hardware components, followed by the invocation of a boot loader, which serves as an intermediary to locate and load the operating system kernel into memory. Finally, the kernel takes control, completing hardware setup such as memory mapping and handing off execution to the operating system, enabling user applications to run. Hardware initialization plays a critical role in this sequence, with the CPU's directing the processor to code that establishes initial memory mappings, configures interrupts, and prepares peripherals for operation. This ensures a stable environment for subsequent OS loading, preventing undefined states that could lead to system instability.

Key Components Involved

Firmware serves as the initial software layer executed upon system power-on, stored in such as , , or to ensure persistence across power cycles. It performs essential hardware initialization, including configuring basic devices, controllers, and systems, before transferring control to subsequent boot stages. This non-volatile code is critical for establishing a minimal execution , often handling (POST) routines to verify hardware integrity in a single pass. The device refers to the medium containing the and operating files, such as hard disk drives (HDDs), solid-state drives (SSDs), or USB drives, from which the loads initial software during startup. scans predefined devices in a priority sequence to locate a valid , ensuring the can access the necessary code for OS initialization regardless of the technology employed. A boot loader is a compact program, typically residing in the of the boot device, designed to locate, load, and execute the operating system into main memory. It operates with limited resources, often in on x86 architectures, and may perform basic hardware probing or parameter passing to the before relinquishing control. The , as the core of the operating system, assumes control immediately after the boot loader, managing hardware resources through initialization of device drivers, memory allocation, and process scheduling. Once loaded into memory, it expands the system's capabilities by establishing protected execution modes, handling, and user-space interfaces, transitioning the machine from a bare-metal state to a fully operational environment. Interrupt vectors and reset mechanisms form the foundational CPU elements that trigger the booting . Upon —initiated by power-on or a hardware signal—the jumps to a predefined address, such as 0xFFFFFFF0h on x86 systems, where the first instruction of resides. Interrupt vectors, stored in a dedicated table, enable the CPU to respond to hardware events by redirecting execution to specific handlers. The is a special asynchronous exception with the highest priority, ensuring reliable startup across diverse .

Historical Evolution

Pre-Integrated Circuit Examples

In the 1940s and early 1950s, early electronic computers like the relied on manual configuration for initial setup, as they lacked stored programs or automatic loading mechanisms. Programming and initialization involved physically wiring plugboards to connect accumulators, function tables, and constant transmitters, while hundreds of switches on the control panels were set to define operations and data paths. This process, which could take days for complex problems, effectively served as the "booting" by establishing the machine's configuration before computation could begin. Similarly, the , developed in 1949, used a paper tape reader for loading initial programs into its Williams-Kilburn tube memory after manual setup of the . Operators would feed punched paper tape containing the bootstrap code or application instructions through the reader at speeds up to 250 characters per second, with the machine executing the loaded code to initialize further operations. This electromechanical input method marked an early step toward automated loading from external media. First commercial computers in the , such as the delivered in 1951, required significant operator intervention for startup. The process began with powering on the system and manually setting console switches to load a short bootstrap routine from , after which the operator would mount containing the operating system or application. This manual entry ensured the mercury was cleared and ready for the initial program load, often involving verification steps to prevent errors in the storage. By the 1960s, the introduced more structured initial program loading (IPL) using in some configurations for fixed bootstrap code, combined with card readers for variable loads. Operators selected the IPL device via console switches, and the system read the first 24 bytes of code from cards or tape into core memory, executing it to load the full operating system like OS/360. , a woven wire technique providing read-only storage, held invariant parts of the loader, reducing manual entry while card readers enabled flexibility for different environments. Minicomputers of the and , exemplified by the PDP-8 introduced in , typically featured front-panel toggle switches for entering a minimal bootstrap loader directly into core . Once toggled in—often a 20- to 40-word routine—the switches initiated the loader, which then read a binary program from paper tape via a high-speed reader, transferring it to for execution. This hybrid manual-electromechanical approach allowed the compact PDP-8 to without dedicated , relying on operator precision to set addresses and bits. The first microcomputers in the mid-1970s, such as the released in 1975, extended this ROM-less design to hobbyist systems, where users entered the bootstrap loader byte-by-byte using the front panel's sense switches and deposit/examine controls. After manual entry of about 10 to 20 bytes to enable cassette or teletype input, the loader would fetch and verify the full program, such as 4K , from audio . This labor-intensive process highlighted the transition from professional operator intervention to user-driven initialization in personal computing.

Integrated Circuit Read-Only Memory Era

The advent of integrated circuit read-only memory () in the late 1960s revolutionized booting in minicomputers by enabling permanent, non-volatile storage of essential startup code directly on the system board. Mask-programmed chips, which were fabricated with the boot instructions hardcoded during manufacturing, replaced earlier manual methods and allowed for automated execution of diagnostics and loaders upon power-on. In Digital Equipment Corporation's PDP-11 series, introduced in 1970, modules like the M9301 incorporated such containing diagnostic routines to verify hardware operation and multiple bootstrap loader programs to initiate system startup from various peripherals, such as tapes or disks. This integration streamlined the boot process, making minicomputers more reliable for scientific and applications in the 1970s. The 1970s saw microprocessors incorporate single-chip boot ROMs, further miniaturizing and simplifying booting for early microcomputers. The , released in 1974, powered systems like the , where optional EPROM-based monitors provided a basic command interface for loading programs from cassettes or disks, bypassing the need for tedious front-panel switch programming common in precursors like the Altair 8800. These s typically included rudimentary I/O initialization to set up serial ports and memory mapping, enabling the system to communicate with external storage devices immediately after . This era's boot s, often 2KB or smaller, marked the transition to self-contained that could autonomously begin the operating system load. By the late 1970s and into the 1980s, microcomputers adopted erasable programmable (EPROM) and one-time programmable (OTP) ROM for flexible, self-contained booting tailored to consumer needs. The , launched in 1977, featured a 12KB ROM monitor that executed on startup, performing tests, initializing the video , and presenting a prompt for loading or disk operating systems like DOS 3.3, which automated further boot stages. Similarly, the Commodore 64, introduced in 1982, used an 8KB ROM for core boot functions, including vector table setup in , screen initialization, and scanning to support immediate program loading from cartridges or disks. These advancements shifted booting from logic assemblies—requiring wired panels or external programmers—to compact integrated , drastically reducing user intervention and error rates. Key innovations during this period included self-relocating loaders embedded in , which dynamically adjusted code addresses to fit available , and standardized I/O initialization sequences that configured peripherals like displays and controllers before OS handover. For instance, PDP-11 boot ROMs employed to relocate loaders as needed during execution, while and ROMs integrated similar techniques to support variable configurations. This evolution not only accelerated times to seconds but also laid the groundwork for scalable in , , and home use, contrasting the labor-intensive startups of pre-IC eras.

Boot Loaders

First- and Second-Stage Loaders

The first-stage boot loader is a minimal program residing in or the initial of the storage device, executed immediately after the system's , such as , completes its and identifies a boot device. Its primary role is to perform basic hardware initialization, access the boot medium (e.g., parsing the or volume boot record for disk geometry and information), and load the second-stage boot loader into memory before transferring control to it. Due to severe size constraints—typically limited to 446 bytes of executable code within the 512-byte sector—it contains only essential routines for device access and lacks advanced features like user interfaces or filesystem support. The second-stage boot loader, in contrast, is a larger, more capable program loaded by the first stage from a designated location on the boot device, such as the of the active or post-MBR sectors. It handles higher-level tasks, including presenting a boot menu for operating system selection, configuring boot parameters, and loading the selected and into memory to initiate the OS handover. This stage often includes drivers for various filesystems and devices, enabling it to read configuration files and support multi-boot environments. Key differences between the stages stem from their design priorities: the first-stage loader emphasizes compactness and reliability under constraints, focusing solely on transitioning to the next phase without error recovery or configuration options, while the second-stage loader prioritizes flexibility and user interaction, operating in with access to more memory and peripherals. For instance, the first stage may halt on errors like invalid disk geometry, whereas the second stage can provide diagnostic messages or fallback options. These distinctions ensure efficient , with the first stage bridging and the richer environment of the second. Representative examples include the Loader (LILO), where the first-stage loader occupies the MBR and loads the second-stage from the boot partition's initial sectors or /boot directory, verifying map files and displaying progress indicators like "LILO" during execution. Similarly, in pre-UEFI Windows systems, the () serves as the second-stage boot loader; the first-stage code in the volume loads from the root of the system partition, after which reads boot.ini for OS options and loads . Another example is the legacy bootloader for , with its Stage 1 as the first-stage loader in the MBR that chains to Stage 1.5 (a filesystem-capable intermediary) and then Stage 2 for menu-driven loading. The chainloading mechanism operates sequentially: upon execution, the first-stage loader reads the second-stage from a predefined or , copies it to a safe (often above 0x7C00), verifies basic integrity if possible, and executes a far to its entry point, passing any necessary parameters like disk identifiers via CPU registers. This handover ensures uninterrupted control flow, with the second stage assuming responsibility for subsequent initialization and OS invocation.

Multi-Stage and Embedded Loaders

Multi-stage boot loaders extend the architecture beyond two phases by incorporating three or more sequential stages, enabling greater modularity in initializing and loading the operating system, particularly in resource-constrained environments. These loaders divide the boot process into distinct phases, where each stage handles specific tasks such as basic setup, configuration, and advanced device support, allowing for progressive complexity without overwhelming limited onboard resources. In typical multi-stage implementations, stage 0 resides in (ROM) and performs minimal initialization to enable loading the next stage from non-volatile storage like flash. Stage 1, often called the Secondary Program Loader (SPL), initializes essential components such as (SDRAM) and basic peripherals, then hands off to stage 2 or higher for more sophisticated operations like loading device drivers or network protocols. Subsequent stages, such as the full boot loader, manage operating system handover, supporting features like access and configuration prompts. This phased approach is exemplified in , an open-source loader widely used for ARM-based embedded systems, where the Tertiary Program Loader (TPL) may precede SPL for even earlier initialization in systems with severe memory limitations. Similarly, employs a staged process—stage 0 for core hardware init, stage 1 for device configuration, and stage 2 for payload execution—optimizing for low-resource devices by replacing proprietary firmware with a lightweight, customizable payload that can include boot loaders like U-Boot. Embedded loaders further adapt multi-stage designs for specialized, low-overhead environments, prioritizing efficiency in microcontrollers and system-on-chips. Coreboot's payload system, for instance, acts as an embedded loader by initializing hardware directly and executing a modular , such as a minimal OS or secondary loader, thereby avoiding bloated code and enabling faster boots in constrained memory setups. provides an extensible framework compliant with Platform Initialization (PI) specifications, supporting multi-stage boot through modular drivers and initialization phases tailored for platforms, allowing developers to build custom loaders with incremental hardware support. The primary advantages of these architectures include enhanced fault isolation, where failures in later stages do not compromise earlier, immutable ones, improving overall reliability in deployments. They also facilitate updatability by isolating updateable components in higher stages, permitting enhancements or bug fixes without risking core initialization code, which is crucial for long-term maintenance in memory-limited devices. This supports , as additional stages can incorporate advanced features like secure partitioning without redesigning the entire loader.

Booting in Personal Computers

Boot Devices and Sequence

In personal computers, boot devices encompass various media capable of storing the initial boot code and operating system files. Traditional boot devices include drives, optical drives (such as CD-ROMs or DVDs), hard disk drives (HDDs), and network interfaces for remote booting via protocols like PXE. Modern systems expand this to solid-state drives (SSDs), USB flash drives, and high-speed NVMe SSDs connected via PCIe interfaces, reflecting advancements in technology and portability. The hierarchy of these devices is configurable in the settings, typically prioritizing for or purposes before fixed internal . The sequence in personal computers follows a structured progression from initialization to operating system loading. Upon power-on, the 's activates and performs a (POST) to verify basic functionality. then enumerates connected s, scanning for bootable media according to the predefined priority order, such as USB devices first, followed by optical drives, internal HDDs/SSDs, and finally network options. Once a is selected, the reads the —either the (MBR) or equivalent—from the device's initial sector, loads the boot loader into memory, executes it to initialize further drivers and configurations, and hands off control to the operating system kernel, completing the process. Boot priority determines the order in which devices are attempted during startup, with fallback mechanisms ensuring continuity if the primary device fails. For instance, if the first-priority device (e.g., a USB drive) lacks valid boot code, the proceeds to the next in sequence, such as an internal SSD, preventing complete failure. Users can override the default priority temporarily by pressing a designated key—commonly F12, F10, or during —to access a one-time , allowing manual selection of a device like a recovery USB without altering permanent settings. This mechanism supports flexible , such as booting from external media for OS repairs. Partition tables play a crucial role in locating boot code on storage devices. The Master Boot Record (MBR) scheme, used in legacy BIOS environments, embeds a 512-byte boot sector at the disk's beginning, containing executable boot code alongside a partition table limited to four primary partitions and support for drives up to 2 TB. In contrast, the (GPT), standard for UEFI systems, stores the partition table across multiple sectors for redundancy and places boot code in a dedicated (ESP), enabling support for larger drives exceeding 2 TB and up to 128 partitions without size limitations. reads the appropriate table to identify and access the active boot partition during device enumeration. Error handling addresses scenarios where no valid boot device is detected, often manifesting as messages like "No bootable device" or "An operating system wasn't found." Common causes include disconnected or faulty storage hardware, incorrect boot priority settings, or corrupted boot sectors on the target device. Resolution typically involves verifying physical connections, entering firmware settings to readjust the boot order or enable legacy/UEFI modes, or booting from external recovery media to repair the master boot record using tools like those in Windows installation environments. If hardware failure is suspected, diagnostic tests via firmware utilities or replacement of the drive may be necessary to restore bootability.

BIOS Implementation

The BIOS, or Basic Input/Output System, is a 16-bit embedded in the (ROM) of the in IBM-compatible personal computers, providing low-level hardware initialization and interfacing services as defined in the IBM PC standard established in 1981. This executes upon power-on, performing essential setup tasks before transferring control to the operating system loader. The boot process begins with the (POST), a diagnostic routine that verifies the integrity of critical hardware components such as the CPU, memory, and basic peripherals. Upon successful completion of POST, the invokes interrupt 19h (INT 19h), its primary boot handler, which scans boot devices in a predefined sequence—typically starting with floppy drives, then hard disks, optical drives, and network interfaces if supported. For a hard disk boot, INT 19h uses the disk services to read the (MBR) from the first sector (sector 0, cylinder 0, head 0) of the device, loading its 446-byte bootstrap code into memory at 0x7C00, followed by execution of that code after setting up the segment registers and stack. The MBR code then typically loads the volume boot record from the active partition to continue the chainloading process. BIOS operates exclusively in 16-bit , imposing significant limitations on modern hardware support, including a maximum addressable disk size of 2 terabytes due to the 32-bit (LBA) in its extensions and the 512-byte sector assumption in the MBR partitioning scheme. It lacks native support for (GPT) structures, which exceed these constraints, requiring legacy BIOS systems to rely on compatibility modes or hybrid MBR setups for larger drives. To accommodate add-on hardware, BIOS supports Option ROMs—firmware modules stored on expansion cards (e.g., controllers or network adapters) that extend the core services by scanning for and executing their initialization code during in the memory range 0xC0000 to 0xF0000. The (PnP) extension, introduced in 1993, further enhances this by providing standardized interfaces for dynamic resource allocation to these ROMs and peripherals, reducing manual configuration needs through INT 0xF0 calls for enumeration and setup. Due to these architectural constraints, legacy BIOS has been progressively deprecated in favor of the Unified Extensible Firmware Interface (UEFI) in systems introduced after , which offers 64-bit addressing, modular drivers, and broader hardware compatibility.

UEFI Implementation

The Unified Extensible Firmware Interface () represents a modern firmware architecture for personal computers, succeeding the legacy by offering a modular, extensible between the operating system and platform hardware. Initially developed by as the Extensible Firmware Interface (EFI) starting in the late 1990s for the processor family, the specification reached version 1.10 before transferred stewardship to the UEFI Forum in , an industry consortium including , , Apple, and others to promote cross-platform adoption. operates primarily in a 64-bit mode, supports larger address spaces than the 16-bit , and includes an interactive shell environment for diagnostics and scripting during boot, enabling more sophisticated pre-OS operations. The boot process unfolds in phases, with the Driver Execution Environment (DXE) phase being central to implementation on PCs, where firmware drivers initialize the , , , and peripherals while establishing software abstractions for services. Following hardware readiness, the Boot Manager—a firmware policy engine—enumerates boot options stored in NVRAM variables and presents a to the , then loads EFI applications (typically bootloaders) as executable .efi files from the (), a dedicated FAT32-formatted marked with the GUID C12A7328-F81F-11D2-BA4B-00A0C93EC93B. This modular approach allows drivers and applications to be loaded dynamically, contrasting the rigid, monolithic structure of . The process culminates in the operating system loader invoking ExitBootServices(), which notifies the to cease boot-time and transition control, committing allocations and preserving only runtime services. UEFI incorporates key features enhancing PC booting flexibility, including native support for the (GPT) to handle disks beyond the 2.2 TB limit of the (MBR) scheme used in systems, enabling partitioning for modern storage capacities. It integrates Secure Boot as a mechanism using cryptographic signatures to ensure only trusted boot components execute, though detailed protocols are defined separately. is enabled through EFI protocols like the Simple Network Protocol (SNP) and PXE Base Code Protocol, allowing remote image loading over TCP/IP without local media. UEFI distinguishes boot-time APIs—such as memory allocation, event handling, and device path protocols available only until ExitBootServices()—from runtime APIs, which persist post-boot for tasks like variable storage, time synchronization, and ACPI table access, ensuring ongoing firmware-OS interaction. For backward compatibility with legacy BIOS-based operating systems and bootloaders, many UEFI implementations include the Compatibility Support Module (CSM), an optional component that emulates a 16-bit environment during boot, intercepting disk calls and legacy option ROMs to facilitate operation. This module can be enabled or disabled in settings, allowing seamless transition for systems requiring pre- support while prioritizing native mode for optimal performance and .

Booting in Specialized Systems

System-on-Chips and Embedded Devices

System-on-chips (SoCs) integrate processors, memory controllers, and peripherals into a single chip, commonly used in embedded systems such as smartphones, IoT devices, and single-board computers like the Raspberry Pi, which employs an ARM-based Broadcom SoC. The booting process in these SoCs typically begins with an on-chip BootROM that executes immutable code upon power-up, initializing basic hardware and loading subsequent stages from external non-volatile memory like eMMC or NAND flash. This initial stage configures the memory controller and clock systems before handing off to a first-stage bootloader (BL1), often stored in secure on-chip ROM to prevent tampering. In ARM-based SoCs, such as those from Qualcomm Snapdragon series, the BootROM verifies and loads the primary boot loader (PBL), which handles further authentication and initialization of the system bus and security features. Secure booting is a critical aspect in SoCs, particularly those supporting TrustZone, which partitions the system into secure and non-secure worlds to protect sensitive operations. starts in the secure world with BL1 authenticating BL2 (second-stage loader) using cryptographic signatures, ensuring only trusted executes; this chain extends to loading the trusted OS or before transitioning to the normal world for the main OS. Hardware accelerators, such as GPUs and neural processing units in Snapdragon SoCs, are initialized during these early stages to enable efficient multimedia and AI tasks post-boot. Constraints in SoCs include stringent , where boot code must minimize energy draw during initialization to comply with battery-limited designs, and real-time requirements that demand low-latency handoffs without intervention. In resource-constrained devices, booting often involves either bare-metal initialization or a (RTOS) like , where the directly sets up peripherals, controllers, and timers without an underlying OS . For instance, sensors may boot via serial loaders or interfaces for initial programming, followed by autonomous execution from , prioritizing minimal footprint and deterministic timing. Automotive electronic control units (ECUs) exemplify this, using to verify and update over , ensuring rapid startup to meet safety standards like , with no provision for manual recovery. In devices powered by SoCs, allows developers to modify the boot chain for custom ROMs, but this disables verified boot, potentially compromising security features like dm-verity. Multi-stage loaders, adapted for these environments, facilitate modular updates while maintaining integrity through hash chains.

Microcontrollers and FPGAs

Microcontrollers, such as those in the AVR and ARM-based families, typically initiate booting from internal flash memory upon power-on reset or external reset signals. The process begins with the hardware automatically fetching the initial instruction from a predefined address in the flash, often the reset vector, which points to either a built-in bootloader or the start of the user application code. In AVR microcontrollers, fuse bits—non-volatile configuration registers—allow selection of the boot loader section size and enable or disable the bootloader, determining whether the device jumps directly to the application code or enters a bootloader mode for in-system programming (ISP) updates via protocols like UART or SPI. For ARM Cortex-M based microcontrollers like the STM32 series, the boot process involves remapping the vector table, a data structure containing interrupt vectors and the initial stack pointer, from the default flash start address to support flexible code placement and optional bootloader execution for firmware updates over USB or other interfaces. This boot sequence in microcontrollers is designed for , often resulting in a direct jump to the application code without an operating system, enabling bare-metal execution where the handles all interactions. Optional bootloaders facilitate over-the-air or updates but can be bypassed for faster startup in production environments. Tools like OpenOCD provide debugging support by interfacing with or SWD ports to halt execution at the boot entry point, inspect memory, and program during development. In contrast, field-programmable gate arrays (FPGAs) undergo a phase that defines their hardware logic before any software booting occurs, distinguishing them from microcontrollers' fixed approach. Booting in FPGAs involves loading a —a serialized —into the device's configuration memory via interfaces such as , , or serial s. For (now ) FPGAs, like those in the Artix or Spartan series, the configuration typically starts from an external flash or upon power-up, where the FPGA's startup circuitry reads the to instantiate logic cells, interconnects, and I/O blocks, followed by optional partial reconfiguration to update specific regions without full reload. This hardware definition phase precedes any or soft-boot within the FPGA fabric, if present, emphasizing FPGAs' role in customizable, reconfigurable systems rather than static code execution. The key differences lie in their boot paradigms: microcontrollers focus on loading and executing fixed firmware directly from integrated memory for efficient, low-power operation in embedded applications, while FPGAs prioritize hardware synthesis through bitstream configuration, enabling dynamic logic adaptation but requiring more initialization time. Both often operate in OS-less environments, but FPGAs may integrate microcontroller cores (e.g., MicroBlaze) that then follow a secondary software boot similar to embedded loaders.

Security Considerations

Protective Measures

Protective measures in the boot process are designed to establish and maintain a , preventing unauthorized modifications to , bootloaders, and operating systems that could introduce or vulnerabilities. These techniques leverage roots of trust, cryptographic verification, and secure storage to ensure only authenticated components execute during boot, thereby mitigating risks such as rootkits or attacks. By integrating protections at the and levels, systems can detect tampering early and halt execution if integrity is compromised. However, vulnerabilities such as CVE-2024-7344 (discovered in January 2025), which allows unsigned code execution in Secure Boot systems, and CVE-2025-3052 (June 2025), enabling bootkit by bypassing signature checks, highlight ongoing challenges; these have prompted updates to revocation databases like dbx and patches from vendors including and . Secure Boot implements a cryptographic starting from immutable (ROM) and extending to the operating system loader. In UEFI Secure Boot, the platform verifies digital signatures of boot components using a of keys: the Platform Key (PK) as the root, which authenticates Key Exchange Keys (KEKs); KEKs in turn validate signatures in the allowed database (db); and the forbidden signatures database (dbx) revokes compromised or outdated components. This process ensures that only signed and trusted executables, such as bootloaders and drivers, are loaded, blocking unsigned or malicious code from executing. For example, Windows requires Secure Boot for certain features, enforcing signature checks on the and . Measured Boot complements verification by creating a verifiable record of the boot process for remote attestation, using hardware modules like the Trusted Platform Module (TPM) to log measurements (hashes) of boot components into protected registers. These measurements capture the state of firmware, bootloaders, and the OS kernel, allowing a remote verifier to confirm that the system booted with approved software. Intel Trusted Execution Technology (TXT) employs a Dynamic Root of Trust for Measurement (DRTM) via the GETSEC[SENTER] instruction, which clears dynamic state and measures the environment before launching into a trusted mode, storing values in the TPM's Platform Configuration Registers (PCRs). Similarly, AMD's Secure Virtual Machine (SVM) uses the SKINIT instruction to initialize a late-launch environment, extending measurements to the TPM for attestation of the measured launch environment, including the secure kernel loader. Boot Guard provides a hardware-enforced root of specifically for , integrated into and chipsets to protect against attacks on the initial block (). It establishes a Static Root of for (RTV) using fused keys in the , which cryptographically authenticate the image before execution passes to the CPU. This prevents modification of the or Option ROMs, ensuring the chain of begins immutably at the silicon level; for instance, in 12th-generation , Boot Guard verifies the integrity of the partition during the pre-boot phase. Encryption of boot partitions and full disks safeguards during the boot sequence, requiring authentication before decryption to prevent offline attacks. Microsoft's employs full-volume encryption with algorithms, protecting the system partition and requiring pre-boot authentication via TPM or user PIN to unlock the Volume Master Key (VMK), which derives the Full Volume Encryption Key (FVEK). On systems, (Linux Unified Key Setup) formats encrypted block devices, prompting for a in the initramfs during boot to decrypt the master key and access the root filesystem, often combined with TPM for automated unsealing if values match expected boot measurements. Anti-rollback mechanisms prevent downgrade attacks by enforcing monotonic increases for components, ensuring that once a update is applied, older vulnerable cannot be reinstalled. In Secure Boot implementations, this is achieved through versioned signatures and the dbx database, which permanently revokes signatures of deprecated or drivers, blocking their execution even if physically present. Hardware support, such as eFuses or monotonic counters in TPMs, stores the minimum acceptable , halting if a is detected; for example, in Trusted Firmware-M, anti-rollback checks the against OTP (one-time programmable) to prohibit execution of pre-patch images.

Bootloop Detection and Recovery

A bootloop occurs when a computing device repeatedly fails to complete the process, resulting in the hanging or restarting indefinitely without user intervention, often due to corrupted , faulty software updates, or issues. This condition can trap the device in a cycle where the or initialization repeatedly errors out, preventing normal operation. Detection of bootloops typically involves and mechanisms designed to monitor progress and identify failures. timers, which are circuits that the if not periodically serviced by software, play a key role by triggering a after a timeout during the sequence if the process stalls. In UEFI-based systems, or may use NVRAM variables to track attempts and detect repeated failures, depending on the . health checks, such as integrity verifications during the stages, further aid detection by logging anomalies like mismatches in images. Once a is detected, mechanisms aim to restore functionality without requiring advanced expertise. Common strategies include entering a that loads minimal drivers and services to diagnose issues, or initiating a through hardware key combinations like holding power and volume buttons on devices. to a last known good state is another approach, where or the operating system reverts to a previously verified stored in secure partitions. Policies for handling bootloops often incorporate thresholds to balance automatic with user intervention, such as delays between retry attempts to prevent excessive power drain or wear. In systems, verified boot with dm-verity enforces these policies by marking boot attempts as successful or failed, triggering modes after repeated failures, depending on configuration, to avoid infinite loops from tampered updates. Examples of bootloop abound across platforms. Apple's iOS uses mode, accessible via specific button sequences on iDevices, to restore over USB from a connected computer if bootloops arise from errors. Microsoft's Windows Automatic Repair feature, part of the Windows Environment, automatically scans for boot issues after detecting repeated failures and attempts repairs like restoring system files or resetting configurations. In embedded systems, resets provide a simple by forcing a hardware , often combined with that clears volatile error states to break the loop. Secure Boot failures can occasionally trigger such detection as an for these processes.

References

  1. [1]
  2. [2]
    Booting a Computer: Definition & Process - Lesson - Study.com
    Jan 14, 2024 · Booting a computer refers to the process of powering on the computer and starting the operating system. The operating system is the program that ...What Is Booting a Computer? · Boot Process · Troubleshooting<|control11|><|separator|>
  3. [3]
    What is a Boot Sequence? - GeeksforGeeks
    Jul 23, 2025 · A boot sequence, also known as boot process or booting, refers to the sequence of steps that a computer system goes through when it is powered on or restarted.
  4. [4]
    [PDF] Boot
    ✓Booting the system is done by loading the kernel into main memory, and starting its execution. ✓The CPU is given a reset event, and the instruction register ...
  5. [5]
    Operating Systems
    The process of loading the operating system into memory is called bootstrapping, or booting the system. The word booting is used because, figuratively speaking, ...Missing: definition | Show results with:definition
  6. [6]
    [PDF] Unit 2
    Cold Boot vs. Warm Boot. Page 39. 39. Cold Boot. RESET. POWER. OR. Page 40. 40. During Cold Boot: • All circuits are reset. • The computer performs the. Power ...
  7. [7]
    Princeton COS 318 : Course description - cs.princeton.edu
    ... cold boot or warm boot. Cold boot means you power down and power up the machine by pressing the power button of a PC. Warm boot means that you press <ctrl> ...
  8. [8]
    Introduction to Key Usage in Integrated Firmware Images - Intel
    Oct 11, 2023 · The CPU processes the FIT before executing the first BIOS instruction located at the reset vector (address 0FFFFFFF0h). If a microcode ...
  9. [9]
    [PDF] ECE 531 – Advanced Operating Systems Lecture 4
    Sep 10, 2025 · Often in ROM/EEPROM/FLASH • Boot firmware initializes system. Init RAM? Set it up (often over i2c), clear out random or old contents (if a soft ...
  10. [10]
    [PDF] Boot Loader Choices for Small and Fast System Initialization ... - Intel
    This article provides an overview of the Intel architecture system initialization solutions, which include custom boot loaders and Basic Input/Output System ( ...
  11. [11]
  12. [12]
    What Is a Boot Device? - Computer Hope
    Jul 9, 2025 · A boot device is any piece of hardware containing the files required for a computer to start. For example, a hard drive, floppy disk drive, CD-ROM (compact ...Creating a bootable disc or drive · No boot devices available
  13. [13]
    What is a Boot Loader (Boot Manager)? - TechTarget
    Jul 9, 2024 · A boot loader (boot manager) is a small program that places the operating system (OS) of a computer into memory.
  14. [14]
    Lab 1: Boot loader - Texas Computer Science
    Its job is to load the operating system in memory and start it executing. The code you will write in this lab will be used for the remainder of the semester.
  15. [15]
    [PDF] What is an operating system?
    The operating system kernel assumes control of the computer at boot time and remains in command as the system runs. The kernel periodically relinquishes control ...
  16. [16]
    2.3. Kernel Mechanics — Computer Systems Fundamentals
    The kernel is a program that runs with full access privileges to the entire computer. The kernel controls access to all shared system resources.Missing: definition | Show results with:definition
  17. [17]
    [PDF] From last lecture Today's topics Today s topics Terminology
    Jump to “reset vector” address ... Interrupt & reset. PROCESSOR. CORE. RESET. INTERRUPT ... ▫ Interrupt mechanism allows efficient use of CPU cycles by.
  18. [18]
    A Logical Coding System Applied to the ENIAC
    The procedure for instructing the ENIAC in its routine, then, consists, in local programming, of setting program switches on the units so that, when stimulated ...Missing: initialization | Show results with:initialization
  19. [19]
    Univac I Computer System, Part 1
    It contains technical information of how UNIVAC I really worked. This includes the mercury delay line main-memory and the computational and control circuits.
  20. [20]
    [PDF] Systems Reference Library IBM System/360 System Summary
    This publication provides basic information about the IBM System/360; its objective is to help readers achieve a general understanding of this.
  21. [21]
    [PDF] PDP-8 Family Paper Tape System User's Guide
    The first section explains the use of switches and indicators on the computer, Teletype, high-speed paper tape reader/punch, and DECtape transport consoles, and ...
  22. [22]
    Bootstrapping The Old Fashioned Way - Hackaday
    Sep 9, 2022 · You had to toggle in the bootstrap loader, so the program of interest could be loaded from paper tape. Most commonly for us that was FOCAL – an ...
  23. [23]
    [PDF] PDP-11/34 system user's manual - Your.Org
    The ROM in the M9301 contains diagnostic routines for verifying computer operation, several boot- strap loader programs for starting up the system, and the ...
  24. [24]
  25. [25]
    [PDF] Apple II 00-S Use~ Manual ------- ---
    The Monitor program reads DOS into memory and then lets DOS control communication. The Startup Process. When you turn on your Apple computer, several electrical ...
  26. [26]
    3.4: Reading- Booting - Workforce LibreTexts
    Nov 13, 2021 · Also, a boot ROM is often able to load a boot loader or diagnostic program via serial interfaces like UART, SPI, USB and so on. This feature ...
  27. [27]
    From Power Up To Bash Prompt: Lilo
    When the computer loads a boot sector on a normal Linux system, what it loads is actually a part of lilo, called the ``first stage boot loader''. This is a tiny ...
  28. [28]
    lilo(8): install boot loader - Linux man page
    When the second stage loader has received control from the first stage, it prints the letter "L", and when it has initialized itself, including verifying the " ...
  29. [29]
    GNU GRUB Manual 0.97
    Briefly, a boot loader is the first software program that runs when a computer starts. It is responsible for loading and transferring control to an operating ...
  30. [30]
    troubleshoot "NTLDR Is Missing" error - Windows - Microsoft Learn
    Jan 15, 2025 · This step-by-step article describes methods that you can use to troubleshoot the "NTLDR Is Missing" error message that you may receive when you try to start ...Missing: XP | Show results with:XP
  31. [31]
    Booting from TPL/SPL — Das U-Boot unknown version documentation
    TPL (Tertiary Program Loader) loads SPL (Secondary Program Loader) which sets up SDRAM and loads U-Boot. TPL is very early init. SPL loads U-Boot proper.
  32. [32]
    3.1. U-Boot — Processor SDK Linux Documentation
    The SPL is the first stage of U-Boot, and must be loaded from one of the boot sources into internal RAM. The SPL has very limited configuration or user ...
  33. [33]
    U-Boot overview - stm32mpu - ST wiki
    Das U-Boot ("the Universal Boot Loader" or U-Boot) is an open-source bootloader that can be used on STMicroelectronics boards to initialize the platform and ...U-Boot overview · U-Boot configuration · U-Boot command line interface...
  34. [34]
    coreboot
    coreboot is an extended firmware platform that delivers a lightning fast and secure boot experience on modern computers and embedded systems.Coreboot Releases · Coreboot · The coreboot documentation · For End UsersMissing: payload | Show results with:payload
  35. [35]
    What is TianoCore?
    EDK II is a modern, feature-rich, cross-platform firmware development environment for the UEFI and UEFI Platform Initialization (PI) specifications. We hope ...Getting Started · Latest News · Documentation · How to ContributeMissing: process | Show results with:process
  36. [36]
    Bootloaders in embedded system: Architecture and Features
    While single-stage bootloaders are straightforward and suitable for simple systems, multi-stage bootloaders provide enhanced flexibility, security, and ...Bootloader With Dfu · Bootloader Features · Popular Bootloaders In...
  37. [37]
    2. Overview — UEFI Specification 2.10 documentation
    The PC-AT-class systems today are restricted to boot from the first floppy, hard drive, CD-ROM, USB keys, or network card attached to the system.
  38. [38]
    [Motherboard] How to set the boot device priorities on the motherboard
    May 9, 2024 · Through the BIOS setting function, we can adjust the priority of boot devices, including M.2 SSD, SATA SSD, USB and other storage devices.
  39. [39]
    correct or recommended boot order. - Microsoft Q&A
    Dec 10, 2023 · OS Boot Manager · Internal CD/DVD ROM drive · USB flash drive /USB hard drive · USB CD/DVD ROM drive · Network adapter.
  40. [40]
    [PDF] BIOS Boot Specification - Stanford Secure Computer Systems Group
    Jan 11, 1996 · This boot order is similar to the common feature of boot A: then C: or vice versa, but supports additional IPL devices.
  41. [41]
    The BIOS/MBR Boot Process - NeoSmart Technologies
    Overview of the BIOS/MBR Boot Process. In the diagram below, the boot sequence for all standard computers and operating systems is shown: MBR Boot Sequence.
  42. [42]
    How to Change Between UEFI and Legacy Boot Options on Intel ...
    Power on system. Press F2 when prompted to enter BIOS menu. Navigate to Boot -> Boot Order. Select the desired mode: UEFI or Legacy (if available).
  43. [43]
    Hot keys for BootMenu / BIOS Settings - Active@ Disk Image
    You may get your Boot Menu How or your BIOS settings by using special keys. Below is a list of PC brands with their corresponding hot-keys.
  44. [44]
    Windows Setup: Installing using the MBR or GPT partition style
    Dec 15, 2021 · The GPT drive format lets you set up drives that are larger than 4 terabytes (TB), and lets you easily set up as many partitions as you need.
  45. [45]
    Windows and GPT FAQ - Microsoft Learn
    GPT provides a more flexible mechanism for partitioning disks than the older Master Boot Record (MBR) partitioning scheme that was common to PCs. A partition ...
  46. [46]
    Resolve No Bootable Device Found Error in Legacy Mode on Dell ...
    The No boot device Found error appears when the Boot sequence is set to Legacy mode or the operating system is installed under Legacy mode.
  47. [47]
    Surface turns on and shows "Couldn't find a bootable operating ...
    When you turn on your Surface, it displays the following message: Couldn't find a bootable operating System. Check the Boot Configuration to try to fix this.
  48. [48]
    [PDF] System BIOS for IBM® PCI)(TrMIAT® Computers and Compatibles
    Page 1. Page 2. Technical Reference Series. System BIOS for. IBM® PCI)(TrMIAT ... INT 1Oh Video Service Data Definitions ...
  49. [49]
    [PDF] in IBM's PS/2 and PC BIOS Interface Technical Reference
    This technical reference provides Basic Input/Output System (BIOS) and Advanced BIOS (ABIOS) interface information. It is intended for developers who provide ...
  50. [50]
    Programmer's Technical Reference for MSDOS and the IBM PC
    If no floppy drive or option ROM is found, the BIOS calls int 19h (ROM BASIC if it is an IBM) or displays an error message. If a bootable disk is found, the ...
  51. [51]
    Understanding MBR/BIOS and GPT/UEFI | Macrium Software
    Jan 19, 2022 · The 2TB limit is due to the MBR having 32-bits to address sectors on the storage media, with a standard sector size of 512 bytes, the maximum ...
  52. [52]
    Support for Disk Drives Beyond 2.2 TeraBytes (TB) and 4K ...
    Windows systems with Legacy BIOS and MBR boot drives are limited to 2.2TB partitions; Windows XP does not support GPT; Windows XP sees a 3TB drive as 800GB on ...
  53. [53]
    [PDF] Boot Mode Considerations: BIOS vs UEFI - Dell
    This paper helps system administrators understand the implications of each boot mode. First, the paper explains the limitations of the traditional BIOS that ...
  54. [54]
    [PDF] BIOS Boot Specification - Stanford Secure Computer Systems Group
    Jan 11, 1996 · If a Legacy IPL device traps INT 19h it takes control of the boot process. This is acceptable because it is consistent with what. Legacy systems ...
  55. [55]
    [PDF] Plug and Play BIOS Specification v1.0a - OSDever.net
    May 5, 1994 · This new interface will help couple the system BIOS closely with the Plug and Play option ROM to assist the system BIOS in completing the POST ...
  56. [56]
    Unified Extensible Firmware Interface - Intel
    Sep 6, 2019 · Modules cover the boot phases of UEFI and Platform Initialization (PI) from power-on to booting an OS, with the objective of aiding ...
  57. [57]
    Specifications | Unified Extensible Firmware Interface Forum
    Access to the UEFI Specifications. The UEFI Specifications identified below are available for downloading and to read only.
  58. [58]
    2.1. Driver Execution Environment (DXE) Phase - UEFI Forum
    The DXE phase and Boot Device Selection (BDS) phases work together to establish consoles and attempt the booting of operating systems. The DXE phase is ...Missing: sequence | Show results with:sequence
  59. [59]
    3. Boot Manager — UEFI Specification 2.10 documentation
    The UEFI boot manager is a firmware policy engine that can be configured by modifying architecturally defined global NVRAM variables.
  60. [60]
    UEFI firmware requirements
    ### Summary of Boot Devices, Priority, and Sequence in Windows PCs
  61. [61]
    7. Services — Boot Services — UEFI Specification 2.9A documentation
    In principle, the ExitBootServices() call is intended for use by the operating system to indicate that its loader is ready to assume control of the platform ...
  62. [62]
    Runtime Services — UEFI Specification 2.10 documentation
    In principle, the ExitBootServices() call is intended for use by the operating system to indicate that its loader is ready to assume control of the platform and ...
  63. [63]
    UEFI requirements for Windows editions on SoC platforms
    Mar 23, 2023 · This article describes UEFI requirements that apply to Windows 10 for desktop editions (Home, Pro, Enterprise, and Education).
  64. [64]
    How does ARM boot? - FEDEVEL
    Step 1: Internal bootloader. Based on bootstrap resistors (or/and eFuses) an internal bootloader (stored in CPU ROM) determines what peripheral will be used ...<|control11|><|separator|>
  65. [65]
    Analysis of Qualcomm Secure Boot Chains - Quarkslab's blog
    Oct 24, 2019 · Qualcomm's secure boot chain includes bootROM (PBL), SBL (XBL), Secure Monitor (QTEE), and aboot (ABL), where each stage loads, authenticates, ...
  66. [66]
    Secure boot - Arm Developer
    This document provides an overview of the ARM TrustZone technology and how this can provide a practical level of security through careful System-on-a-Chip ...
  67. [67]
    Booting a secure system - Arm Developer
    This document provides an overview of the ARM TrustZone technology and how this can provide a practical level of security through careful System-on-a-Chip ...
  68. [68]
    Boot Sequence for an ARM based embedded system - DM
    Jan 16, 2012 · This post is going to explore the boot sequence for a Boot ROM based embedded system. It is based on my experiences with an ARM processor based embedded system.Missing: Chip | Show results with:Chip
  69. [69]
    Development on Bare Metal vs. RTOS - SYSGO
    Apr 5, 2022 · In contrast to bare-metal programming, RTOS-based embedded systems ... An RTOS will usually require seconds for the boot process.
  70. [70]
    Understanding What is Flash Bootloader | ECU Reprogramming
    May 27, 2019 · A flash bootloader is a software algorithm executed during system boot-up, that facilitates ECU software updates and automates flash ...
  71. [71]
    Lock and unlock the bootloader | Android Open Source Project
    Oct 9, 2025 · To unlock the bootloader and enable partitions to be reflashed, run the fastboot flashing unlock command on the device.