Win 7 boot recovery. How to use the command line to troubleshoot boot entries

Often to restore performance operating system  it takes just a couple of simple steps that take minutes. But instead of saving a lot of time and effort, the user begins the process of reinstalling the system. Accordingly, this leads to the installation of drivers and all programs. There is even a whole cohort of people whose main occupation for a PC is to reinstall Windows. And if you just need to work and you need to quickly restore your PC? Then this article will come in handy. After all, Windows developers have provided a convenient tool - the recovery console. Anyone who is not afraid of the times of PC DOS 7.0 can cope with this task. Just arm yourself with a regular distribution from windows series  2000 / XP / Vista / 7 - and for the cause. through command line  not be difficult. We boot from the distribution disk and wait for the stage when it will be offered to press the "R" key. We select the installation of the system into which we must go, and drive in the password of the system administrator; if you did not ask it during the previous installation, then it is empty. Consider typical malfunctionsallowing through the command line.

1. Damaged by malware software boot sector  system HDD.

Perhaps one of the easiest options for the problem. Just download from the distribution kit and in the console we type in only 2 commands - fixboot and fixmbr.
In addition, often there is a problem in the missing ntldr and ntdetect.com files, they must be mandatory. They can be found on the distribution in the i386 folder. Copy them to the C: \\ drive

2. Missing in the root of the drive C: \\ boot.ini file

Just run the bootcgf command with the rebuild key, adding the found operating systems to this file. System recovery through the command line is just basic. Each advanced user is able to carry out this action.

3. The system board was reinstalled, and the system after this procedure does not boot, issuing a BSOD with a code ending in 7B

If you don’t have a more convenient tool at hand (say, ERD Commander), you can only get by with the recovery console. We get the list of services with the LISTSVC command, and with the ENABLE command we enable the system startup of the services amdide, amdsata, amdxata, atapi, intelide, msahci, pciide. This activates the loading of standard drivers and allows you to start old system  based on new equipment.

4. Installing the incorrect driver or service (malware) has led to the system being unable to boot.

Most often, you can simply limit yourself to the backup of the previous recovery point, but it happens when there is simply no recovery point and the corresponding service is disabled. Then you need to go into the recovery console and type the command LISTSVC - a list of all the services present in the registry. Thus, we will find out the name of the faulty driver we need. After all, it happens that you can install an incorrectly written device driver and you may need to restore the system through the command line. Disable the DISABLE command "ServiceName". It should be remembered that often malicious software spoofs a system driver, for example tcpip.sys or a network card driver (ndis.sys), and often without loss of functionality! Then you should rewrite the original file to the root of the C: \\ drive and compare it with the size of the impostor. If they do not match, feel free to replace them with the "copy" command in the C: \\ windows \\ system32 \\ drivers directory.

5. Corrupted registry hive file

Symptoms of the problem are as follows - you see where the system kernel reports that SYSTEM / SOFTWARE is missing or damaged. Perhaps this is the worst problem, if not backup  the registry. Moreover, if the problem affected SOFTWARE, then it is necessary to restore all registry entries related to - that is, in fact, reinstall the system. A more optimistic scenario is corrupted SYSTEM. Just type the command in the recovery console:

cd repair
copy SYSTEM C: \\ windows \\ system32 \\ config

We reboot and wait until the system finds all the devices. You have to manually "show" the system where the driver files are located (C: \\ windows \\ system32 \\ drivers).

Here are the main problems and solutions, if you decide to restore the system from the command line. Of course, there are other, more complex problems or their combinations, but they can also be overcome, since the tools allow. You can also use specialized software Hiren's Boot CD and ERD Commander, which have in their arsenal much large quantity powerful specialized utilities, as well as their numerous clones, but the recovery console is the basis that you need to be able to use a service engineer or an experienced user. After all, system restore using the command line gives a much faster result.

Built in Windows tool  System Restore allows you to fix most computer problems. However, very often problems have to be solved manually, for example, when the operating system does not boot. In these cases, you can use a utility called Bootrec.exe. It can help with troubleshooting and correcting data such as the master boot record (MBR), the boot sector, or the boot configuration file (BCD).

Regardless of whether you use Windows 7 or Windows 8.1, if your operating system does not boot, and recovery at boot cannot overcome this problem, you should try Bootrec.exe.

