Restoring the Windows 10 bootloader using the system

Restoring the Windows 10 bootloader using the system

18.09.2021

Recovery of the Windows 10 bootloader must be performed if it is impossible to boot the operating system on the computer. After starting the PC, an error message appears on the screen, indicating that the system cannot be loaded for one reason or another.

Causes of problems with the system bootloader can arise from hardware and software. In this article, we will look at ways to restore the operating system bootloader that are not related to computer hardware problems, such as a hard drive or RAM failure.

Some possible causes of Windows bootloader problems include:

  • unknown system failure;
  • exposure to malicious software;
  • incorrect user actions;
  • turning off the computer during the installation of updates;
  • installing another operating system on the computer;
  • the result of the work of cleaning programs and system tweakers.

If the user deleted the bootloader by his wrong actions, or it does not work due to another problem, how to restore it? It suddenly became impossible to boot the operating system on the computer, how to restore the Windows bootloader?

To restore the Windows bootloader, if automatic repair does not work, the command line launched from the Windows 10 recovery disk, from the installation disk, or from . Therefore, I recommend that all users have boot disks with them, which will come in handy in case of problems on the computer.

Simple failures are fixed directly in a running system, and in case of serious problems, the OS may not boot. Booting to a PC, performed from bootable media (flash drive or disk), will allow you to call the system recovery tools to solve the problem.

Directly by means of the system, you can create on a USB flash drive or CD / DVD disk. To restore the system, you can use a bootable Windows USB flash drive or an installation DVD with the operating system.

The user can free from the official site, and then immediately create a . There are a large number of third-party programs for creating bootable flash drives.

The most reliable way to restore the system in case of serious problems: for example, using the system tools, and then from a backup. To create a backup image of the system, you can use third-party software:, (freeware), etc.

In this article, we will look at several ways to restore the Windows 10 bootloader without using third-party software. The instruction is suitable for operating systems Windows 8.1, Windows 8, Windows 7.

To start booting from a boot disk (USB flash drive or DVD), you must enter the BIOS or UEFI boot menu, and then select a boot device. Another launch option: selecting the boot priority from bootable media in the BIOS settings. Different keyboard keys are responsible for entering the BIOS on computers, so first find out what to press, focusing on the model of your device.

Repairing the Windows 10 bootloader with automatic troubleshooting

In my example, we will try to restore the Windows 10 UEFI bootloader. The article is suitable for users with computers that have an MBR bootloader in Windows 10.

After downloading on the computer, in the first window of the Windows setup program, click on the "Next" button.

In the next window, click on System Restore.

In the Select Action window, click on Troubleshooting.

First, I recommend choosing the method: "Startup Repair". The Windows operating system will automatically fix problems that prevent the system from booting. This is the simplest solution to the problem, I myself have used it more than once.

The operating system will automatically diagnose the cause of the failure and restore the system files needed to boot Windows.

In case of a positive outcome, the computer will start Windows 10 in normal mode.

If Startup Repair failed to repair your computer, you will have to use the command prompt.

Restoring the Windows bootloader via the command line - 1 way

After an unsuccessful automatic repair, in the "Startup Repair" window, click on the "Advanced Options" button.

In another way, you can re-boot from bootable media (USB flash drive or DVD), and then go all the way to the "Advanced Options" window.

In the "Advanced Options" window, click on the "Command Prompt" button.

We will perform a Windows bootloader repair via the command line. The bootloader recovery process will take place in two stages:

  • using the Diskpart utility, we will find out the name of the system drive on which Windows is installed;
  • then we will create the operating system boot files.

In the command line interpreter window, enter the command to launch the Diskpart utility (press the "Enter" key after entering each command):

Diskpart list volume

In the list of disks (volumes) of the computer, you need to find the system partition on which the Windows operating system is installed. We need to find out the “Name” (drive letter), when searching for a volume, be guided by the size of the disk with the installed system. The operating system can be installed drive "C", "D", "E", etc.

In my case, the system is installed on the "C" drive.

To exit the Diskpart utility, enter the command:

Now you need to enter a command to create operating system boot files using the bcdboot utility.

