Recover HDD Data
 
Blog
 
How to fix the Windows boot loader (MBR) using command prompt

How to fix the Windows boot loader (MBR) using command prompt

Windows generate an error at boot time and not start? You can solve problems with the startup of the operating system and repair loader functionality using the command line.

How to fix the Windows boot loader (MBR) using command prompt

Content:

  1. Reasons for bootloader problems
  2. Restore at the boot
  3. Restore Windows boot loader via command prompt

Reasons for boot loader problems

Windows boot problems are a clear sign that the files, responsible for booting the OS are corrupted. There are many reasons for starting your system incorrectly.

The most common ones are:

  • Installing additional operating systems that damage the boot files of the primary operating system.
  • Damaging or deleting boot files by malicious programs and viruses.
  • Loss of data due to physical and software failures of the drive.

Restore at the boot

“Broken” or missing files of the OS loader lead to the inability to startand correct the operation of the computer. In this case, you should resort to restoring the Windows loader in the following way:

Step 1: You will need a Windows Recovery CD or bootable flash drive to start recovering the boot. Important: for the recovery system to work correctly, you will need to boot at the same bit (32 or 64-bit) as the current OS. If you boot from the installation disk, you will need to select “Repair your computer” on the installation screen.

How to fix the Windows boot loader (MBR) using command prompt

Step 2: Select “Troubleshoot” on the recovery screen.

How to fix the Windows boot loader (MBR) using command prompt

Step 3: In the window that opens, select “Start-up Repair”.

How to fix the Windows boot loader (MBR) using command prompt

This will be followed by automatic repair and correction of faults that do not allow for normal OS boot up.

Unfortunately, automatic restore methods do not always help to restore the operating system, so sometimes you should resort to manual repair using the command prompt.

Restore Windows boot loader via command prompt

To start recovering the loader using the command prompt, you need to open it first. It can be done using the boot drive or the recovery and diagnostics menu.

If you are using a bootable drive, you must press Sfit+F10 on the language selection screen.

How to fix the Windows boot loader (MBR) using command prompt

You can access the command prompt via the diagnostics menu by clicking the corresponding icon.

How to fix the Windows boot loader (MBR) using command prompt

After opening the command prompt, you should enter the following commands:

  • Diskpart (built-in utility for working with hard drives)
  • List volume (list of connected drives)
  • Exit (shutdown of the utility)
How to fix the Windows boot loader using command prompt

Each command must be confirmed with the Enter key.

This procedure will allow you to find out which drive is the system one (by default it is drive C), and based on this knowledge, you will be able to perform program recovery of bootloader files.

You will then need to enter bcdboot c:\windows to fix most bootloader problems.

How to fix the Windows boot loader using command prompt

It should be noted that if there are several operating systems installed on the computer, this method should be done for each system in turn.

If this method did not work, you can clean the bootloader completely and create its files again.

To do this: open the command prompt in any convenient way. Enter diskpart. Then, volume list. After that, we find a hidden partition with the loader (usually it is a 100-500 Mb, disk created by the system by default in FAT32 format) and remember the letter of this partition.

How to fix the Windows boot loader using command prompt

Now you need to enter a series of commands that delete and recreate the loader.

  • Choose volume 3 with the command select volume 3 (instead of 3, there can be another number).
  •  Format the volume with the command format fs=ntfs, or format fs=fat32, depending on the disk file system.
  • Assign the name «Y» to that command assign letter=Y
  • We exit the utility with the exit command.
  • Enter the command bcdboot C:\Windows /s Y: /f ALL (letters C and Y may vary depending on the system and the number of disks). If you have more than one operating system installed, you need to perform this step for all volumes with bootloaders.

At this point, the recovery of the loader can be considered complete.

ТNow you need to delete the assigned volume letter. You can do this by going to the command prompt as follows:

  • Enter the diskpartcommand.
  • Next, you need to display the list of media with the command list volume.
  • Select the volume named Y with the command select volume Y.
  • Remove the name with the command remove letter =Y.
  • Exit.

Now for normal booting of the PC it is enough to reboot the system.

Recovering deleted data

Incorrect working of the operating system and problems with the boot loader may indicate the presence of viruses that destroy all files. If you find that your important data has disappeared, we recommend you to use RS Partition Recovery software, which can quickly recover all deleted data damaged by viruses or lost in case of accidental formatting.

RS Partition Recovery also allows you to restore photos, video files, text documents etc. after deletion up to several months ago. On RecoverHdd.com you can get acquainted with all the advantages and features of RS Partition Recovery, as well as other products from Recovery Software.

Leave a Reply

Your email address will not be published. Required fields are marked *