20.07.2024
Home / Instructions / Windows 7 boot repair commands. What is a repair tool

Windows 7 boot repair commands. What is a repair tool

MBR (in Russian - master boot record) is a specific set of data, lines of code, partition table and signatures. It is required to load the Windows operating system after turning on the computer. There are cases when, as a result of various hardware and system failures, the MBR is damaged or erased, which makes it impossible to start Windows. Restoring the Windows 7 MBR boot record solves such problems. This article discusses several simple ways in which you can restore records.

A little theory

After turning on the computer, the BIOS selects the storage medium from which to boot. At this stage, the device needs to know which partition hard drive contains Windows system files. MBR is a small program that is stored in the first sector of the HDD and points the computer to the correct partition to start the system.

If you install the second operating system incorrectly, the partition table may be damaged and the first Windows will not be able to start. The same thing sometimes happens when there is a sudden power outage. If this happens, do not despair; damaged data can be completely restored.

Boot Record Recovery

In order to restore the MBR, you will need the installation disk from which you installed Windows (or any other). If there is no disk, you can create a bootable USB flash drive with Win7. Action algorithm:

Automatic recovery

To begin with, it’s worth leaving MBR repair to standard Microsoft tools. Select Startup Repair. There is no need to do anything else, some time will pass and the computer will indicate that the process is complete. Try starting Windows. If nothing works, then you need to restore the ICBM manually.

Command line

This path requires you to enter several commands into the Windows Command Prompt.

  • From the system recovery menu, select Command Prompt.
  • Now you need to enter “bottrec/fixmbr”. This command is used to write a new MBR compatible with Win 7. The command will remove non-standard parts of the code, fix corruption, but will not affect the existing partition table.
  • Next enter “bootrec/fixboot". This command is used to create a new boot sector for Windows.
  • Next “bootrec/nt60 sys”. This command will update the MBR boot code.
  • Close the console, restart your computer and try to start the system. If the problem is still not resolved, you need to enter a few more commands.
  • Launch the console again and enter "bootrec/Scanos" and "bootrec/rebuildbcd". Using these utilities, your computer will scan HDD for availability operating systems, and then add them to the boot menu.
  • Then enter “bootrec/nt60 sys” again and restart the computer.

TestDisk utility

If you do not have a bootable USB flash drive or disk, you can restore the damaged recording using a third-party program. To do this, you need to run another (working) OS. If your machine only had one Windows, you will have to connect the hard drive to another computer. Working with TestDisk is quite complex, so it is recommended that you familiarize yourself with the manuals dedicated specifically to this program.

Repair Tools Windows errors are constantly being improved, offering users increasingly automated solutions that allow them to quickly resolve various problems. If you connect the installation media to your computer and select “Startup Repair” in the “System Restore” section, you can fix many errors that prevent Windows from starting. However, if the bootloader is damaged, this method will not work, so if you encounter such a problem, you will have to restore the MBR through the command line.

Running the command line

You will need a boot disk with the distribution of the same system installed on the computer. Not only the version must match, but also the Windows bit depth, otherwise the recovery will not work.

After opening the list of available tools, first perform a startup error fix. If you cannot solve the bootloader corruption problem, go back to the list of tools and select Command Prompt.

Bootrec utility

To rewrite the MBR (data needed for Windows downloads) and fixing bootloader errors we will use the built-in Windows utility. Enter the “bootrec” command in the interpreter window. After launching this utility, a list of supported commands will appear - run them in order.


Restart your computer. The bootloader has been restored and the MBR has been rewritten, so Windows should start without problems. If rewriting the MBR did not help fix the startup problem, try using the remaining two commands:


The utility will begin scanning your hard drive, trying to find installed systems. When Windows 7 is detected, run "Bootrec.exe /RebuildBcd". Found systems will be recorded in the boot menu. Exit the utility using the “exit” command and restart your computer. There is no longer any need to rewrite the MBR - Windows will start without errors.

BCDboot utility

If you cannot fix the MBR error, try restoring the bootloader using the BCDboot utility. This tool allows you to create or restore a boot environment located on the active partition of the hard drive. If, as a result of a system failure, the boot environment was moved to another partition of the hard drive, then using BCDboot.exe you will return it to its place.