In the command prompt window, enter the command:

bcdbootX:\windows

In this command, "X" is the letter of the volume (disk) where the system is installed, on my computer drive "C", so I entered this drive letter.

After executing the command, you will see a message that the download files were created successfully.

Close the command line window.

In the "Select what to do" window, click the "Continue" button to exit System Restore and continue using Windows 10.

How to repair the Windows 10 bootloader using the command line - 2 way

This method will use the command line called from the recovery disk, bootable USB flash drive, or from the Windows installation DVD. The computer must boot from the boot disk, and then run the command prompt.

The process of creating Windows 10 boot files will take place in three stages:

  • using the DiskPart utility, we will find out the number of the hidden volume (disk, partition) and the file system, format the disk, and then give a letter to the volume (disk);
  • creating files on a hidden volume (disk) to boot the system;
  • deleting a drive letter (volume) of a hidden partition.

In the command line interpreter window, type the commands in turn (do not forget to press "Enter" after entering the appropriate command):

Diskpart list volume

On a computer with GPT UEFI, there is a hidden partition with the FAT32 file system, it is not marked with a letter, ranging in size from 99 to 300 MB. On computers with an MBR BIOS, there is a hidden volume with the NTFS file system, up to 500 MB in size.

We need the volume number ("Volume 0", "Volume 1", "Volume 2", etc.) and its file system. Pay attention to the letter of the volume (drive) on which Windows is installed.

Select the hidden volume, it doesn't have a "Name" (drive letter). In this case it is "Volume 4", your computer may have a different volume number.

Select volume X

Enter the command to format the volume in the "FAT32" or "NTFS" file system, depending on the UEFI or MBR hard disk partition style, respectively. On my computer, the hidden partition is formatted as FAT32, so I chose to format it to that file system.

format fs=fat32 or format fs=ntfs

Assign letter=Z

Exit the Diskpart utility:

Now you need to run the command to create Windows boot files:

Bcdboot C:\Windows /s Z: /f ALL

In this command, "C" is the letter of the partition on which Windows is installed, and "Z" is the letter of the hidden drive.

Once the download files have been successfully created, run the Diskpart utility again:

diskpart

Display a list of computer volumes on the command line:

List volume

Select the hidden volume that you previously assigned the letter "Z" to:

Select volume X

In this command, "X" is the number of the hidden volume on your computer. You already selected it on the command line when you assigned a name for this volume (partition).

Enter the command to remove the volume name (drive letter), and then exit the Diskpart utility:

Remove letter=Z exit

Close Command Prompt.

Remove the DVD or bootable flash drive from the computer, bootable media is no longer needed.

In the "Select action" window, click the "Turn off" button.

Turn on the PC, which will boot into the Windows 10 operating system again.

Windows 10 bootloader recovery in Bootrec

You can use the Bootrec.exe utility to troubleshoot startup problems on computers with an MBR (Master Boot Record).

The main commands of the Bootrec.exe utility are:

  • FixMbr - Windows compatible master boot partition (MBR) entry, existing partition table is not overwritten.
  • FixBoot - writing a new boot sector compatible with Windows to the system partition.
  • ScanOS - searches all disks of installed systems that are compatible with Windows, displaying entries that are not in the system configuration store.
  • RebuildBcd - Searches all disks for installed Windows-compatible systems, selecting which systems to add to the configuration store.

In most cases, it is enough to write down the main boot partition or a new boot sector that is compatible with the current operating system.

After booting into the Windows Recovery Environment. In the command prompt window, enter one of the commands:

Bootrec.exe /FixMbr Bootrec.exe /FixBoot

If the problem cannot be solved by the suggested methods, you can fix the problem using a "clean" instead of the system installed on the computer.

Article Conclusions

In case of problems when loading the operating system, the user needs to restore the Windows 10 bootloader. To do the job, you will need to boot on the computer from a bootable USB flash drive or from the installation DVD. Restoration is performed from the recovery environment automatically by the system, or manually by the user, after entering the appropriate commands on the command line.

© 2023 hecc.ru - Computer technology news