kancboom.ru

How to make a hidden partition on a laptop (computer) to restore Windows. AOMEI OneKey Recovery - create a partition for system recovery How to create a recovery partition

So, you have finished installing the operating system, drivers, updates and programs, checked its performance and stability, were satisfied with the result obtained and want to be able to “roll back” to this system state in case of unforeseen circumstances. Windows 7 is equipped with fairly powerful backup tools that can reduce the time it takes to restore the system. Those who have bought new computers with Windows 7 pre-installed are familiar with the restore function, after which the operating system, and sometimes the contents of the entire hard drive, is returned to its factory state. In this case, user files located on the hard drive may be lost.
If you have an installation disk with the operating system, you are spared from such losses (How to reinstall Windows 7, saving settings and installed programs), but subsequent installation of drivers and updates is inevitable. I offer you a method that will significantly reduce the time spent setting up the system after reinstallation; moreover, it does not require an installation disk. The article uses materials from Vadim Sterkin’s blog and a video report by Valery Volobuev Setting up the Windows Recovery Environment in Windows 7. The algorithm described below does not require specific knowledge and is relatively easy to implement for a home user. We will perform the task in the following order:
  • prepare a partition for the future recovery partition;
  • create a system image in the Windows RE environment;
  • configure the recovery environment;
  • Let's reinstall and reconfigure the recovery environment.

Preparing the recovery partition

First of all, we need to create a partition on which we will subsequently place the operating system image file, as well as the file for deploying the recovery environment. There are many ways to perform this operation, I will use standard tools: Disk Management and the command line utility DISKPART. You can read about this in the article “Disk Management in Windows Vista and Windows 7”. We will determine the partition size based on the current occupancy of the partition with the operating system and the availability of free space. For example, if the system takes up about 20 gigabytes, the optimal size would be from 5 to 10 gigabytes. In my example, the section D:\ was first compressed

Figure 1 – compression of partition D:\

Then in the resulting unmarked area

Figure 2 – unallocated disk space after compression

Using the utility DISKPART a primary partition was created, formatted, and a label was assigned to it Recovery and letter R. (DISKPART was used due to the fact that using Disk Management, the fourth partition created will be an additional one. You can experiment with placing the recovery partition on an additional partition.) Run sequentially:
::Start DISKPART
Diskpart

Sel disk 0
::Creating a primary partition on the entire unallocated area of ​​the disk. If necessary, specify the partition number using the LIST PART command
Create partition primary
::Quick formatting of the created partition and assigning the “Recovery” label to it
Format LABEL=”Recovery” quick
::Assigning the letter R to a section:
Assign letter=R
::Stopping DISKPART
Exit

Figure 3 – work in DISKPART

Here and in what follows, we will work in a command line launched with administrator rights. Before moving on to capturing an operating system image, create a R:\ folder WinRE for storing it.

Figure 4 – WinRE folder at the root of the future recovery partition.

Creating an operating system image

First of all, study the article “Creating a customized operating system image”. It describes the principles and tools, namely the utility imagex.exe, part of the Windows AIK. Depending on the bitness of the system, you must use the appropriate version of this utility. I have posted both versions of them on the section D:\ in folder WAIKTools.

Figure 5 – WAIK Tools folder on a non-system partition

I also strongly recommend Vadim Sterkin’s article for review and guidance: “How to quickly determine drive letters in the recovery environment or Windows PE.” This knowledge will help us not to make mistakes in the command syntax for capturing an operating system image. Restart your computer and enter the recovery environment (to do this, press F8 after turning on your computer and select "Troubleshoot your computer" from the advanced boot options menu).

After downloading, launch the command line and text editor: notepad Using the “Open” menu (Ctrl + O) determine the partition letters. In my example, as can be seen from Figure 7, the system section received the letter D:\ , utility imagex.exe is in the folder E:\WAIKTools\ , and the section Recovery– letter F:\ .

Figure 7 – partition letters in the WindowsRE environment

One note: since we will not need to transfer the customized image to another computer, we will use the command given in the “Boot to Windows PE and save the image using the ImageX utility” section of the above article.
Run the command:

"E:\WAIK Tools\amd64\imagex.exe" /capture D: F:\WinRE\install.wim "Windows 7 Ultimate SP1 Custom"

