Windows Recovery Enviroment

      No Comments on Windows Recovery Enviroment

Hi everyone, it was a long time since I’ve used the blog.
I’m very busy with my personal life and work.
In the evening I’m still busy with IT projects, Cryptocurrency and other stuff.

Most of the time I forget to blogpost about it. SORRY!
For example two weeks ago I installed a Minecraft server. Just because I wanted to know how it works.
Maybe I’ll write about it in a later blogpost.

Last week I met WinRE.wim. Off course I knew of his excistence but it never got very familiar. WinRE.wim is your friend when Windows is failing. That happens sooner or later, right? WinRE stands for Windows Recovery Enviroment. It’s the blue colored system restore screen.

My problem was it worked with an older SATA drive. I switched from harddisk to a NVMe PCIe drive and enabled Bitlocker and afterwards it didn’t work anymore. It didn’t saw my harddisk. I was searching for hours because I thought it was a Bitlocker thing. When I disabled Bitlocker and checked again it still didn’t work.

Then I realised it was the disk and my theory was that my Windows image was build on a SATA drive and it didn’t knew of the NVME PCIe drive. So I had to edit the WinRE.wim and slipstream my NVME PCIe driver in it.

In Windows 10 WinRE settles in C:\Windows\system32\Recovery\ when its disabled. When the recovery enviroment is enabled it could be on another (maybe hidden) partition. Or just in C:\Recovery\WindowsRE\

You can check the status of WinRE with the following command.

In my example above the WinRE enviroment is hidden on partition 5.
We can find him through Diskpart and make it accessible by assigning a drive letter.
Note: The recovery enviroment has the following attributes (AHS) Archive, Hidden, System.
So maybe you’ll have to change your folder properties to make it visible.

Consider making a backup of your WinRE.wim file before taking the next steps.

Maybe you’re familiar with Windows PE(Preinstallation Enviroment)? WinRE is like WinPE but with Recovery Tools. So it has packages, you can update it with the latest Windows Updates and slipstream essential drivers.

Before you can do something with the WinRE.wim you’ll have to mount it with dism like:

Mounting the image

Add the necessary drivers

/recurse so it installs all the drivers under the WinPE_drivers folder
After Searching for driver packages it installs the drivers

After succesfully adding the drivers you can commit the changes to the image.

Commiting the changes in the WinRE.wim

Und jetzt, jawohl! copy the WinRE.wim back to it’s original place.

Spoiler alert: Don’t disable the WinRE when you have Bitlocker enabled. You can’t get it enabled again. Bitlocker doesn’t like altering the boot enviroment. If you have your machine running Bitlocker you’ll have to suspend Bitlocker for enabling the WinRE again. Use “manage-bde -protectors -disable C:” To disable it for the C-drive. And “manage-bde -protectors -enable C:” to enable it again.

After copying the WinRE back to its place you can start it. You’ll notice that you can use System Restore point or Command prompt again.

Leave a Reply

Your email address will not be published.