Sysprep for Windows 11

Nam Lam 0 Reputation points
2025-01-24T01:23:00.14+00:00

Hello All,

I'm successfully ran the Sysprep with an unattended.xml file on the laptop and used Clonezilla to clone the Windows 11 24H2 image. There is no issue when I clone it to another laptop. However, when I enabled the BitLocker and restarted a laptop, it booted to the Recovery/Automatic Repair loop.

Does anybody have an idea what is happening and why it boots to Automatic Repair mode?

I have tried many times but still have the same issue after enable the Bitlocker.

Thanks.

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,663 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Daisy Zhou 28,821 Reputation points Microsoft Vendor
    2025-01-27T08:08:06.35+00:00

    Hello

    Thank you for posting in Q&A forum.

    Here are some steps you can try:

    1. Ensure BitLocker is disabled before you clone the image.
    2. BitLocker relies on the Trusted Platform Module (TPM). Ensure that the TPM is properly configured and enabled in the BIOS/UEFI settings of the cloned laptop.
    3. Run Startup Repair:

    • Boot from a Windows installation media (USB/DVD).

    • Select Repair your computer.

    • Choose Troubleshoot > Advanced options > Startup Repair.

    1. Rebuild BCD (Boot Configuration Data):

    • Boot from a Windows installation media.

    • Select Repair your computer.

    • Choose Troubleshoot > Advanced options > Command Prompt.

    • Run the following commands:

    bootrec /fixmbr

    bootrec /fixboot

    bootrec /scanos

    bootrec /rebuildbcd

    • Restart the laptop.

    1. Disable Automatic Repair:

    • Boot from a Windows installation media.

    • Select Repair your computer.

    • Choose Troubleshoot > Advanced options > Command Prompt.

    • Run the following command:

    bcdedit /set {default} recoveryenabled No

    • Restart the laptop.

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Best Regards,

    Daisy Zhou

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

  2. Nicolas Ariel Ramos 0 Reputation points
    2025-01-31T07:33:00.1333333+00:00

    Hello,

    A few weeks ago I encountered the same problems when trying to generate an image of the Windows Enterprise 24H2 operating system. There are several problems that do not allow it, since to start with we get errors such as "Bitlocker is active", "AppxPackage...." cannot be removed from some user, etc.

    It is possible to repair these errors using some Powershell commands in administrator mode.

    Bitlocker active:

    manage-bde -off C:

    C: should be replaced with the letter of the main drive.

    AppxPackage:

    Remove-AppxPackage -Package "package in conflict" -AllUsers

    The package in conflict appears in the "setupact" log inside the sysprep folder.

    Now, a good indicator that when performing the sysprep the image should not have problems is to enter "This computer", right click on the "C:" drive for example and try to activate BitLocker, if this progresses and does not show a BCD problem, cancel the operation and continue as you would normally do an image.

    In case of the error with the BCD, there are some users in different forums that offer solutions through command lines, when trying it I was not able to solve it this way since one of the commands "bootrec /fixboot" should be able to detect in which partition the operating system is located and in my case it does not detect it, when checking the partitions, the one that should contain it has an alphanumeric name, so I had to do it through another version of the operating system.

    In my case, since the equipment was very new from the factory (October 2024), what worked for me was to install a different version (Windows Enterprise 23H2), make the configurations, update drivers, update the equipment and once entered the domain and verified that BitLocker is activated (by domain policy), update the version to 24H2. It should be noted that by means of a step so as not to start from 0, I verified that "BitLocker" could be activated as mentioned above and just in case I saved a sysprep of each advance.

    PS: If you install 24h2 and capture the image, the error will only break your image when activating "Secure Boot" precisely because BitLocker is corrupted due to the BCD failure.

    I hope this information is useful to you.

    Greetings.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.