When you turn on your computer, it goes through a «boot» process, a term that comes from the word «boot». Here’s what happens in the background — whether you’re using a Windows PC, Mac, or Linux system.

Hardware features included

When you press the power button, the computer supplies power to its components—motherboard, processor, hard drives, SSDs, GPUs, and everything else on the computer.

The hardware that provides power is called the «power supply». Inside a typical desktop PC, it looks like a box in the corner of the case (the yellow thing in the picture above), and that’s where you plug in the AC. power cable.

Processor boots UEFI or BIOS

Now that it has electricity, the processor initializes itself and looks for a small program that is usually stored on a chip on the motherboard.

In the past, the PC loaded what is called the BIOS (Basic Input/Output System). On modern PCs, the CPU loads the UEFI (Unified Extensible Firmware Interface) firmware. This is a modern replacement for the old style BIOS. But to make it even more confusing, some PC manufacturers call their UEFI software «BIOS» anyway.

CONNECTED: What is UEFI and how is it different from BIOS?

UEFI or BIOS test and initialize hardware

The BIOS or UEFI firmware loads the configuration settings from a dedicated location on the motherboard — traditionally this was in memory, backed by a CMOS battery. If you change some low level settings in the BIOS or UEFI settings screen, this is where your custom settings are stored.

The processor runs UEFI, or BIOS, which tests and initializes your system’s hardware, including the processor itself. For example, if your computer is out of RAM, it will beep and give an error message, stopping the boot process. This is called the POST (Power On Self Test) process.

During this process, the PC manufacturer’s logo may appear on your screen, and you can often press a button to get to the BIOS or UEFI settings screen. However, many modern PCs go through this process so quickly that they are not bothered by the logo display and require access to the UEFI settings screen from the Windows Boot Options menu.

UEFI can do a lot more than just initialize hardware; it’s really a tiny operating system. For example, Intel processors have the Intel Management Engine. This provides many features, including the powerful Intel Active Management Technology, which enables business PCs to be managed remotely.

UEFI or BIOS automatically connects to the boot device

Once your hardware is tested and initialized, the UEFI or BIOS shifts the responsibility of booting your PC to the operating system loader.

UEFI or BIOS looks for a «boot device» to boot the operating system. This is usually your computer’s hard drive or solid state drive, but it can also be a CD, DVD, USB drive, or network share. The boot device is configured in the UEFI or BIOS setup screen. If you have multiple boot devices, UEFI or BIOS tries to pass the startup process to them in the order they are listed. So, for example, if you have a bootable DVD in your optical drive, the system might try to start there before trying to start from your hard drive.

Traditionally, the BIOS considered the MBR (Master Boot Record), a special boot sector at the beginning of a disk. The MBR contains the code that loads the rest of the operating system, known as the «bootloader». The BIOS starts the bootloader, which takes it from there and starts loading the operating system itself — for example, Windows or Linux.

UEFI computers can still use this old-style MBR boot method to boot the operating system, but they usually use something called an EFI executable instead. They should not be stored at the beginning of the disk. Instead, they are stored in what is known as the «EFI system partition».

Either way, the principle is the same: the BIOS or UEFI checks the storage device on your system to find a small program, either in the MBR or the EFI system partition, and runs it. If there is no bootable boot device, the boot process will fail and an error message will appear on the display.

On modern PCs, the UEFI firmware is usually configured for «secure boot». This ensures that the operating system it runs on has not been hacked and will not load low-level malware. If secure boot is enabled, UEFI checks if the bootloader is signed correctly before starting it.

Bootloader loads full OS

The bootloader is a small program whose task is to load the rest of the operating system. Windows uses a bootloader called Windows Boot Manager (Bootmgr.exe), most Linux systems use GRUB, and Macs use something called boot.efi.

If there is a problem with the bootloader — for example, if its files are corrupted on the disk — you will see a bootloader error message and the download process will stop.

The bootloader is just one small program that does not handle the boot process itself. On Windows, the Windows Boot Manager finds and starts the Windows OS bootloader. The OS loader loads the necessary hardware drivers needed to run the kernel—the main part of the Windows operating system—and then starts the kernel. The kernel then loads the system registry into memory and also loads any additional hardware drivers marked «BOOT_START», which means they should be loaded at boot. The Windows kernel then starts the session manager process (Smss.exe) which starts a system session and loads additional drivers. This process continues and Windows loads background services as well as a welcome screen that allows you to log in.

On Linux, the GRUB boot loader loads the Linux kernel. The kernel also runs an init system, which is systemd on most modern Linux distributions. The init system handles starting services and other user processes that lead to the login prompt.

This process involved is just a way to get everything to load correctly by doing things in the right order.

Incidentally, the so-called «program startups» are actually loaded when the user account is logged in, not when the system boots. But some background services (on Windows) or daemons (on Linux and macOS) run in the background when the system boots.

The shutdown process is also quite complicated. Here’s exactly what happens when you shut down or log out of your Windows PC.

Image Credit: Suwan Waenlor /Shutterstock.com, DR-images /Shutterstock.com,

Похожие записи