What does device boot mean?

Device booting refers to the process of starting up a computer device from being powered off. When a device boots, it goes through a sequence of steps to load the operating system and get the hardware initialized so that the device is ready for use.

What happens when a device boots?

The boot process involves several key steps that get a device from an unpowered state to becoming fully operational. Here is a high-level overview of what happens during booting:

  • Power on – The device is powered on, either by flipping the power switch or pushing the power button.
  • BIOS/UEFI initialization – The BIOS or UEFI firmware runs a Power On Self Test (POST) to check hardware components.
  • Boot device initialization – Storage devices needed for booting are initialized.
  • Boot loader – A boot loader like GRUB is loaded and run.
  • Kernel initialization – The core operating system (OS) kernel is loaded into memory.
  • OS initialization – The OS loads necessary drivers, services, and settings.
  • Login prompt – The user is presented with a login screen.

Now let’s look at these steps in more detail.

Power On

The first step in the boot process is powering on the device. On most computers, this involves pressing the power button, which initiates the boot up sequence. At the hardware level, this connects the power supply to the motherboard and other core system components, providing electricity to the hardware so it can run.

BIOS/UEFI Initialization

When the device first receives power, the BIOS or UEFI firmware initializes. This built-in software runs a POST (Power On Self Test) to make sure the basic hardware components like the CPU, RAM, motherboard, and storage are functioning properly at a low level before trying to load the operating system.

The system BIOS or UEFI checks for connected storage devices containing boot software, selects an appropriate device, and reads the very beginning of the boot code from that device. This is called the Master Boot Record (MBR) read. The BIOS or UEFI locates and reads the boot loader program from the MBR.

Boot Device Initialization

At this point in the boot process, the firmware needs to locate the boot device that contains the operating system files to be loaded. The boot device is usually a HDD, SSD, or other permanent storage that has an OS installed on it. The firmware initializes this storage device and the controller interface so that data can be read from it.

For example, on a computer booting from an SATA SSD, the SATA controller would be initialized during this step to allow communication with the SSD over the SATA interface bus.

Boot Loader

The next step in booting is to load and execute a boot loader program. This small software module is responsible for loading the main operating system kernel and transferring execution to it. Some common boot loaders are GRUB for Linux and NTLDR for older Windows systems.

The boot loader resides in the reserved boot sector area on the boot device. It provides a menu interface that lets the user select an OS kernel or recovery options. Once selected, the boot loader loads the compressed OS kernel into memory and transfers execution to it.

Kernel Initialization

After the boot loader, the operating system kernel takes over the boot process. The kernel is the core software that manages the OS. For Linux, common kernel options are Linux and GNU Mach. For Windows, the Windows NT kernel initializes.

The kernel initializes by setting up memory areas, initializing hardware drivers for attached devices like graphics and storage controllers, and loading any essential kernel components or services.

Operating System Initialization

After the kernel is up and running, the rest of the operating system loads. This includes several processes:

  • User services – Background services like printing and network services are started.
  • User preferences – User configuration settings are loaded.
  • User logon – The logon screen is displayed for a user to sign in.

This phase gets all the user-space aspects of the system configured and ready for applications and usage.

Login Prompt

The last step of the boot process on most OS configurations is to display a login prompt. This lets a user provide credentials to sign into their user account and start an interactive session.

Once a user logs in successfully, the OS finishes loading the user’s personal configurations, desktop environment, and startup programs. At this point the system is fully booted and ready for applications and usage.

Types of Booting

Now that we’ve looked at the general boot sequence, let’s examine some different types of booting situations.

Cold Boot

A cold boot refers to starting up a computer that is completely powered off. This follows the standard boot sequence as outlined above.

Warm Boot

A warm boot means restarting a computer that is already running. On most OSes, this can be initiated by choosing the “Restart” option. A warm boot typically skips hardware initialization steps since the hardware is already on, speeding up the process.

Soft Boot

This refers to rebooting just the operating system itself without resetting hardware. The hardware remains powered on during a soft boot. This process is faster than a cold or warm boot.

