Windows Boot Process Step by Step

Are you wondering how exactly the windows booting process occurs and all that goes behind in the background? If yes, then you are at the right place. In this tutorial, you will learn how the windows boot process works step by step.

Let’s dive in.

Join 28 other followers

Table of Content

  1. What is firmware ?
  2. What is CMOS ?
  3. What is Flash Memory ?
  4. Step by Step Windows boot Processing
  5. What bios stands for and what is Bios ?
  6. What is Power On Self Test (POST)
  7. Master Boot Record (MBR)
  8. Windows Boot Manager
  9. Windows Boot Loader
  10. Loading the Windows kernel
  11. High Level Summary of Windows Boot Process
  12. High Level Summary of Windows Boot Process(Other way)
  13. Conclusion

What is firmware ?

Firmware is a software program stored on a hardware device to control, operate, or maintain the hardware in the background. Firmware is found on computer motherboards to hold hardware settings and settings related to BIOS and is stored in non-volatile memory devices such as ROM, EPROM, or flash memory.

Firmware
Firmware

What is CMOS ?

A complementary metal-oxide-semiconductor (CMOS) is a type of integrated circuit technology that
holds basic information, including the date and time and system configuration settings,
needed the basic input/output system (BIOS) to start the computer.

The CMOS (Complementary Metal-Oxide Semiconductor) chip stores the settings that you make
with the BIOS configuration program.

What is Flash Memory ?

Flash Memory is lifelong and unchanged storage used to store information even when the system is powered off. Flash memory is widely used with car radios, cell phones, digital cameras, PDAs, solid-state drives, tablets, and printers.

Flash memory
Flash memory

Step by Step Windows boot Processing

Now that you have a basic idea about a few components used in booting the windows machine. Let’s discuss in detail each step of how to perform window booting.

Step by Step Windows boot Processing
Step by Step Windows boot Processing

What bios stands for and what is Bios ?

Bios stands for Basic Input Output System and is the first software to run when a computer is started and is stored on a small memory chip on the motherboard. BIOS provides steps to the computer to perform basic functions such as booting.

(BIOS) is a program that’s stored in nonvolatile memory such as read-only memory (ROM) or flash memory, making it firmware

  • BIOS is also used to identify and configure the hardware in a computer such as the hard drive, floppy drive, optical drive, CPU, memory, and related equipment.
  • BIOS performs a POST (Power On Self Test) that checks all the hardware devices connected to a computer like RAM, hard disk, etc, and makes sure that the system can run smoothly with those hardware devices. If the POST is a failure the system halts with a beep sound.
  • The other task of the BIOS is to read the MBR. MBR stands for Master Boot Record and it’s the first sector on a hard disk. MBR contains the partition table and boot loader.
BIOS
BIOS
BIOS Configuration
BIOS Configuration

What is Power On Self Test (POST)

Power On Self Test (POST) checks all the hardware devices connected to a computer like RAM, hard disk, etc., and makes sure that the system can run smoothly with those hardware devices. If the POST fails, the system halts with a beep sound.

The first set of startup instructions in BIOS is the POST, which is responsible for the following system and diagnostic functions:

  • Performs initial hardware checks, such as determining the amount of memory present
  • Verifies that the devices needed to start an operating system, such as a hard disk, are present
  • Retrieves system configuration settings from nonvolatile memory, which is located on the motherboard
  • If a single beep is sounded from the PC, then there are no hardware issues present in the system. However, an alternative beep sequence indicates that the PC has detected a hardware issue that needs to be resolved before moving on to the next stages of the process

Master Boot Record (MBR)

After POST performs the testing, the BIOS reads the Master Boot Record (MBR). MBR is stored on the hard disk’s first sector and contains the boot loader.

Windows Boot Manager

Windows Boot Manager enables you to choose from multiple operating systems or select the kernels or helps to start Windows Memory Diagnostics. Windows Boot Manager starts the Windows Boot Loader. Located at %SystemDrive%\bootmgr.

Windows Boot Loader

