Everyone knows that Windows 10, like its predecessors, “flies” at the most inopportune moment. In theory, the built-in automated system rollback tool to the last operational state should work. But the problem is that it does not always work. And in order not to reinstall the system, you have to use system recovery via the command line (Windows 10 is used or another version, it doesn’t matter). Next, a step-by-step description of the entire process will be presented using several basic methods.
Windows Auto and Manual Recovery Issues
So, for starters, consider why the automatic rollback tool does not work during critical failures (we are not talking about starting recovery from a working system now).
The main problem is that after an attempt to automatically roll back Windows to a previous state, which was recorded at one of the control points, is that damage to the system bootloader is not fixed at such points. That is why the same Windows 10, upon completion of the process, displays a message that the rollback failed and requires an immediate reboot, which, in general, does not give an effect and leads to the same result.
The same applies to installing the latest updates, which Microsoft turned out to be so incomplete that they "killed" a lot of computers around the world, and some started to experience a spontaneous reboot. Thus, restoring Windows 10 through the command line is almost the last and only solution that will allow the system to be reanimated. Many users know about the applied actions only by hearsay, and some are even afraid to use the command console. These instructions will help fill this gap.
Restoring the Windows system through the command line: what is needed for this?
But let's see what tools are needed to roll back. Since Windows does not boot in stationary mode, you need to start at least somehow to access the command console. But how?
For this, removable media with recovery or installation distributions recorded on them (optical disks, flash drives, etc.) are used. Thus, you need to have such a carrier in stock. If it is not there, you can create a bootable USB flash drive or disk quite simply on another computer terminal using the “Recovery Center” section in the standard “Control Panel” or a third-party software package.
Preliminary Actions
Now for recovery through the command line of the Windows system - 7 or another modification - you need to enter the command console.
To do this, in the BIOS settings, the removable device is set first in the boot priority, and after the boot menu appears, in order not to look for the command line start point for a long time, the key combination Shift + F10 is used.
Now the first thing you need to look at exactly which section is the system. The fact is that when starting from removable media, the letters of disks and partitions may not be displayed, but instead numbers are used. At the command prompt, type diskpart and list volume. After completing the second line, you should remember the system partition, and to exit, register the exit command.
How to start system recovery through the command line?
Now you can start the rollback procedure. As a rule, only one operating system is installed on user terminals, therefore, to activate the process, just enter the bcdboot c: \ windows command .
If two systems are installed on the computer in different partitions, you can run the command twice, but do not forget to specify the volume in which each of the systems is installed.
Note: this command is not applicable for WindowsXP and may not work in some builds of Windows 7.
Alternative recovery method
Restoring Windows 10 through the command line can be done in another, no less effective way, which, however, will take more time, but it works almost always.
Again, enter the system partition definition commands and find the hidden FAT32 partition in the list (for primary UEFI systems and GPT partitions, its volume will be up to 300 MB, for MBR in combination with BIOS - about 500 MB). As before, remember the letter or section number.
Now, to start system recovery via the command line, you need to enter the following commands in a strictly defined sequence (we assume that our section is marked with the letter N):
- select volume N (select a section);
- format fs = ntfs (format the partition to the desired file system);
- assign letter = Z (set a new letter for the hidden section - it can be specified as desired);
- exit
- bcdboot C: \ Windows / s Z: / f ALL (install the boot from the system partition, taking into account the hidden);
- diskpart
- list volume;
- select volume N (select a previously renamed section);
- remove letter = Z (remove that it does not appear on the system after restart);
- exit (exit the console).
After that, you can remove the removable device and perform a complete reboot. In theory, the restart should go without problems.
Bootloader recovery: checking system files
However, this approach may not work if the bootloader, boot entries and sectors are damaged. Restoring Windows 10 through the command line in this situation will have to start a little differently.
In this case, the process involves checking system files and restoring boot records, and if not possible, overwriting them completely.
At the command prompt, after booting from removable media, as described above, the sfc / scannow command is entered.
Actions with boot records and sectors
After its full implementation, you should check the start of the system in normal mode. If the result is zero, you should use the bootrec.exe tool, for which the fixmbr and fixboot commands are first entered through the space and the right slash.
Again, after completing them, you should check the download in normal mode. In the case of a null result, the rebuildbcd line is written for this tool. As a rule, after entering such a line, loading of the operating system resumes. By the way, this is a universal method, and recovery through the XP system command line can also be performed using this toolkit.
Recovery through the DISM module
Finally, there is another way to check and rollback, which uses recovery from the image. In this case, we are talking about the DISM tool (CheckHealth or RestoreHealth).
You can use it in two ways: you can just run a check, after which a rollback will follow, or you can set recovery right away. In the same way, you can use two commands sequentially, if, for example, the first result does not give. However, it is worth considering that this process of checking and restoring system files should be applied only if the SFC tool did not work. If the process stops by about 20%, you can simply reboot the system and use SFC again, which will replace the damaged system files with new ones. In general, this toolkit is considered to be the most extreme tool when nothing helps at all, although with very severe damage to Windows it may not give the desired effect.
A few words in the end
Only the question remains of which method to use to restore Windows 10 through the command line. In principle, there is not much difference between them, but you should only start checking or restoring system files if you cannot use the first two options described. But it also happens that with critical changes it is impossible to roll back. In such a situation, nothing but a complete reinstallation of the OS remains.