Restore hidden partition windows 7. We create a hidden recovery partition ourselves. Assigning a Hidden Section

💖 Like it? Share the link with your friends
So, you have finished installing the operating system, drivers, updates and programs, checked its performance and stability, were satisfied with the result and want to be able to “roll back” to this state of the system in case of unforeseen circumstances. Windows 7 is equipped with quite powerful tools Reserve copy, which allow you to reduce the time to restore the system. Those who bought new computers with Windows 7 pre-installed are familiar with the recovery function, after which the operating system, and sometimes the contents of everything hard drive, returns to the factory state. This may result in the loss of user files that were on the hard drive.
In the presence of installation disk with the operating system, you are spared from such losses (How to reinstall Windows 7, keeping the settings and installed programs), but the subsequent installation of drivers and updates is inevitable. I offer you a method that will significantly reduce the time spent on setting up the system after reinstallation, moreover, it does not require an installation disk to complete it. The article uses materials from Vadim Sterkin's blog and a video report by Valery Volobuev Setting up Windows Recovery Environment (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 Windows environment RE;
  • set up the recovery environment;
  • Let's reinstall and reconfigure the recovery environment.

Preparing the recovery partition

First of all, you need to create a partition, on which later we will 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". The size of the partition is determined based on the current occupancy of the partition with the operating system and the availability of free space. For example, if the system is about 20 gigabytes, the optimal size would be between 5 and 10 gigabytes. In my example section D:\ was first compressed

Figure 1 - compressing partition D:\

Then in the resulting unmarked area

Figure 2 - Unallocated disk space after compression

