When you turn on a computer, it goes through a "boot" process, a term that comes from the word "bootstrap". This is what happens in the background, whether you are using a Windows system, a Mac computer, or a Linux system.
The equipment lights
When you press the power button, the computer powers its components: the motherboard, the processor, the hard drives, the SSDs, the graphics processors and all the rest of the computer.
The material that supplies the food is called "food". Inside a typical desktop PC, it looks like a box at the corner of the case (the yellow in the illustration above), and that's where you plug the AC power cord.
CPU loads UEFI or BIOS
Now that it has electricity, the processor boots and looks for a small program that is usually stored in a motherboard chip.
In the past, the PC was loading something called a BIOS (basic input / output system.) On modern PCs, the processor takes care UEFI (Unified Extensible Firmware Interface) firmware instead. This is a modern replacement for the old style BIOS. But to make this even more confusing, some PC manufacturers still call their software UEFI "BIOS".
UEFI or BIOS tests and initializes hardware
The BIOS or UEFI firmware loads the configuration settings from a special location on the motherboard; it was traditionally stored in memory by a computer. CMOS battery. If you change some low-level settings in your BIOS or UEFI settings screen, your custom settings are stored.
The CPU runs the UEFI or BIOS, which tests and initializes the hardware of your system, including the CPU itself. For example, if your computer does not have RAM memory, it will beep and show you an error by stopping the boot process. This process is called the Power On Self Test (POST) process.
The PC manufacturer's logo may appear on your screen during this process and you can often press a button to access your BIOS or UEFI setup screen. However, many modern PCs are following this process so quickly that they do not bother to post a logo and need to access their UEFI configuration screen from the Windows Startup Options menu.
UEFI can do much more than just initialize hardware; it's really a tiny operating system. For example, Intel processors have the Intel Management Engine. This provides a variety of features, including powering Intel's active management technology, which enables remote management of enterprise PCs.
The UEFI or the BIOS goes to the boot device
After the hardware tests and initialization complete, the UEFI or BIOS will boot your PC into your operating system's boot loader.
The UEFI or the BIOS is looking for a "boot device"To start your operating system. This is usually the hard drive of your computer or SSD, but it can also be a CD, DVD, USB drive or network location. The boot device is configurable from the UEFI or BIOS setup screen. If you have multiple boot devices, the UEFI or BIOS attempts to transfer the boot process to them in the specified order. So, for example, if you have a bootable DVD in your optical drive, the system may try to boot from it before doing so from your hard drive.
Traditionally, a BIOS examined 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 operating system, called "boot loader". The BIOS runs the boot loader, which takes it from there and starts to boot the actual operating system, such as Windows or Linux.
Computers with UEFI can still use this old MBR boot method to boot an operating system, but they normally use an executable called EFI. These should not be stored at the beginning of a disc. Instead, they are stored on something called aEFI system partition. "
In both cases, the principle is the same: the BIOS or UEFI examines a storage device on your system to look for a small program, in the MBR or on an EFI system partition, and runs it. If there is no boot device, the boot process fails and you receive an error message.
On modern PCs, the UEFI firmware is usually configured for "Secure start. "This ensures that the operating system it started has not been tampered with and does not load low-level malware. If Secure Boot is enabled, the UEFI checks to see if the boot loader is properly signed before starting it.
The boot loader loads the complete operating system
The bootloader is a small program that has the important task of starting the rest of the operating system. Windows uses a boot loader named Windows Boot Manager (Bootmgr.exe). Most Linux systems use WORM, and Macs use something called boot.efi.
In case of problems with the boot loader, for example, if its files are corrupted on the disk, you will see appear an error message from the boot loaderand the startup process will stop.
The boot loader is just a small program and does not handle the boot process alone. On Windows, the Windows Startup Manager searches and starts the Windows operating system loader. The operating system loader loads the essential hardware drivers needed to run the kernel (the main part of the Windows operating system), and then launches the kernel. The kernel then loads the system Recording in memory and also loads all additional hardware drivers marked "BOOT_START", which means that they must be loaded at startup. The Windows kernel then launches the session manager process (Smss.exe), which starts the system session and loads additional drivers. This process continues and Windows loads the background services as well as the welcome screen that allows you to connect.
On Linux, the GRUB bootloader loads the Linux kernel. The kernel also starts the init system. systemd on most modern Linux distributions. The init system manages startup services and other user processes leading to a login prompt.
This involved process is just a way to load everything properly by acting in the right order.
By the way, so-called "startup programs"Actually loads when you log in to your user account, not when the system starts. But some background services (under Windows) or demons (on Linux and macOS) are started in the background when you start your system.
The shutdown process is also very involved. here is exactly what happens when you shut down or log out of a Windows PC.