Deployment Solution

 View Only
  • 1.  Any Ideas: Automation convert MBR to GPT

    Posted Aug 03, 2020 09:03 AM
    Issue:

    We have a lot of devices that where Win 7, the volumes on them where MBR with secure boot disabled, these devices got in placed upgraded to windows 10.

    I want techs to be able to use automaton to reimage devices without having to bring them back to the imaging rack, if these devices had been imaged with with win 10 with the GPT(secure boot enabled) the automation process works great. The problem being if these are those inplace upgraded ones  once the new image is applied that came from a device using UEFI it can't boot due to the drive layout not matching what GPT uses. Before automation kicks off I do have a task that will change the BIOS setting to enable secureboot and restart the computer, then restart again to start the automation job.

    I know this would require using MBR2GPT in Preboot, that would need to run after the bios setting has been changed to secureboot, but I can't seem to get MBR2GPT to kick off from the drive, I can see that its under system32 folder.

    Anyone done something like this?

    ------------------------------
    Aspirus
    ------------------------------


  • 2.  RE: Any Ideas: Automation convert MBR to GPT

    Posted Aug 03, 2020 02:42 PM
    I may have found my issue incase anyone else ever stumbles into this, going to update my install.wim later to confirm:

    Known issue

    MBR2GPT.exe cannot run in Windows PE

    When you start a Windows 10, version 1903-based computer in the Windows Preinstallation Environment (Windows PE), you encounter the following issues:

    Issue 1 When you run the MBR2GPT.exe command, the process exits without converting the drive.

    Issue 2 When you manually run the MBR2GPT.exe command in a Command Prompt window, there is no output from the tool.

    Issue 3 When MBR2GPT.exe runs inside an imaging process such as a Microsoft Endpoint Configuration Manager task sequence, an MDT task sequence, or by using a script, you receive the following exit code: 0xC0000135/3221225781.

    Cause

    This issue occurs because in Windows 10, version 1903 and later versions, MBR2GPT.exe requires access to the ReAgent.dll file. However, this dll file and its associated libraries are currently not included in the Windows PE boot image for Windows 10, version 1903 and later.

    Workaround

    To fix this issue, mount the Windows PE image (WIM), copy the missing file from the Windows 10, version 1903 Assessment and Development Kit (ADK) source, and then commit the changes to the WIM. To do this, follow these steps:

    1. Mount the Windows PE WIM to a path (for example, C:\WinPE_Mount). For more information about how to mount WIM files, see Mount an image.

    2. Copy the ReAgent files and the ReAgent localization files from the Window 10, version 1903 ADK source folder to the mounted WIM.

      For example, if the ADK is installed to the default location of C:\Program Files (x86)\Windows Kits\10 and the Windows PE image is mounted to C:\WinPE_Mount, run the following commands from an elevated Command Prompt window:

       Note

      You can access the ReAgent files if you have installed the User State Migration Tool (USMT) as a feature while installing Windows Assessment and Deployment Kit.

      Command 1:

      cmd
      copy "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Setup\amd64\Sources\ReAgent*.*" "C:\WinPE_Mount\Windows\System32"

      This command copies three files:

      • ReAgent.admx
      • ReAgent.dll
      • ReAgent.xml

      Command 2:

      cmd
      copy "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Setup\amd64\Sources\En-Us\ReAgent*.*" "C:\WinPE_Mount\Windows\System32\En-Us"

      This command copies two files:

      • ReAgent.adml
      • ReAgent.dll.mui

       Note

      If you aren't using an English version of Windows, replace "En-Us" in the path with the appropriate string that represents the system language.



    ------------------------------
    Aspirus
    ------------------------------