Using the command line to troubleshoot problems with Windows boot records

Contents

If your computer won't start, automatic boot bug fix doesn't help, or just see one of the errors like “No boot device”. Insert the boot disk and press any key "- in all these cases, fixing your MBR boot records and BCD boot settings can help, as explained in this manual. (But it won't necessarily help, depends on your specific situation).

I've written posts on a similar topic before, How to fix Windows bootloader, but this time I have decided to cover it in more detail (after being asked how to run Aomei OneKey Recovery if it was removed from boot and Windows stopped starting ).

Update: if you have windows 10, Look here: Windows bootloader recovery 10.

Bootrec.exe: utility to fix Windows startup errors

Everything that is described in this tutorial is applicable for Windows 10, Windows 8.1 and Windows 7, and we will use the available boot recovery tool bootrec.exe which is run from the command line.

Having said this, the command line will need to be run from inside running Windows, but in a slightly different way:

  • In the case of Windows 7, you will have to boot from a previously created recovery disc (created in the system itself) or from distribution. When booting from the distribution, select “Restore system” at the bottom of the start window (after language selection) and then run the command line.
  • For Windows 8.1 Y 8, you can use the layout almost as described in the previous paragraph (Restore system – Diagnosis – Advanced Options – Symbol of the system). O, if you have the option to run the “Special boot options” Windows 8, the command line can also be found in Advanced Options and run from there.

Typing bootrec.exe on the command line executed like this, you can get acquainted with all the available commands. In general, your description is pretty clear without my explanation, but I will describe each item and its scope just in case.

Write a new boot sector

Run bootrec.exe with the parameter / FixBoot enables you to write a new boot sector to your hard drive's system partition, this will use a boot partition compatible with your operating system: Windows 7, 8.1 o Windows 10.

The application of this option will be very useful in cases where:

  • The boot sector is damaged (as an example, after changing the structure and size of the hard disk partition)
  • An older version of Windows was installed after a newer version of Windows (as an example, Windows XP was installed after Windows 8)
  • Some boot sector not compatible with Windows has been written.

To write a new boot sector, just run bootrec with the specified parameter, as shown in the next screenshot.

Repair MBR (master boot record)

The first of the tools parameters bootrec.exe is FixMbr, which enables you to repair Windows MBR or bootloader. When it's used, a damaged MBR is overwritten with a new one. The boot record is located in the first sector of the hard drive and tells the BIOS how and where to start booting the operating system. If it is damaged, you may see the following errors:

  • No boot device
  • The operating system is missing
  • No disk in system or disk error
  • At the same time, if you get a message that your computer is locked (virus) even before Windows starts to boot, MBR and boot repair can also contribute here.

To run a boot record fix, type in command line bootrec.exe /fixmbr and hit Enter.

If you have multiple Windows systems before Vista installed on your computer, but not all appear in the start menu, you can run bootrec.exe command / scans to find all installed systems (and not only that, as an example, in the same way you can add the OneKey Recovery section to the start menu).

In case Windows installations have been found on your computer, use repository repository boot configuration BCD (next section) to add them to the boot menu.

BCD Recreation – Windows boot settings

To reconstruct a BCD (Windows boot settings) and add lost installed Windows systems (as well as recovery partitions created from Windows), use the bootrec.exe command / RebuildBcd.

In some cases, if the above steps don't help, it is important to note try the following commands before performing a BCD overwrite:

  • bootrec.exe / fixmbr
  • bootsect.exe / nt60 all / strength

Conclution:

As you can see, bootrec.exe is quite a powerful tool for fixing a range of Windows boot errors and I can safely say that it is one of the most widely used when it comes to user computer problems by experts.. I think this information will also be useful to you one day.

Subscribe to our Newsletter

We will not send you SPAM mail. We hate it as much as you.

Datapeaker