Hard Boot

A hard boot is when a system is forcefully rebooted by directly power cycling the hardware. This simulates a cold boot situation and does a full system restart.

Fast Boot

Some systems support a fast boot mode that reduces time spent during initialization to load the OS quickly. This may involve things like keeping firmware settings in memory, preloading parts of the OS, or optimizing boot applications.

Boot Sequence Steps

Now let’s look at some of the specific technical steps carried out during the boot process.

1. BIOS/UEFI POST

The POST (Power-On Self Test) performs an initial check of the hardware components. It verifies the operation of critical system devices like the RAM, CPU, motherboard, storage, and more. Issues detected during POST can prevent the boot process from proceeding until resolved.

2. Locating boot loader

The firmware locates the boot loader software stored in the boot sector of the boot drive. This is either referenced in a boot order list or set as the primary boot device.

3. Loading and executing the boot loader

The firmware loads the boot loader program into memory and passes execution to it. The boot loader takes over the boot process going forward.

4. Loading kernel into memory

The boot loader locates the kernel image on disk, decompresses it, and loads it into RAM. This includes the kernel code, data, and machine code instructions.

5. Jumping to kernel execution

The boot loader transfers control to the kernel by jumping to the kernel’s entry point function. This passes execution to the kernel.

6. Kernel initialization

The kernel sets up its core data structures like process scheduling queues and memory regions for its own code/data. It initializes any kernel services and core device drivers.

7. Hardware abstraction layer

The kernel initializes the hardware abstraction layer, which allows standardized control of underlying hardware resources like CPUs and memory.

8. Secondary processor initialization

On systems with multiple CPUs/cores, the boot processor signals the other processors to start initializing at this stage.

9. Loading kernel modules

The kernel loads additional modules from disk it needs, like filesystem drivers, networking stacks, etc. into memory.

10. User space initialization

The kernel prepares the user space environment where user programs will execute, outside the kernel privilege level.

11. User login

User space components like login services are initialized, allowing a user to sign in and interact with the system.

Boot Process Troubleshooting

Problems can arise during the boot process that prevent successful system startup. Here are some common boot issues and troubleshooting tips:

BIOS/UEFI access

If the system won’t POST or load firmware settings, it may be failing to access the BIOS/UEFI. Try resetting the CMOS memory by removing the onboard battery for a few minutes.

Boot device not found

An “operating system not found” error points to the firmware failing to locate the boot drive. Check that the drive is attached properly and set as the first boot device in BIOS settings.

Corrupted boot loader

If the boot loader is damaged and won’t load the OS, you may need to reinstall or repair it from a boot disc or drive. For example, running the automatic repair feature on a Windows recovery drive.

Kernel panic

A kernel panic indicates a serious OS kernel issue occurring early in the boot. This may require entering recovery mode and repairing damaged system files.

Frozen startup screen

If the system freezes during the boot animations/logo display, it could signal component faults. Check the RAM, motherboard, CPU, and drives to isolate the faulty piece.

How Booting Has Evolved

The boot process has changed over time alongside advances in computer hardware and operating systems:

  • BIOS to UEFI – The Unified Extensible Firmware Interface (UEFI) is modern replacement for legacy BIOS systems.
  • MBR to GPT – MBR partitioning has been superseded by the more advanced GUID Partition Table (GPT).
  • Faster boot times – Modern hardware and OS optimizations can boot in seconds rather than minutes.
  • Firmware graphical interfaces – UEFI and some BIOS versions now include graphical menus and settings.
  • Hybrid boot modes – Some devices use combination of firmware and software booting steps for speed.

Yet while the implementation details have evolved, the general flow of initialization steps remains similar to bring a system from off to fully operational.

Conclusion

In summary, booting is the pivotal process that breathes life into a computer device. It transitions the hardware components from an inactive state into a functioning system running an operating system. Understanding the stages of booting helps troubleshoot issues and optimize system boot performance.