Necessary clarifications:

  • "E:\WAIK Tools\amd64\imagex.exe" - Path to the imagex.exe utility. Quotes are used to avoid problems with spaces in the folder name.
  • /capture D: - The key indicates the capture of the system image located on the D: partition (as seen in WindowsRE).
  • F:\WinRE\install.wim "Windows 7 Ultimate SP1 Custom" - Saving the captured image to the install.wim file (this is important, since in this case only this name is valid) in the F:\WinRE folder. A file comment is specified, and the default compression method is used (compress maximum).

Figure 8 - creating an operating system image in the Windows RE environment

Quit WindowsRE and reboot. Let's move on to the final stage of creating a recovery partition.

Setting up the recovery environment.

In addition to the operating system image file, I decided to place a file on the new partition that would boot into the recovery environment. With this arrangement, it will not depend on the partition with the operating system. As you know, the recovery environment is deployed from an image file WinRE.wim located in the folder Recovery at the root of the system partition. Access to this folder is blocked through Windows Explorer. The file attribute is hidden system. How to place the file in the location we choose?
Let's use command line utilities. First, disable the recovery environment. Please note that Any actions with the recovery environment must be preceded by disabling it! To do this, on the command line run

Reagentс /disable

After running this command the file WinRE.wim will move to the folder c:\Windows\System32\Recovery. From it we will copy the file to the folder R:\WinRE.
Use the command xcopy with key / h:

xcopy /h c:\Windows\System32\Recovery\winre.wim r:\WinRE

Figure 9 – copying the WinRE.wim file

And finally, a few final chords:

/ path ) to the system image file located in the folder specified by the key/ target
Reagentc /setosimage /path R:\WinRE /target c:\Windows
::Set custom path (key/ path ) to the system recovery environment deployment file located in the folder specified by the key/ target
Reagentc /setreimage /path R:\WinRE /target c:\Windows
::Enabling the recovery environment
Reagentc /enable
::Checking recovery environment settings
Reagentc/info

As can be seen from Figure 10, the setup was successful. Do not close the window - the command line will still be needed.

Figure 10 – setting up a custom recovery environment.

It will be interesting to see what changes have taken place in the section Recovery. To do this, enable the display of hidden and system files.

Figure 11 – changing the contents of the R section.

As you can see, the file WinRE.wim in folder WinRE no, but a folder appeared Recovery at the root of the section. Believe me, the file is now in it. I will not dwell on the structure of the Recovery folder - if you wish, you can study its contents, and also compare with the BCD parameters (using the command bcdedit /enum all). All that remains is to protect the section from accidental impact from users. To do this, you need to hide it from Explorer and exclude the ability to work with it in Disk Management. The utility will help us with this again Diskpart. On the command line, run sequentially (the disk and partition numbers correspond to the configuration given in the article):

::Start DISKPART
Diskpart
::Disk selection. If there are several of them, then the number of the required disk is determined by the LIST DISK command
Sel disk 0
::Selecting a section. If necessary, specify the partition number using the LIST PART command
Sel part 4
::Deleting a letter - the partition will be hidden in Windows Explorer
Remove
::Setting the section IDID=27.This ID is set specifically for recovery partitions. It becomes impossible to work with such a partition in Disk Management, which provides additional protection for it
Set id=27

Figure 12 - working with the recovery partition in DISKPART

Changes that have occurred in the system

Firstly, the partition is not visible in Windows Explorer, and it does not have a context menu in Disk Management.

Figure 13 – Explorer and Disk Management Manager.

Secondly, in the Advanced Recovery Methods window in the description of reinstalling Windows, there is no requirement to have an installation disk.

Figure 14 – Windows advanced recovery methods menu.

Thirdly, the recovery environment menu has changed:

Figure 15 – additional menu item in Windows recovery options in the recovery environment

This could have been the end of it. But there is a need to dwell on several nuances that arise after reinstalling the system in this manner. I will reinstall the system from the recovery environment.

Setting up a recovery environment after reinstalling the system

For the purity of the experiment, I will format the partition with the system and the partition with the download files. Moreover, I strongly recommend formatting the “System Reserved” section to avoid confusion with loading in the future.

Figure 16 – formatting partitions in the WindowsRE environment.