Work with this tool is carried out through the command line. However, since you have problems loading the operating system, it is obvious that you will not be able to run Bootrec.exe directly on Windows.

If you have Windows 7, then you need to boot using the installation media or system recovery disk.

To boot from a DVD or USB drive, the corresponding device must be the first device in the section « FirstBootDevice »  in the BIOS. Depending on the manufacturer motherboard  and BIOS versions, this section may be called somewhat differently.

If the boot process with installation disk  was successful, select your preferred language and click "Next". In the next window, click on the "System Restore" link.


Then select the operating system you want to restore. This is an important step when you have several operating systems installed and only one is damaged. Click Next to continue.

In the window that opens, you will see all the system recovery options, but in this case we are only interested in the command line.


If you do not have an installation windows drive  7 or system recovery disk, you can access the system recovery options using the hidden recovery partition, which Windows 7 automatically creates during the installation of the operating system. For information on how to do this, see the "How to Run System Restore Using Advanced Boot Options in Windows 7" section.

If you are using Windows 8 or Windows 8.1, follow the steps in the third, fourth, or fifth sections of this guide:. Depending on the method you have chosen to boot your system, you can run the command line either from additional parameters or from the safe mode interface.


Now that the command line is running, type the command and press Enter to see all the options that are available for this tool. As the screenshot below suggests, there are four options: / FixMbr, / FixBoot, / ScanOs  and / RebuildBcd.


Later in this article, I will explain how each of these options can help you solve download problems. Bootrec.exe can help solve most problems, but it does not guarantee success in all scenarios, so keep that in mind.

How to restore Master Boot Record (MBR)

The first parameter to Bootrec.exe is / FixMbr. It allows you to repair damaged Master Boot Record (MBR). Master Boot Record is the first sector of the disk, and it tells the BIOS where to look for the operating system on the computer.

Typically, this option should be used when you encounter one of these error messages: “Operating system not found”, “Error loading operating system”, “Missing operating system” (“Missing operating system”)  or “Invalid partition table”.

To start the MBR recovery process, run the command bootrec.exe / fixmbr.


How to write a new boot sector

The / FixBoot option writes the new boot sector to the system partition. The tool will use a boot sector that is compatible with your version of Windows. Using this option can help in the following situations:

  • the boot sector has been replaced with non-standard for Windows Vista, 7, 8 or 8.1 boot sector;
  • boot sector is damaged;
  • after installing your operating system, an earlier version of Windows was installed.

To write a new boot sector, use the command bootrec.exe / fixboot.


How to recover boot configuration data (BCD)

Boot Configuration Data (BCD) contains a detailed list of what should be loaded at system startup. Microsoft indicates that a download error may also be caused by missing or damaged files in the BCD. The / rebuildbcd option can be very useful when you need to fix errors by full recovery  BCD

To fully restore Boot Configuration Data, run the following command: bootrec.exe / rebuildbcd.


How to add missing Windows installations to boot configuration data

If several operating systems are installed on your computer, but not all of them are available, use the / ScanOS option (command bootrec.exe / scanos), so that bootrec.exe “scratches through” all disks for any installed versions  Windows that are not included in the boot configuration data (BCD).

In the screenshot below, you can see what this scanning process looks like.


If the bootrec.exe / scanos command returns the results, you can continue the recovery process to return the “lost” Windows installation back to the secure BCD table, making it bootable again.

First, you have to clear Master Boot Record (MBR) with bootrec / fixmbr. Then enter bootsect.exe / nt60 all / force  and press Enter. Parameter / nt60  Applies basic boot code compatible with BOOTMGR. Parameter / all  updates the main boot code on all partitions. The / force switch forces volume (s) to be disabled during boot code update.


By completing all these commands, you will create a new master boot record (MBR) that will use the correct windows bootloader  to run this particular operating system from your disk.

If you have any questions, feel free to leave comments.

Have a great day!

Fix tools windows errors  constantly improving, offering users more and more automated solutions to quickly fix various problems. If connected to a computer installation media  and in the "System Restore" section, select "Startup Recovery", then you can fix many errors that interfere launch windows. However, if the bootloader is damaged, this method will not work, so if you encounter such a problem, you will have to produce mBR recovery  through the command line.