The boot loader is a small program that loads the kernel to the computer’s memory that is in the RAM. There are three boot files in a Windows operating system: NTLDR, NTDETECT.COM, and Boot.ini.

  • The path of NTLDR (NT Loader) is C:\Windows\i386\NTLDR.
  • C:\boot.ini contains the configuration files of NTLDR
  • This file detect hardware’s and passes information to NTLDR

Loading the Windows kernel

The Windows Boot Loader is responsible for loading the Windows kernel (Ntoskrnl.exe), Hardware Abstraction Layer (HAL), Hal.dll file that helps the kernel to interact with hardware. Next, Windows executes the configuration information stored in the registry in HKLM\SYSTEM\CurrentControlSet and starts services and drivers. Winlogon.exe starts the login procedures of the windows machine.

High Level Summary of Windows Boot Process

  1. The computer loads the basic input/output system (BIOS) from ROM. The BIOS provides the most basic information about storage devices, boot sequence, security, Plug and Play (auto device recognition) capability and a few other items.
  2. The BIOS triggers a test called a power-on self-test (POST) to make sure all the major components are functioning properly. You may hear your drives spin and see some LEDs flash, but the screen, at first, remains black.
  3. The BIOS has the CPU send signals over the system bus to be sure all of the basic components are functioning. The bus includes the electrical circuits printed on and into the motherboard, connecting all the components with each other.
  4. The POST tests the memory contained on the display adapter and the video signals that control the display. This is the first point you’ll see something appear on your PC’s monitor.
  5. During a cold boot the memory controller checks all of the memory addresses with a quick read/write operation to ensure that there are no errors in the memory chips. Read/write means that data is written to a bit and then read back from that bit. You should see some output to your screen – on some PCs you may see a running account of the amount of memory being checked.
  6. The computer loads the operating system (OS) from the hard drive into the system’s RAM. That ends the POST and the BIOS transfers control to the operating system. Generally, the critical parts of the operating system – the kernel – are maintained in RAM as long as the computer is on. This allows the CPU to have immediate access to the operating system, which enhances the performance and functionality of the overall system

High Level Summary of Windows Boot Process(Other way)

  1. BIOS is the first software to run when a computer is started and stored on a small memory chip on the motherboard. BIOS is also used to identify hardware issues using POST and configure the hardware in a computer such as the hard drive, floppy drive, optical drive, CPU, memory, and related equipment.
  2. The other task of the BIOS is to read the MBR using windows boot manager.
  3. Further, Windows Boot Manager enables you to choose from multiple operating systems or select the kernels or helps to start Windows Memory Diagnostics. Windows Boot Manager starts the Windows Boot Loader (GRUB or LILO) located at %SystemDrive%\bootmgr.
  4. The boot loader ( GRUB or LILO) is a small program that loads the kernel to the memory of the computer that is RAM. There are three boot files in a Windows operating system, and they are NTLDR, NTDETECT.COM, and Boot.ini.
    • The path of NTLDR (NT Loader) is C:\Windows\i386\NTLDR.
    • C:\boot.ini contains the configuration files of NTLDR
    • This file detect hardware’s and passes information to NTLDR
  5. Next, The Windows Boot Loader is responsible for loading the Windows kernel (Ntoskrnl.exe) and the Hardware Abstraction Layer (HAL), Hal.dll( Hal.dll file) that helps the kernel to interact with hardware.
  6. Now, the Windows executive processes the configuration information stored in the registry in HKLM\SYSTEM\CurrentControlSet and starts services and drivers.
  7. Finally, winlogon.exe starts the login procedures of the windows machine

Conclusion

In this tutorial, you learned various needed components, or you should know how to understand how booting works in a windows machine.

Finally, you learned step by step boot process in windows Machine. So, with this knowledge, you should have a strong understanding of the windows reboot issues?

How does the grub menu solve the booting problem

Knowing the grub menu is important if you face issues while booting your machine. GRUB is a powerful boot loader that allows you to load multiple operating systems such as windows, ubuntu, Linux, etc.

There could be various reasons why your system doesn’t start properly, and at times even machines don’t boot; that’s a huge problem! To solve that, one of the keys is to check the grub menu and bios settings.

