User:דוד כהן ג'וניור/sandbox

The initial loading is a multi-stage process, part of the computer's booting process from the moment the power is turned on until the operating system starts. The boot sequence is the series of actions that the computer must perform to start the operating system (more precisely, the bootloader), regardless of the type of OS installed.

Initial loading
Most computer systems can execute only commands that are in the computer's RAM while modern operating systems are typically stored on hard drives, bootable CD-ROMs, USB drives, or in a local network.

When the computer is turned on, its RAM does not contain an operating system. Without an operating system, the computer's hardware cannot perform complex tasks such as loading a program into memory. Thus, we face a paradox that seems insoluble: to load the operating system into memory, we must already have an operating system in memory.

The solution to this paradox is the use of a special computer program called a bootloader (in IBM PC-compatible computers, this is part of the BIOS — Basic Input/Output System). This program does not have all the functionality of an operating system but is sufficient to load another program that will then load the operating system. Often, a multi-stage boot process is used, where several small programs call each other until one of them loads the operating system.

In modern computers, the initial loading process begins with the processor executing commands located in non-volatile memory (for example, on an IBM PC, this would be the BIOS commands), starting from a predefined address (the processor does this after a reboot without any assistance). This software can detect devices suitable for booting and load the OS loader from a special partition of the selected device (most often from the boot sector of that device).

Boot loaders must adhere to specific constraints, particularly regarding size. For example, on an IBM PC, the first-stage boot loader must fit within the first 446 bytes of the master boot record, leaving space for a 64-byte partition and 2 bytes for the 55AAh signature, which is necessary for the BIOS to recognize the boot loader itself.

BIOS initialized devices
A boot device is a device that needs to be initialized before the operating system loads. These include input devices (keyboard, mouse), a basic output device (graphics card and display), and the device from which the OS will be booted—such as a disk drive, hard drive, CD-ROM, flash drive, SCSI device or network card (for network booting, e.g. using PXE).

Other types of boot sequences
Some processors have different boot modes. For example, most digital signal processors can boot in the following modes:


 * Boot via a serial port
 * Boot via a parallel port
 * Boot using HPI (Host-Port Interface)
 * Boot after a "warm" restart (which differs from the sequence performed during initial power-on)