Using the utility DISKPART primary partition was created, formatted, labeled Recovery and letter R. (DISKPART was used due to the fact that 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 in sequence:
::Launching DISKPART
diskpart

Sel disk 0
::Creating a primary partition on the entire unallocated area of ​​the disk. If necessary, specify the section number with the LIST PART command
Create partition primary
::Quick format the created partition and label it "Recovery"
Format LABEL=”Recovery” quick
::Assigning the letter R to a section:
Assign letter=R
::Shutdown in DISKPART
exit

Figure 3 - working in DISKPART

Here and in the future, we will work in a command line launched with administrator rights. Before proceeding to capture the operating system image, create on the partition R:\ folder WinRE to store it.

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

Create an operating system image

First of all, study the article "Creating a customized image of the operating system". It describes the principles and tools, namely the utility imagex.exe, which is part of the Windows AIK . Depending on the bitness of the system, you must use the appropriate version of this utility. I 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 a mistake in the syntax of the command for capturing an operating system image. Restart the computer and enter the recovery environment (to do this, press F8 after turning on the computer and select the "Troubleshoot your computer" item from the menu additional options downloads).

After downloading, run command line And text editor: notepad Use the Open menu (shortcut Ctrl + O) to define the section letters. In my example, as you can see from Figure 7, the partition with the system received the letter D:\ , utility imagex.exe is in the folder E:\WAIKTools\ , while the section Recovery- letter F:\ .

Figure 7 - Partition Letters in WindowsRE

One note: Since we won't need to move the customized image to another computer, we'll use the command in the "Boot to Windows PE and Save the Image with the ImageX Utility" section of the article above.
Run the command:

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

Necessary explanations:

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

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

Quit the WindowsRE environment and reboot. Let's move on to final stage 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 provides booting 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 partition with the system. Through Explorer Windows access this folder is closed. The file attribute is a hidden system attribute. How to place the file in the location we have chosen?
Let's use command line utilities. First disable the recovery environment. I draw your attention to the fact that any actions with the recovery environment must be preceded by its shutdown! To do this, on the command line, run

Reagent /disable

After executing 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 team 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 recovery environment
Reagentc /enable
::Checking the recovery environment settings
Reagentc /info

As you can see 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 is interesting to see what changes have taken place on 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 there was a folder 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, as well as compare with the BCD parameters (by command bcdedit /enum all). It remains to protect the section from accidental impact by users. To do this, you need to hide it from Explorer and exclude the possibility of working with it in Disk Management. The utility will help us with this again. diskpart. In the command line, execute sequentially (the disk and partition numbers correspond to the configuration given in the article):

::Launching DISKPART
diskpart
::Select disk. If there are several, then the number desired disk determined by the LIST DISK command
Sel disk 0
::Section selection. If necessary, specify the section number with the LIST PART command
Sel part 4
::Removing a letter - the section will be hidden in Windows Explorer
Remove
::Set partition IDID=27.This ID is set specifically for recovery partitions. It becomes impossible to work with such a partition in Disk Management, which provides its additional protection.
set id=27

Figure 12 - working with the recovery partition in DISKPART

Changes in the system

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

Figure 13 - File Explorer and Disk Manager.

Second, in the advanced recovery methods window in the description reinstalling Windows there is no requirement for an installation disk.

Figure 14 - advanced methods menu Windows recovery.

Thirdly, the recovery environment menu has changed:

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

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

Setting up a recovery environment after a system reinstall

For the purity of the experiment, I will format the partition with the system and the partition with boot files. Moreover, I strongly recommend formatting the "Reserved by the system" section in order to avoid confusion with loading in the future.

Figure 16 - formatting partitions in the WindowsRE environment.

User participation is not required during the reinstallation process. You will receive a system identical to the one you had at the time of the image removal.

Figure 17 - the beginning of the system reinstallation.

The only thing you need to do after reinstallation is to make a few changes:

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

Reagentc /disable

Turn on the 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. Then 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.

Delete a letter from a section R:\

diskpart
Sel disk 0
Sel part 4
Remove
exit

Your computer is ready for a new reinstallation. One final note. In the course of performing numerous reinstallations while preparing the article, I noticed the appearance of an incomprehensible folder in the list of available drives on the System Protection tab. Perhaps this is due to the absence of a folder in the system image SystemVolumeinformation or changing partition IDs.

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

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

Conclusion

There are probably more simple ways reservations, especially with the use of various programs. I do not pretend that you will definitely use the method described above, but I consider it convenient and practical. Of course, over time, the system will be updated. To keep the image up to date, periodically overwrite the file in Windows RE. Install.wim.

Notebook (netbook) manufacturers make an image of the disk (partition) with the operating system and place this image in a hidden partition. To restore Windows along with drivers and programs at the time of purchasing a laptop, you need to Windows boot press a specific key or key combination. After pressing the appropriate keys, the recovery process will start. This is very convenient since the recovery process takes a minimum of time than if you installed Windows from an installation disk or from a USB flash drive. When restoring, in addition to Windows, drivers, utilities, programs at the time of purchase of the laptop will be restored.
Despite all the conveniences of restoring from a hidden factory partition, this method has disadvantages, such as:
1. when you restore will be restored unnecessary programs which will have to be removed.
2. when you restore will be restored outdated drivers which will need to be updated.
3. You will have to download and install Windows Updates again.
4. if you installed Windows from an installation disk or flash drive, and then want to restore Windows from hidden section you will need to find, download, install the original MBR (main boot record) . Otherwise, the recovery process will not work.
So what is the alternative to restore Windows along with programs, drivers, etc.? There is an alternative and it lies in the fact that you need to create a hidden recovery partition yourself and you yourself will form the contents of this partition. And the program will help us in this Acronis True Image Home

I will give an example of creation with Acronis True Image Home 2009

Create a hidden section.


We launch Acronis True Image 2009. At the first start, the following window will appear. Click Cancel.


Click on the Tools menu. Select Acronis Secure Zone.


In this window, put tick opposite the disk from which we will take away the space for the hidden partition. The hidden section will be called Acronis Secure Zone. I took away space from disk D. Press the button Further.


Here, using the slider, specify how much disk space will occupy the hidden partition.
For Windows XP (7Gb is enough for the eyes) Windows 7 (20Gb is enough) You can immediately mark the item Activate. Then click on the Summary button.
Note: paragraph Activate Enables startup recovery. This means that if you need restore Windows, then you can use the recovery via F11.Before loading Windows, when the appropriate prompt appears, you will need to press the F11 key.



Click Proceed.


There is a process creating a hidden partition to restore Windows.

Introduction

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

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

Those who 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 the factory state. This may result in the loss of user files that were on the hard drive.

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

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

The article uses materials from Vadim Sterkin's blog and Valery Volobuev's video report Setting up the Windows Recovery Environment (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;
  • set up the recovery environment;
  • Let's reinstall and reconfigure the recovery environment.

Preparing the recovery partition

First of all, you need to create a partition, on which later we will 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.

The size of the partition is determined based on the current occupancy of the partition with the operating system and the availability of free space. For example, if the system is about 20 gigabytes, the optimal size would be between 5 and 10 gigabytes.

In my example section D:\ was first compressed

Figure 1 - shrinking the D:\ partition

then in the resulting unallocated area

Figure 2 - Unallocated disk space after compression

using the utility DISKPART primary partition was created, formatted, labeled Recovery and letter R. (DISKPART was used because the fourth partition created by Disk Management will be an extra partition. Feel free to experiment with placing the recovery partition on a secondary partition.)

Run in sequence:

::Launching DISKPART Diskpart::Selecting a disk. If there are several of them, then the number of the desired disk is determined by the command LIST DISK Sel disk 0::Create a primary partition on the entire unallocated area of ​​the disk. If necessary, specify the partition number with the command LIST PART Create partition primary::Quick formatting of the created partition and assigning the label “Recovery” to it Format LABEL=”Recovery” quick::Assigning letter R to the partition

Figure 3 - working in DISKPART

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

Before proceeding to capture the operating system image, create on the partition R:\ folder WinRE to store it.

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

Create an operating system image

Once downloaded, launch a command prompt and a text editor:

Use the "Open" menu (shortcut Ctrl + O) to define the section letters.

In my example, as you can see from Figure 7, the partition with the system received the letter D:\, utility imagex.exe is in the folder E:\WAIKTools\, while the section Recovery- letter F:\.

Figure 7 - Partition letters in a WindowsRE environment.

One note: Since we won't need to move the customized image to another computer, we'll use the command in the "Boot to Windows PE and Save the Image with the ImageX Utility" section of the article above. Run the command:

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

Necessary explanations:

  • "E:\WAIK Tools\amd64\imagex.exe"- Path to the imagex.exe utility. The quotation marks are used to avoid problems with spaces in the folder name.
  • /captureD:- The key points to capturing an image of the system located on the D: partition (as it is visible in WindowsRE).
  • F:\WinRE\install.wim "Windows 7 Ultimate SP1 Custom"- Saving the captured image to the install.wim file (this is important, since only this name is allowed in this case) to the F:\WinRE folder. The 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 image of the operating system in the Windows RE environment

Quit the WindowsRE environment and reboot. We proceed 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 provides booting 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 partition with the system. Through windows explorer access to this folder is closed. File attribute - hidden system. How to place the file in the location we have chosen? Let's use command line utilities.

First disable the recovery environment. I draw your attention to the fact that any actions with the recovery environment must be preceded by its shutdown! To do this, on the command line, run

Reagentc /disable

After executing 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 team 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::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::Enable recovery environment Reagentc /enable::Check recovery environment settings Reagentc /info

As you can see from Figure 10, the setup was successful. Don't close the window - you still need the command line.

Figure 10 - Setting up a custom recovery environment.

It is interesting to see what changes have taken place on 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 there was a folder 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 examine its contents, and also compare it with the BCD parameters (using the bcdedit / enum all command).

It remains to protect the section from accidental impact by users. To do this, you need to hide it from Explorer and exclude the possibility of working with it in Disk Management. The utility will help us with this again. diskpart. In the command line, execute sequentially (the disk and partition numbers correspond to the configuration given in the article):

::Launching DISKPART Diskpart::Selecting a disk. If there are several of them, then the number of the desired 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 its additional protection. Set id=27

Figure 12 - working with the recovery partition in DISKPART

Changes in the system

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

Figure 13 - File Explorer and Disk Manager.

Secondly, in the advanced recovery window in the description of reinstalling Windows, there is no requirement for an installation disk.

Figure 14 - Windows advanced recovery methods menu.

Thirdly, the recovery environment menu has changed:

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

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

Setting up a recovery environment after a system reinstall

For the purity of the experiment, I will format the partition with the system and the partition with boot files. Moreover, I strongly recommend formatting the "Reserved by the system" section in order to avoid confusion with loading in the future.

Figure 16 - formatting partitions in the WindowsRE environment.

User participation is not required during the reinstallation process. You will receive a system identical to the one you had at the time of the image removal.

Figure 17 - the beginning of the reinstallation of the system.

The only thing you need to do after reinstallation is to make a few changes:

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

Disable the recovery environment with the command

Reagentc /disable

Turn on the 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.

Then 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 where the WinRE.wim file is located in the Recovery folder is different. Therefore, you can safely delete the old one before connecting the recovery environment.):

Reagentc /info

Figure 19 - connecting the recovery environment after reinstallation.

Delete a letter from a section R:\

Diskpart Sel disk 0 Sel part 4 Remove Exit

Your computer is ready for a new reinstallation.

One final note. In the course of performing numerous reinstallations while preparing the article, I noticed the appearance of an incomprehensible folder in the list of available drives on the System Protection tab. Perhaps this is due to the absence of a folder in the system image System Volume Information or changing partition IDs.

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

To get rid of the incomprehensible 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 back up, especially using different programs. I do not pretend that you will definitely use the method described above, but I consider it convenient and practical.

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

Very often, after updating the operating system or completely reinstalling it, a new one starts to be displayed in the explorer. system partition, which was previously hidden. This may be a recovery partition, or a hidden partition with important system files. Such a disk is sometimes packed to capacity, and Windows starts to sound the alarm about the lack of free space.

Since this system disk important for computer operation and not in vain inaccessible to regular user- let's figure out how to hide the recovery partition from Windows Explorer.

What is a recovery partition?

Trying to hide the recovery partition through Disk Management

In order to hide the recovery partition, just use special utility built into the operating room Windows system. Right-click the computer shortcut and select Control, and in the opened window - Disk Management.

You can also use the hotkey combination Win And R, and enter the command diskmgmt.msc

In the window that opens, select the system partition that you would like to hide. In our case, this is the partition (E:) called "Reserved by the system." Also, hidden partitions can be called Recovery, a recovery partition, or have no name at all.

Right-click on the drive and select "Change drive letter.." from the drop-down menu, delete the drive letter and click OK.

We agree with the warnings, open Windows Explorer and make sure that the section is again securely hidden.

Remove the recovery partition using the command line

If using previous method you didn’t manage to solve the problem the first time, you can try to solve the problem through the command line and using the Diskpart utility.

To do this, run the command prompt as an administrator and enter the command diskpart. Next enter the following commands. Please note that your volume number and drive letter may differ.

After the steps taken, open Explorer and check for the presence or absence of unnecessary partitions.

Finally

In this way, you can easily get rid of annoying system reminders about running out of free space or hide unnecessary system partitions.

It is not recommended to delete hidden partitions, as the performance of the computer in this case may be at risk. A tiny partition weighing one hundred megabytes can be the reason that Windows stops starting. In this case, only a system restore will help.



tell friends