In this tutorial, you will learn, step by step, how knowing about the grub menu along with the bios setting solves the booting problem.

Let’s begin!

Join 28 other followers

Table of Content

  1. Prerequisites
  2. Checking and performing BIOS update
  3. Checking GRUB menu
  4. Reinstall GRUB
  5. Conclusion

Prerequisites

This tutorial will assume you have any Ubuntu version, such as Ubuntu 14.04 or the latest Ubuntu 21.04, which you will need to perform the testing and fix.

Checking and performing BIOS update

BIOS is the first software program to load into the system. If your system cannot boot even with a LIVE DVD or USB Drive, there could be two possibilities: you accidentally deleted the boot device, or a hardware issue. To solve the boot issues, the first thing you could do is try to restore the BIOS settings or do a bios update.

To restore the BIOS settings or bios update, follow the below steps:

  • The first step is to restart or Power the system on and quickly press the “F2” button until the BIOS setting menu is displayed.
  • Next, restore BIOS settings to default settings or set “Reset Config Data” in BIOS.
  • Once you select the default setting, you will hear a beep tone.
  • Finally, restart the system.

Related: Windows Boot Process Step by Step

Checking GRUB menu

In the previous section, you learned that if you cannot boot with DVD/USB or a hardware issue, consider replacing hardware or changing the BIOS Settings, which is the first step. But If you can turn on the computer and get past the initial BIOS startup, consider checking the GRUB menu.

A few things might have been overwritten or caused corruption in the system, which can be solved using the recovery mode within the GRUB menu. To recover from the above problems, follow the steps as shown below:

  • Press the Shift key after the BIOS to access the GRUB menu and select the Advanced Options for Ubuntu menu from the down drop list.
Accessing the GRUB menu and selecting the Advanced Options for Ubuntu menu
Accessing the GRUB menu and selecting the Advanced Options for Ubuntu menu
  • Further from the Advanced options menu, select an entry with the words recovery mode, which boots the machine into a recovery menu with options to automatically fix several possible problems. At least it lets you boot into a minimal recovery-mode version of Ubuntu with only the most necessary processes loaded. From here, you may be able to fix disks, check file systems, drop to a root prompt to fix file permissions, etc.

As you can see below in the image, there are two additional options for every kernel: upstart and recovery.

  • (upstart): an event-based replacement for the /sbin/init daemon, which handles starting tasks and services during boot, stopping them during the shutdown, and supervising them while the system is running.
  • (recovery mode): to recover the kernel from any failures in the system.
Displaying of kernels in GRUB menu
Displaying of kernels in the GRUB menu

Reinstall GRUB

Earlier in the previous section, you learned how to check the GRUB menu and fix the corruption of file systems or kernels. But what if you cannot bring up the GRUB menu then reinstalling GRUB is your last resort.

To reinstall GRUB perform the below steps as mentioned below:

  • Boot the Ubuntu machine from a live DVD or bootable USB drive with the same Ubuntu release as your system, such as 16.04. To find the ubuntu release run the below command.
lsb_release -a
Command to check ubuntu release version
Command to check the ubuntu release version
  • To determine the boot drive on your system open a terminal and run the below command to list the drives attached to the system.
sudo fdisk -l
Command to check drivers attached to the system
Command to check drivers attached to the system
  • Next, search for an entry in the output with an * in the boot column. This should be the boot device similar to something like /dev/sda1.
  • Now, mount the Ubuntu partition at /mnt by replacing /dev/sda1 with the information you just found.
sudo mount /dev/sda1 /mnt
  • Next, reinstall GRUB by replacing /dev/sda1
sudo grub-install --boot-directory=/mnt/boot /dev/sda1
  • Finally, restart the computer, and Ubuntu should boot properly.
Ubuntu restart network
Ubuntu restart network

Join 28 other followers

Conclusion

In this critical post, you learned how to bring back an ubuntu machine that didn’t boot using different stages such as Checking and performing BIOS updates, Checking the GRUB menu, and reinstalling the GRUB that you should consider to recover them in the future.

Now, you are pro in fixing the ubuntu machine that doesn’t boot, so which method will you plan to check first while troubleshooting the issue.