Launch command line

You will need boot disk  with the distribution of the same system that is installed on the computer. Not only the version should coincide, but also the bit depth of Windows, otherwise the restore will fail.

After opening the list of available tools, first perform a startup error correction. If the boot loader corruption problem cannot be resolved, return to the list of tools again and select the command line.

Bootrec Utility

To overwrite MBR (data required for windows downloads) and bootloader bug fixes we will use the built-in Windows utility. Type “bootrec” in the interpreter window. After starting this utility, a list of supported commands will appear - execute them in order.



Reboot the computer. The bootloader recovery was completed, the MBR was overwritten, so Windows should start without problems. If rewriting the MBR did not resolve the startup problem, try applying the remaining two commands:



The utility will start scanning hard drivetrying 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 the computer. Overwriting MBR is no longer necessary - Windows will start without errors.

BCDboot Utility

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

Open a command prompt and enter “bcdboot.exe e: \\ windows” (attributes are optional). Instead of "E:" you need to put the letter of the section on which are stored windows files. If in Windows this section is indicated by the letter “C”, then here it may appear as “D” - consider this when executing the command.

Recovery command line windows systems  7 is available to users at any time of the day or night, the main thing is that the user has a wild desire to organize the work of Windows and administrator rights! Starting system recovery from the command windows strings  7 is quite simple, so do not be afraid to learn something new. Just in case, I suggest recalling what “this thing” is for and what it is eaten with?

Usually, “resuscitation” is required if your Windows behaves inappropriately - it hangs, it works incorrectly and so on. By themselves, such problems do not arise; there is always a root cause. And here you can mention either the installation of a crooked driver, or an unsuccessful system update, or the appearance due to which the computer is wildly slow. Thus, recovery is the process of rolling back all major changes in the system that have occurred over a specified period of time. Changes will only affect system files  and registry entries. Everything is quite simple and very effective.

Today we will get acquainted with the command line and the corresponding method of work.

What is a command line?

Without diving into space terminology, I’ll simply say that CMD is a classic and always lively interface in Windows of any version. It is intended for simple interaction between a computer and a person. Unlike the usual “guide”, a small window is available here, where you need to drive individual teams. Each team is one action. Why are we going to look at launching system recovery today from the Windows 7 command prompt?

If you cannot load the OS through safe mode or if you cannot start the explorer, then the command line comes to the rescue. It is important to remember that the user must be endowed with administrator rightsotherwise, our mission will fail!

Work algorithm

So, imagine a simple situation - Windows does not load at all, so the standard version of actions through the "Start" will not work. We resort to a well-known technique called "Safe Mode".


Turn on the power of the computer, then hard press the F8 key. This is necessary to go to the start menu.

As soon as the boot menu above appears, select "Safe Mode" with command line support. After a while, the Windows 7 System Restore command line will open.


After that we enter the rstrui.exe command, then we press the Enter button. Then the familiar recovery window opens, where all further steps should be familiar. Just in case, remember them in order.

At the first stage we do nothing, immediately click “Next”.


Then we get to the display, which shows all the backup points created by the system automatically. We select the desired one, it is desirable that it be the earliest, and then click "Next".


The last window is something like the last confirmation of recovery.


Click "Finish." After that, the very long-awaited process will begin, about which there is so much noise. As soon as this utility finishes its work, a message about successful recovery will appear. (after rebooting the system)

How else can you “reanimate” through CMD?

It is unlikely, of course, but there were still cases when the command line also failed in safe mode. Especially for such cases, you can use the "System Restore Disk." The people also called him the emergency disk. If you don’t know how to create it, or if you don’t have one yet,

We turn on the computer and do the computer boot using this drive itself. Read more about this

Then, as soon as the “preinstallation” of Windows starts, select the appropriate item, as in the following screenshot.


After you will see the emergency menu recovery Utilities". At the very bottom is what we need - access to the command line.


CMD opens, then we perform all the actions, as in the case with safe mode. The final result will be shown after the computer reboots.

Conclusion

Windows 7 system restore via command line went well! As you can see, there are several simple ways  run CMD and act through it. By the way, if you don’t have " emergency disk", You can use plain disk  with a Windows image. Just not, but select "Recovery." Have a good work!