Open a command prompt and type “bcdboot.exe e:\windows” (attributes are optional). Instead of “E:” you need to put the letter of the partition on which the Windows files are stored. If in Windows environment This section is designated by the letter “C”, but here it may be displayed as “D” - take this into account when executing the command.

One of the reasons why a computer on the Windows 7 operating system does not start is a damaged boot record (MBR). Let's look at the ways in which it can be restored, and, consequently, the possibility of normal operation on the PC can be restored.

The boot record can be damaged for many reasons, including system failure, sudden power outage or power surges, viruses, etc. We will look at how to deal with the consequences of these unpleasant factors that led to the emergence of the problem described in this article. You can fix this problem either automatically or manually using "Command line".

Method 1: Automatic recovery

operating room Windows system itself provides a tool that fixes the boot record. As a rule, after an unsuccessful system startup, when you turn on the computer again, it is activated automatically; you just need to agree to perform the procedure in the dialog box. But even if automatic launch does not occur, it can be activated manually.

  1. In the first seconds of starting your computer, you will hear a beep, which means the BIOS is loading. You need to immediately hold down the key F8.
  2. The described action will cause the system boot type selection window to open. Using buttons "Up" And "Down" on your keyboard select option "Troubleshooting..." and press Enter.
  3. The recovery environment will open. Here in the same way select the option "Startup Recovery" and press Enter.
  4. This will launch the automatic recovery tool. Follow all instructions that will be displayed in its window if they appear. After completing the specified process, the computer will restart and, if the outcome is positive, Windows will start.
  5. If using the method described above you cannot even start the recovery environment, then perform the indicated operation by booting from installation disk or flash drives and selecting the option in the start window "System Restore".

    Method 2: Bootrec

    Unfortunately, the method described above does not always help, and then you have to restore the boot entry of the boot.ini file manually using the Bootrec utility. It is activated by entering a command in "Command line". But since it will not be possible to launch this tool as standard due to the inability to boot the system, you will have to activate it again through the recovery environment.


    If this option does not help, then there is another method, which is also carried out through the Bootrec utility.


    Method 3: BCDboot

    If neither the first nor the second methods work, then it is possible to restore the bootloader using another utility - BCDboot. Like the previous tool, it is launched via "Command line" in the recovery window. BCDboot repairs or creates a boot environment for the active hard drive partition. Especially this method effective if the boot environment was moved to another hard drive partition as a result of a failure.


    There are several ways to restore the boot record in Windows 7 if it is damaged. In most cases, it is quite enough to perform an automatic resuscitation operation. But if its use does not lead to positive results, special ones come to the rescue system utilities, launched from "Command line" in the OS recovery environment.

Hi all! Today I will talk about a fairly common problem in operating systems. Windows family Vista/7/8/8.1/10 - violation of the integrity of the MBR bootloader. No matter how hard Microsoft tries to take into account possible problems the operation of your software, it is probably impossible to foresee everything at the development and testing stage. Various third-party loaders (activators, other versions of operating systems, viruses) add problems to stability.

What is needed to restore the bootloader.

  1. Windows Vista/7/8/8.1/10 installation media.
  2. User.
  3. DVD drive.

Let's get started!

The easiest way to restore the bootloader. To use the startup repair tool, you must first start the environment Windows recovery RE.

For this:

  • Set the BIOS to boot from installation media.
  • Select an item System Restore.

  • Further.
  • In the dialog box, select Startup recovery.

  • Follow further instructions.

After the Startup Repair tool completes, restart your computer. Try starting Windows normally, without installation media.

If the problem persists, let's proceed with further actions.

Now we will look at restoring the MBR boot record using standard operating system tools. Which come either as part of the installation disk or as a component of the operating system. Namely BOOTREC.EXE And BOOTSECT.

BOOTREC.EXE- boot record recovery tool. Supports the following options, from which you can choose the one that suits you best.

This option writes a master boot record compatible with Windows 7 or Windows Vista to the system partition. It does not overwrite the existing partition table. This parameter should be used to troubleshoot problems with MBR corruption, or if you need to remove non-standard code from the MBR.

/FixBoot