No user participation is required during the reinstallation process. You will receive a system identical to the one you had at the time you took the image.

Figure 17 – beginning of system reinstallation.

The only thing is that after reinstalling you need to make a few changes:

  1. Due to a complete rebuild of the BCD, the recovery environment must be reconfigured.
  2. hide section in explorer Recovery.
Disable the recovery environment with the command

Reagentc /disable

Turn on display of hidden and system files, open the folder WinRE on the section R:\ and make sure the file exists Winre.wim. If necessary, copy it from the folder Windows\System32\Recovery or from a folder R:\Recovery\xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. After that delete the folder Recovery on the section R:\ .

Figure 18

Then enable the recovery environment: Reagentc /enable Make sure the settings are correct (note that the name of the folder where the WinRE.wim file is located in the Recovery folder is different. Therefore, before connecting the recovery environment, you can safely delete the old one.):

Reagentc/info

Figure 19 – connecting the recovery environment after reinstallation.

Remove the letter from the partition R:\

Diskpart
Sel disk 0
Sel part 4
Remove
Exit

Your computer is ready for a fresh reinstallation. One final note. While performing numerous reinstallations while preparing this article, I noticed the appearance of an incomprehensible folder in the list of available drives on the “System Protection” tab. This may be due to the missing folder in the system image SystemVolumeInformation or changing section IDs.

Figure 20 – phantom partition in the list of available disks on the “System Protection” tab.

To get rid of the strange folder, disable system protection on this phantom partition and enable it on the partition with the current system.

Conclusion

There are probably easier ways to make reservations, especially using different programs. I don’t pretend that you will definitely use the method described above, but I think it’s convenient and practical. Of course, the system will be updated over time. To keep the image up to date, periodically rewrite the file in Windows RE Install.wim.

If you have successfully completed the installation of the OS, updates, necessary drivers and programs, checked the performance and stability, are satisfied with the result obtained and want to be able to “roll back” the OS to this state if necessary.

It has powerful backup tools that reduce the time required to restore the system.

It should be clarified that those who bought new computers with Windows 7 pre-installed are familiar with the recovery function, after which the system, and perhaps the contents of the entire hard drive, returns to its factory state. But in this case, user files located on the hard drive may be lost.

By having an installation disk with the OS available, you avoid such losses, but the next installation of updates and drivers is inevitable.

There is a method that will significantly reduce the time spent setting up the OS after reinstallation, and it will not require an installation disk.

The algorithm described below does not require special knowledge and is relatively easy to implement for users. Work order:

  • preparing a partition for a future recovery partition;
  • creating a system image in Windows RE;
  • setting up the recovery environment;
  • reinstallation and new setup of the recovery environment.

Preparing the recovery partition

First of all, we create a partition on which we will place the OS image file and the file for deploying the recovery environment.

There are many ways to perform the operation, but we will use standard tools: Disk Management and the command line utility DISKPART.

The partition size is determined based on the current occupancy of the OS partition and the availability of free space. For example, if the system takes up approximately 20 GB, a size of 5 to 10 GB is considered optimal.

In the example section D:\ was first compressed:

Figure 1 – compression of partition D:\

Figure 2 – unallocated disk space after compression

