MHimken / WinRE-Customization

WinRE Customization to apply patches, drivers and soon™ language packs
https://manima.de/2023/01/modify-winre-patches-drivers-and-cve-2022-41099/
MIT License
61 stars 8 forks source link

Recovery partition is beginning to encrypt the disk before WinRE can be applied #13

Closed MHimken closed 2 months ago

MHimken commented 2 months ago

This behavior can be observed with the following prerequisites (none other were tested):

Issue description: If the recovery partition needs to be resized or (re)created the script would fail with the following error image

Root cause: When the recovery agent is trying to find a suitable partition, it fails to do so, because the newly created recovery partition is bitlocker encrypted. The reagent.log reveals this: image

BitLocker for some reason or another is now starting to encrypt a non-OS partition(!) in between creation of the partition and assigning the GptType (Recovery). Usually the small gap was used to verify that the partition was created properly before trying to enable the recovery agent.

Fix: According to https://support.microsoft.com/en-us/topic/kb5028997-instructions-to-manually-resize-your-partition-to-install-the-winre-update-400faa27-9343-461c-ada9-24c8229763bf we can move the GptType to the diskpart script. A fix will be uploaded soon after creating this issue.