This option writes a new boot sector to the system partition using a boot sector that is compatible with Windows Vista or Windows 7. This option should be used if at least one of the following conditions is true.

  • The boot sector has been replaced with the non-standard Windows Vista or Windows 7 boot sector.
  • The boot sector is damaged.
  • After Windows installations Vista or Windows 7 has been installed on the computer for more than early version Windows operating system. IN in this case Instead of Windows Boot Manager (Bootmgr.exe), the Windows NT Boot Loader (NTLDR) is used to start the computer.

This option searches all drives for installed systems that are compatible with Windows Vista or Windows 7. It also displays any entries not included in the boot configuration data store. Use this option if your computer has Windows Vista or Windows 7 installed and does not appear in the boot manager menu.

/RebuildBcd

This option searches all drives for installed systems that are compatible with Windows Vista or Windows 7. It also allows you to select the installed systems that you want to add to the boot configuration data store. This option should be used if you need to completely rebuild the boot configuration data store.

Let's get started!

To use the Bootrec.exe tool, you must first start the Windows RE recovery environment.

  • Insert installation Windows disk 7 or Windows Vista into the DVD drive and turn on the computer.
  • When prompted, press the key.
  • Select an item Restore your computer.
  • Specify the operating system you want to restore and click Further.
  • In the dialog box System Recovery Options select item Command line.
  • Type Bootrec.exe and press ENTER. will appear full list opportunities.
  • Write down the MBR sector, what is the command for?

Bootrec.exe /FixMbr;

  • After pressing Enter, the computer will notify the user about the successful completion of the operation in the next line;
  • Next, carry out the procedure for recording a new boot sector by entering

Bootrec.exe /FixBoot;

  • All that remains is to enter Exit and try to restart the computer.

If not, we will describe how to restore the Windows bootloader in another way using the same program:

  • Enter the command line from the installation disk or flash drive.
  • Enter Bootrec /ScanOs, after which the utility will scan your computer for the presence of an operating system.

Bootrec/ScanOs

  • Write the command Bootrec.exe /RebuildBcd in the next line, the program will offer to add all found ones to the start menu Windows versions, including XP and others.

Bootrec.exe /RebuildBcd

  • All you have to do is agree with this by pressing Y and Enter in sequence, after which when loading the system you will have a choice of which OS to load - XP or Seven.

If that didn't help either. You can also fix the problem with the MBR with one more command. To do this, on the command line you need to enter bootsect /NT60 SYS, then Enter.

Team BOOTSECT allows you to write specified program code boot sectors, providing loading or ntldr, or bootmgr .

Format command line:
bootsect (/help|/nt60|/nt52) (SYS|ALL|< DriveLetter >:}

Bootsect command line options:
/help— display of help information;
/nt52— recording the boot sector code that enables the use of the ntldr boot loader for operating systems prior to Windows Vista.
/nt60- writing program code to boot sectors to ensure loading of the bootmgr file - the boot manager of Windows Vista/Server 2008 and later operating systems of the Windows family.
SYS— the recording will be performed in the sectors of the Windows system boot partition in the environment in which this command is executed.
ALL— program code will be written for all existing partitions that can be used to boot Windows.
DriveLetter— drive letter for which the program code of boot sectors will be rewritten.
/force— forced disabling of disk volumes used by other programs to ensure exclusive access for the bootsect.exe utility
/mbr- changing the program code of the master boot record (MBR - Master Boot Record) without changing the disk partition table. When used with the /nt52 parameter, the MBR will be compatible with previous versions of Windows Vista. When used with the /nt60 parameter, the MBR will be compatible with Windows Vista and later operating systems.

bootsect /nt52 E:- create for drive E: boot records for operating systems Windows systems XP/2000/NT, i.e. for booting based on ntldr;
bootsect /nt60 /mbr C:— change the boot sectors of drive C: to ensure that the bootmgr manager loads, and this is Windows Vista/7/8/8.1/10;
bootsect /nt60 SYS— changing boot sectors for the partition from which the current Windows OS was loaded.

Let's also try using the command BCDBOOT. This is a tool that is used to create a system partition or restore the boot environment located on the system partition. The system partition is created by copying a small set of boot environment files from an installed Windows® image. Means BCDBOOT creates a boot configuration data store ( BCD) on the system partition with a new boot entry that allows you to boot the installed Windows image.