Using the utility DISKPART a primary partition was created, formatted, and a label was assigned to it Recovery and letter R. (DISKPART was used because Disk Management will make the fourth partition created be a secondary partition. You can experiment a little with placing the recovery partition on a secondary partition.

We do the following sequentially:

::Start DISKPART Diskpart::Select a disk. If there are several of them, then the number of the required disk is determined by the command LIST DISK Sel disk 0:: Creates a primary partition on the entire unallocated area of ​​the disk. If necessary, specify the partition number using the LIST PART Create partition primary::Quick formatting of the created partition and assigning it the “Recovery” label Format LABEL=”Recovery” quik::Assigning the letter R to the partition Assign letter=R::Completing work in DISKPART Exit

Figure 3 – work in DISKPART

We will use the command line, launched with administrator rights.

Before moving on to capturing an OS image, you need to create a R:\ folder WinRE for storage.

Figure 4 – WinRE folder at the root of the future recovery partition.

Creating an OS image

The version of the utility that needs to be used depends on the bitness of the system. In the example, both versions are placed on the section D:\ in folder WAIK Tools:

Figure 5 – WAIK Tools folder on a non-system partition

We restart the computer and enter the recovery environment (to do this, press F8 after turning on the computer and select “Troubleshoot computer problems” in the menu of additional boot options).

Launch the command line and text editor:

Using the “Open” menu (key combination Ctrl + O) we determine the letters of the sections.

In the example, as can be seen from Figure 7, the section with the system received the letter D:\, utility imagex.exe is in the folder E:\WAIK Tools\, and the section Recovery– letter F:\.

Figure 7 – partition letters in the WindowsRE environment.

Since we do not need to transfer the configured image to another computer, we will use the command given in the section “Loading into Windows PE and saving the image using the ImageX utility” and. Now we run the command:

"E:\WAIK Tools\amd64\imagex.exe" /capture D: F:\WinRE\install.wim "Windows 7 Ultimate SP1 Custom"

Explanations:

  • "E:\WAIK Tools\amd64\imagex.exe"- Path to the imagex.exe utility. Quotes are used to avoid problems with spaces in the folder name.
  • /capture D:- The key indicates capturing the system image on the D: partition (as seen in WindowsRE).
  • F:\WinRE\install.wim "Windows 7 Ultimate"SP1Custom"- Saving the captured image to the install.wim file (this is important, since in this case only this name is valid) in the F:\WinRE folder. A file comment is specified, and the default compression method is used (compress maximum).

Figure 8 - creating an operating system image in the Windows RE environment

Having finished working in the WindowsRE environment, we reboot.

Setting up the recovery environment.

In addition to the OS image file, we will place a file on the new partition that allows loading into the recovery environment. With this arrangement, it will not depend on the OS partition.

It is known that the recovery environment is deployed from an image file WinRE.wim which is in the folder Recovery at the root of the system partition. Using Windows Explorer - access to this folder is blocked. The file attribute is hidden system. To place the file in the location of our choice, we will use command line utilities.

First of all, disable the recovery environment. Attention!!! L Any actions with the recovery environment must be preceded by disabling it! To do this, run on the command line:

Reagentс /disable

After this the file WinRE.wim will move to the folder c:\Windows\System 32\Recovery . From it we will copy the file to the folder R:\WinRE. Use the command xcopy with key /h:

Xcopy /h c:\Windows\System32\Recovery\winre.wim r:\WinRE

Figure 9 – copying the WinRE.wim file

Finally, a few final chords:

::Set custom path (key /path) to the system image file located in the folder specified by the key /target Reagentc /setosimage /path R:\WinRE /target c:\Windows::Setting a custom path (key /path) to the system recovery environment deployment file located in the folder specified by the key /target Reagentc /setreimage /path R:\WinRE /target c:\Windows::Enable the recovery environment Reagentc /enable::Check the recovery environment settings Reagentc /info

From Figure 10 you can see that the setup was successful. You will still need the command line window.

Figure 10 – setting up a custom recovery environment.

On the section Recovery changes have occurred. To track them, turn on the display of hidden and system files.

Figure 11 – changing the contents of the R section.

File WinRE.wim in folder WinRE no, but a folder appeared Recovery at the root of the section. The file is now there. We will not dwell on the structure of the Recovery folder - if you wish, you can study its contents and also compare it with the BCD parameters (using the bcdedit / enum all command).

It is necessary to protect the section from accidental impact from users. Therefore, it is better to hide it from Explorer and exclude the possibility of working with it in Disk Management. And the utility will help again Diskpart. On the command line, run sequentially (the disk and partition numbers correspond to the configuration given in the article):

::Start DISKPART Diskpart::Select a disk. If there are several of them, then the number of the required disk is determined by the command LIST DISK Sel disk 0:: Select a partition. If necessary, specify the partition number using the command LIST PART Sel part 4::Removing a letter - the partition will be hidden in Windows Explorer Remove::Setting the partition identifier ID=27. This ID is set specifically for recovery partitions. It becomes impossible to work with such a partition in Disk Management, which provides additional protection for it Set id=27

Figure 12 - working with the recovery partition in DISKPART

Changes that have occurred in the system

Figure 13 – Explorer and Disk Management Manager.

We see that now in the Advanced Recovery Methods window in the description of reinstalling Windows there is no requirement to have an installation disk.

Figure 14 – Windows advanced recovery methods menu.

The recovery environment menu has also undergone changes:

Figure 15 – additional menu item in Windows recovery options in the recovery environment

We could end the article here, but there is a need to dwell on several nuances that arise after reinstalling the OS using the indicated method. Let's reinstall the system from the recovery environment.

Setting up a recovery environment after reinstalling the system

Let's conduct an experiment. For the purity of the result, I will format the partition with the system and the partition with the download files. Moreover, I strongly recommend formatting the “System Reserved” section to avoid confusion with loading.

AHTUNG!!! ANON DON'T BE SURPRISED THAT YOU DON'T FIND P.4 (POINT FOUR) IN OUR ARTICLES - WE DON'T WRITE IT ON FUNDAMENTAL, BUT WE'RE SUPSTITIVE...

It sometimes happens that N number of devices with Win7 fall into your hands. And they need to have a recovery partition.
Initially, many laptops/netbooks with an OS pre-installed from the store have such partitions, and there is even special software from the manufacturer that performs backup and rollback by pressing just one functional “hot key”.
However, it is not uncommon to have to “collectively farm” and make a similar decision in the manner described below. Because If you have the same installation flash drive, the implementation has a right to life.

As you know, it is advisable to create such partitions after installing the operating system and installing all the drivers necessary for its operation, as well as the necessary software.
So, for the sake of understanding and at least some systematization of anon’s actions, let’s break everything down point by point:
1. To create the treasured recovery partition, you need to create a separate partition on your hard drive. Even the forgotten partition-magic, or the popular Acronis, is suitable for this. Taking into account the typicality of the situation that you can guess, we will do this using standard Wi(shi)ndows tools. So, through the workbench, go to the “Management” menu (to do this, right-click (right mouse button) on the “Computer” icon - then “Management”). Next, go to “Disk Management”. Again, right-click on the hard drive that we want to use for partitioning to store our image, click “Shrink Volume”.

2. Pay attention to the “Size of compressed space (MB)” field; here you need to indicate the size of the future partition for recovery. Its volume should be calculated from the current occupied OS space on your OS partition. Those. If now “Winda” takes up, for example, 15 GB, then don’t be a redneck, set aside about 16 GB for it in recovery. In the example, the size is approximately 20GB, because someone got greedy (it happens). Next, click “Compress”.

3. Right-click on the newly created partition and select “Create simple volume”.

5. Continuing the setup wizard, click “Next” as often as almost always.

6. You can assign any letter, but we’ll write “R”, because it’s recovery, damn. And enter the same name for the volume label.

7. Done!

8. Thus, the recovery partition was created on the hard drive, now you need to make a system image. Go to “Start” - “Control Panel” - “System Backup and Restore”

9. Click on “Create a system image”

10. Select our partition that we prepared for the recovery image in the window that opens.

11. Follow the steps of the wizard and click “Archive”

12. We are waiting for this slow process to complete, or we are going to drink tea/coffee.

13. Once the process is complete, you will be asked to create a recovery disc using DVD-R media. If you want, then go ahead, but in this case there is no point in doing it. Yes, and you can restore it through the same media from which you installed your miracle build by selecting “Recovery” in the process.

The simplest answer to the question of what AOMEI OneKey Recovery is is a program for creating files to restore the system and return it to the parameters that it did not have at the time the files were created. This is a necessary function when it is necessary to restore a hard drive partition in the event of a system failure, frequent errors that cannot be resolved otherwise, etc. That is, this is some alternative to reinstalling the OS in case of irreparable violations in its operation.
System recovery is possible using a program with AOMEI OneKey Recovery

Creating a recovery partition

Creating a recovery partition should not be done when the system has been actively used for a long time. Because in this case, a lot of unnecessary and disposable software is already installed in it, and viruses, spyware and the like could also get into it. The ideal time for this is the period when a clean and complete reinstallation of the system has occurred. However, the system restored from such a save is not particularly functional, and therefore after reinstallation it is worth installing the necessary firewood and a minimum of important applications. Then generate a windows recovery partition. Thus, if a difficult situation arises, you will restore the system to its “clean” working state without unnecessary software and files.

To create a hidden recovery partition on your PC hard drive, follow these steps:

  • Allocate space on your hard drive for saving. This must be done before starting the program. To do this, press Win+R and enter diskmgmt msc in the field that opens. Press Enter. The Hard Media Management console will open;
Right-click on the last volume of Disk 0, as in the screenshot
  • In the drop-down menu, select Shrink volume to create a subspace for the recovery department;
  • Specify the amount to which you want to shrink the volume. This will be the volume of the future recovery storage. You need to specify a volume equal to that occupied by system files on drive C. In fact, the archive itself will be slightly smaller;
  • Confirm your choice and wait for the compression process to complete. Once a separate space has been allocated, you can proceed to the next steps.

All these points are required if you are going to create a hidden partition on your hard drive using onekey recovery. If you need an archive on external media, which can also be created using the program, then you can skip the above steps. The further algorithm must be repeated regardless of what medium you are going to record.

  • Enable Aomei onekey recovery;
  • In the menu that opens, select OneKey System Backup if you are placing data on a floppy or hard drive;
Fig.1. OneKey System Recover - if you need to restore the OS from a previously generated recovery storage (this function is launched not only from the software window, it can also be selected during boot)
  • To create a recovery archive, select the left button;
Fig.2. The program asks whether to create it on a hard drive or on external media
  • Choose what you need;
  • If you select a hard drive, a window with parameters will open;
Fig.3. You cannot configure it, so confirm your choice by clicking on Start Backup
  • If you are using an external drive, the screen will display less information, click Start Backup;
  • Wait until the files are created;
  • Restart your computer.

Depending on the parameters of the OS, PC, file size and future recovery archive, the creation process lasts from half an hour to an hour. A recovery section has now been created, which will allow you to return the OS to a working state without reinstallation.

Fig.4. Please note that when the computer boots, another item appears next to the standard options - Run AOMEI OneKey Recovery
  • When you click on it, you will begin system recovery. Moreover, it happens quickly.

To prevent this item from bothering you, remove it from the menu through the program or boot options. However, it is not advisable to get rid of it, because a situation may arise when logging into the OS is impossible without “rolling back” the OS. And when the item is not in the boot menu, it is only possible to restore the hard drive partition from the application. To remove it, boot into Windows and press Win+R. In the print field, type msconfig. Go to the Downloads tab and disable this feature. In addition, you can update or restore a hidden partition through the utility.

Features of the recovery system

The OneKey recovery system is freely available. You can download it from the developer’s official resource http://www.backup-utility.com/onekey-recovery.html. The advantages of this utility include ease of use. It is easy to install and even an inexperienced user can create a recovery storage with it. The operating speed is high compared to its closest competitors.

Another plus is versatility. Using the program, you can recover disk d or another from external media and from a hidden archive on a hard drive. Because the program creates the necessary archive both on removable media (flash drive or disk) and on local one (however, for this you will have to create additional storage on a hard drive).

You can perform a recovery using the utility both when the OS is running, from a running PC, and when booting, which is convenient when serious problems occur that make working on the PC impossible. The boot repair button is automatically built into the corresponding menu next to other options immediately after creating the repository. The rollback process is initiated by pressing button A while the computer is booting.

WATCH THE VIDEO

Now you know how to create a recovery partition.

Introduction

So, you have finished installing the operating system, drivers, updates and programs, checked its performance and stability, were satisfied with the result obtained and want to be able to “roll back” to this system state in case of unforeseen circumstances.

Windows 7 is equipped with fairly powerful backup tools that can reduce the time it takes to restore the system.

Those who have bought new computers with Windows 7 pre-installed are familiar with the restore function, after which the operating system, and sometimes the contents of the entire hard drive, is returned to its factory state. In this case, user files located on the hard drive may be lost.

If you have an installation disk with the operating system, you are spared from such losses (How to reinstall Windows 7, saving settings and installed programs), but subsequent installation of drivers and updates is inevitable.

I offer you a method that will significantly reduce the time spent setting up the system after reinstallation; moreover, it does not require an installation disk.

The article uses materials from Vadim Sterkin's blog and Valery Volobuev's video report Setting up the Windows Recovery Environment in Windows 7.

The algorithm described below does not require specific knowledge and is relatively easy to implement for a home user. We will perform the task in the following order:

  • prepare a partition for the future recovery partition;
  • create a system image in the Windows RE environment;
  • configure the recovery environment;
  • Let's reinstall and reconfigure the recovery environment.

Preparing the recovery partition

First of all, we need to create a partition on which we will subsequently place the operating system image file, as well as the file for deploying the recovery environment.

There are many ways to perform this operation, I will use standard tools: Disk Management and the command line utility DISKPART. You can read about this in the article.

We will determine the partition size based on the current occupancy of the partition with the operating system and the availability of free space. For example, if the system takes up about 20 gigabytes, the optimal size would be from 5 to 10 gigabytes.

In my example, the section D:\ was first compressed

Figure 1 - compression of partition D:\

then in the resulting unmarked area

Figure 2 - Unallocated disk space after compression

using the utility DISKPART a primary partition was created, formatted, and a label was assigned to it Recovery and letter R. (DISKPART was used because the fourth partition created by Disk Management will be an additional partition. You can experiment with placing the recovery partition on an additional partition.)

Run sequentially:

::Start DISKPART Diskpart::Select a disk. If there are several of them, then the number of the required disk is determined by the command LIST DISK Sel disk 0:: Creates a primary partition on the entire unallocated area of ​​the disk. If necessary, specify the partition number using the LIST PART Create partition primary::Quick formatting of the created partition and assigning it the “Recovery” label Format LABEL=”Recovery” quick::Assigning the letter R to the partition Assign letter=R::Completing work in DISKPART Exit

Figure 3 - work in DISKPART

Here and in what follows we will work on the command line.

Before moving on to capturing an operating system image, create a R:\ folder WinRE for storing it.

Figure 4 - WinRE folder in the root of the future recovery partition.

Creating an operating system image

Once downloaded, launch the command line and text editor:

Using the "Open" menu (keyboard shortcut Ctrl + O) define the partition letters.

In my example, as can be seen from Figure 7, the system section received the letter D:\, utility imagex.exe is in the folder E:\WAIK Tools\, and the section Recovery- letter F:\.

Figure 7 - partition letters in the WindowsRE environment.

One note: since we will not need to transfer the customized image to another computer, we will use the command given in the “Boot to Windows PE and save the image using the ImageX utility” section of the above article. Run the command:

"E:\WAIK Tools\amd64\imagex.exe" /capture D: F:\WinRE\install.wim "Windows 7 Ultimate SP1 Custom"

Necessary clarifications:

  • "E:\WAIK Tools\amd64\imagex.exe"- Path to the imagex.exe utility. Quotes are used to avoid problems with spaces in the folder name.
  • /capture D:- The key indicates the capture of the system image located on the D: partition (as seen in WindowsRE).
  • F:\WinRE\install.wim "Windows 7 Ultimate SP1 Custom"- Saving the captured image to the install.wim file (this is important, since in this case only this name is valid) in the F:\WinRE folder. A file comment is specified and the default compression method is used. For more information, see the TechNet knowledge base article ImageX Command Line Options

Figure 8 - creating an operating system image in the Windows RE environment

Quit WindowsRE and reboot. Let's move on to the final stage of creating a recovery partition.

Setting up the recovery environment.

In addition to the operating system image file, I decided to place a file on the new partition that would boot into the recovery environment. With this arrangement, it will not depend on the partition with the operating system.

As you know, the recovery environment is deployed from an image file WinRE.wim located in the folder Recovery at the root of the system partition. Access to this folder is blocked through Windows Explorer. The file attribute is hidden system. How to place the file in the location we choose? Let's use command line utilities.

First, disable the recovery environment. Please note that Any actions with the recovery environment must be preceded by disabling it! To do this, on the command line run

Reagentc /disable

After running this command the file WinRE.wim will move to the folder c:\Windows\System32\Recovery . From it we will copy the file to the folder R:\WinRE. Use the command xcopy with key /h:

Xcopy /h c:\Windows\System32\Recovery\winre.wim r:\WinRE

Figure 9 - copying the WinRE.wim file

And finally, a few final chords:

::Set custom path (key /path) to the system image file located in the folder specified by the key /target Reagentc /setosimage /path R:\WinRE /target c:\Windows::Setting a custom path (key /path) to the system recovery environment deployment file located in the folder specified by the key /target Reagentc /setreimage /path R:\WinRE /target c:\Windows::Enable the recovery environment Reagentc /enable::Check the recovery environment settings Reagentc /info

As can be seen from Figure 10, the setup was successful. Do not close the window - the command line will still be needed.

Figure 10 - Setting up a custom recovery environment.

It will be interesting to see what changes have taken place in the section Recovery. To do this, enable the display of hidden and system files.

Figure 11 - changing the contents of the R section.

As you can see, the file WinRE.wim in folder WinRE no, but a folder appeared Recovery at the root of the section. Believe me, the file is now in it. I will not dwell on the structure of the Recovery folder - if you wish, you can study its contents and also compare it with the BCD parameters (using the bcdedit / enum all command).

All that remains is to protect the section from accidental impact from users. To do this, you need to hide it from Explorer and exclude the ability to work with it in Disk Management. The utility will help us with this again Diskpart. On the command line, run sequentially (the disk and partition numbers correspond to the configuration given in the article):

::Start DISKPART Diskpart::Select a disk. If there are several of them, then the number of the required disk is determined by the command LIST DISK Sel disk 0:: Select a partition. If necessary, specify the partition number with the command LIST PART Sel part 4::Removing a letter - the partition will be hidden in Windows Explorer Remove::Setting the partition identifier ID=27. This ID is set specifically for recovery partitions. It becomes impossible to work with such a partition in Disk Management, which provides additional protection for it Set id=27

Figure 12 - working with the recovery partition in DISKPART

Changes that have occurred in the system

Firstly, the partition is not visible in Windows Explorer, and it does not have a context menu in Disk Management.

Figure 13 - Explorer and Disk Management Manager.

Secondly, in the Advanced Recovery Methods window in the description of reinstalling Windows, there is no requirement to have an installation disk.

Figure 14 - Windows advanced recovery methods menu.

Thirdly, the recovery environment menu has changed:

Figure 15 - additional menu item in Windows recovery options in the recovery environment

This could have been the end of it. But there is a need to dwell on several nuances that arise after reinstalling the system in this manner. I will reinstall the system from the recovery environment.

Setting up a recovery environment after reinstalling the system

For the purity of the experiment, I will format the partition with the system and the partition with the download files. Moreover, I strongly recommend formatting the “System Reserved” section to avoid confusion with loading in the future.

Figure 16 - formatting partitions in the WindowsRE environment.

No user participation is required during the reinstallation process. You will receive a system identical to the one you had at the time you took the image.

Figure 17 - beginning of system reinstallation.

The only thing is that after reinstalling you need to make a few changes:

  1. Due to a complete rebuild of the BCD, the recovery environment must be reconfigured.
  2. hide section in explorer Recovery.

Disable the recovery environment with the command

Reagentc /disable

Turn on display of hidden and system files, open the folder WinRE on the section R:\ and make sure the file exists Winre.wim. If necessary, copy it from the folder Windows\System32\Recovery or from a folder R:\Recovery \xxxxxxxx -xxxx -xxxx -xxxx -xxxxxxxxxxxx.

After that delete the folder Recovery on the section R:\.

Figure 18- deleting the Recovery folder

Then enable the recovery environment:

Reagentc /enable

Make sure the settings are correct (note that the name of the folder in which the WinRE.wim file is located in the Recovery folder is different. Therefore, before connecting the recovery environment, you can safely delete the old one.):

Reagentc/info

Figure 19 - connecting the recovery environment after reinstallation.

Remove the letter from the partition R:\

Diskpart Sel disk 0 Sel part 4 Remove Exit

Your computer is ready for a fresh reinstallation.

One final note. While performing numerous reinstallations while preparing this article, I noticed the appearance of an incomprehensible folder in the list of available drives on the “System Protection” tab. This may be due to the missing folder in the system image System Volume Information or changing section IDs.

Figure 20 - phantom partition in the list of available disks on the “System Protection” tab.

To get rid of the strange folder, disable system protection on this phantom partition and enable it on the partition with the current system.

Conclusion

There are probably easier ways to make reservations, especially using different programs. I don’t pretend that you will definitely use the method described above, but I think it’s convenient and practical.

Of course, the system will be updated over time. To keep the image up to date, periodically rewrite the file in Windows RE Install.wim.

Loading...