mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-05-12 05:17:22 +00:00
Deploy root code block standardization plus style updates 2
This commit is contained in:
parent
4ed392ab93
commit
4c8adab075
@ -40,10 +40,10 @@ On a machine where your image file is accessible:
|
|||||||
|
|
||||||
1. Open Windows PowerShell with administrator privileges.
|
1. Open Windows PowerShell with administrator privileges.
|
||||||
|
|
||||||
2. Mount the image. At the Windows PowerShell prompt, type:
|
2. Mount the image. At the Windows PowerShell prompt, enter:
|
||||||
`Mount-WindowsImage -ImagePath c:\images\myimage.wim -Index 1 -Path C:\test`
|
`Mount-WindowsImage -ImagePath c:\images\myimage.wim -Index 1 -Path C:\test`
|
||||||
|
|
||||||
3. Use the Add-AppxProvisionedPackage cmdlet in Windows PowerShell to preinstall the app. Use the /PackagePath option to specify the location of the Store package and /LicensePath to specify the location of the license .xml file. In Windows PowerShell, type:
|
3. Use the Add-AppxProvisionedPackage cmdlet in Windows PowerShell to preinstall the app. Use the /PackagePath option to specify the location of the Store package and /LicensePath to specify the location of the license .xml file. In Windows PowerShell, enter:
|
||||||
`Add-AppxProvisionedPackage -Path C:\test -PackagePath C:\downloads\appxpackage -LicensePath C:\downloads\appxpackage\license.xml`
|
`Add-AppxProvisionedPackage -Path C:\test -PackagePath C:\downloads\appxpackage -LicensePath C:\downloads\appxpackage\license.xml`
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
@ -69,10 +69,10 @@ On a test machine:
|
|||||||
|
|
||||||
Now, on the machine where your image file is accessible:
|
Now, on the machine where your image file is accessible:
|
||||||
|
|
||||||
1. Import the Start layout. At the Windows PowerShell prompt, type:
|
1. Import the Start layout. At the Windows PowerShell prompt, enter:
|
||||||
`Import-StartLayout -LayoutPath "<path><file name>.xml" -MountPath "C:\test\"`
|
`Import-StartLayout -LayoutPath "<path><file name>.xml" -MountPath "C:\test\"`
|
||||||
|
|
||||||
2. Save changes and dismount the image. At the Windows PowerShell prompt, type:
|
2. Save changes and dismount the image. At the Windows PowerShell prompt, enter:
|
||||||
`Dismount-WindowsImage -Path c:\test -Save`
|
`Dismount-WindowsImage -Path c:\test -Save`
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
|
@ -62,7 +62,10 @@ All four of the roles specified above can be hosted on the same computer or each
|
|||||||
dism.exe /mount-image /imagefile:c:\winpe_amd64\media\sources\boot.wim /index:1 /mountdir:C:\winpe_amd64\mount
|
dism.exe /mount-image /imagefile:c:\winpe_amd64\media\sources\boot.wim /index:1 /mountdir:C:\winpe_amd64\mount
|
||||||
```
|
```
|
||||||
|
|
||||||
Verify that "The operation completed successfully" is displayed. Note: To view currently mounted images, type **dism /get-MountedWiminfo**.
|
Verify that the message **The operation completed successfully** is displayed.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> To view currently mounted images, enter **`dism.exe /get-MountedWiminfo`**.
|
||||||
|
|
||||||
5. Map a network share to the root TFTP directory on the PXE/TFTP server and create a \Boot folder. Consult your TFTP server documentation to determine the root TFTP server directory, then enable sharing for this directory, and verify it can be accessed on the network. In the following example, the PXE server name is PXE-1 and the TFTP root directory is shared using a network path of **\\\PXE-1\TFTPRoot**:
|
5. Map a network share to the root TFTP directory on the PXE/TFTP server and create a \Boot folder. Consult your TFTP server documentation to determine the root TFTP server directory, then enable sharing for this directory, and verify it can be accessed on the network. In the following example, the PXE server name is PXE-1 and the TFTP root directory is shared using a network path of **\\\PXE-1\TFTPRoot**:
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ In this step we're creating the operating system image that will be used on the
|
|||||||
3. Verify that the `.wim` file location (which can be a network share, a DVD, or a USB drive) is accessible and that it contains a valid Windows 10 Enterprise or Windows 10 Education image that has been generalized using sysprep. Many environments can use the same image for both Windows To Go and desktop deployments.
|
3. Verify that the `.wim` file location (which can be a network share, a DVD, or a USB drive) is accessible and that it contains a valid Windows 10 Enterprise or Windows 10 Education image that has been generalized using sysprep. Many environments can use the same image for both Windows To Go and desktop deployments.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> For more information about .wim files, see [Windows System Image Manager (Windows SIM) Technical Reference](/previous-versions/windows/it-pro/windows-8.1-and-8/hh824929(v=win.10)). For more information about using sysprep, see [Sysprep Overview](/previous-versions/windows/it-pro/windows-8.1-and-8/hh825209(v=win.10)).
|
> For more information about `.wim` files, see [Windows System Image Manager (Windows SIM) Technical Reference](/previous-versions/windows/it-pro/windows-8.1-and-8/hh824929(v=win.10)). For more information about using sysprep, see [Sysprep Overview](/previous-versions/windows/it-pro/windows-8.1-and-8/hh825209(v=win.10)).
|
||||||
|
|
||||||
4. Search for **Windows To Go** and then press **Enter**. If the **User Account Control** dialog box appears, confirm that the action it displays is what you want, and then select **Yes**. The **Windows To Go Creator Wizard** opens.
|
4. Search for **Windows To Go** and then press **Enter**. If the **User Account Control** dialog box appears, confirm that the action it displays is what you want, and then select **Yes**. The **Windows To Go Creator Wizard** opens.
|
||||||
|
|
||||||
@ -139,8 +139,8 @@ The following Windows PowerShell cmdlet or cmdlets perform the same function as
|
|||||||
|
|
||||||
3. Next you need to apply the operating system image that you want to use with Windows To Go to the operating system partition you created on the disk (this may take 30 minutes or longer, depending on the size of the image and the speed of your USB connection). The following command shows how this can be accomplished using the [Deployment Image Servicing and Management](/windows-hardware/manufacture/desktop/dism---deployment-image-servicing-and-management-technical-reference-for-windows) command-line tool (DISM):
|
3. Next you need to apply the operating system image that you want to use with Windows To Go to the operating system partition you created on the disk (this may take 30 minutes or longer, depending on the size of the image and the speed of your USB connection). The following command shows how this can be accomplished using the [Deployment Image Servicing and Management](/windows-hardware/manufacture/desktop/dism---deployment-image-servicing-and-management-technical-reference-for-windows) command-line tool (DISM):
|
||||||
|
|
||||||
>[!TIP]
|
> [!TIP]
|
||||||
>The index number must be set correctly to a valid Enterprise image in the `.WIM` file.
|
> The index number must be set correctly to a valid Enterprise image in the `.wim` file.
|
||||||
|
|
||||||
```cmd
|
```cmd
|
||||||
#The WIM file must contain a sysprep generalized image.
|
#The WIM file must contain a sysprep generalized image.
|
||||||
@ -231,8 +231,8 @@ The following Windows PowerShell cmdlet or cmdlets perform the same function as
|
|||||||
|
|
||||||
After the answer file has been saved, copy `unattend.xml` into the sysprep folder on the Windows To Go drive (for example, `W:\Windows\System32\sysprep\`)
|
After the answer file has been saved, copy `unattend.xml` into the sysprep folder on the Windows To Go drive (for example, `W:\Windows\System32\sysprep\`)
|
||||||
|
|
||||||
>[!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
>Setup unattend files are processed based on their location. Setup will place a temporary unattend file into the **`%systemroot%\panther`** folder which is the first location that setup will check for installation information. You should make sure that folder does not contain a previous version of an unattend.xml file to ensure that the one you just created is used.
|
> Setup unattend files are processed based on their location. Setup will place a temporary unattend file into the **`%systemroot%\panther`** folder which is the first location that setup will check for installation information. You should make sure that folder does not contain a previous version of an unattend.xml file to ensure that the one you just created is used.
|
||||||
|
|
||||||
If you don't wish to boot your Windows To Go device on this computer and want to remove it to boot it on another PC, be sure to use the **Safely Remove Hardware and Eject Media** option to safely disconnect the drive before physically removing it from the PC.
|
If you don't wish to boot your Windows To Go device on this computer and want to remove it to boot it on another PC, be sure to use the **Safely Remove Hardware and Eject Media** option to safely disconnect the drive before physically removing it from the PC.
|
||||||
|
|
||||||
@ -242,8 +242,8 @@ Your Windows To Go workspace is now ready to be started. You can now [prepare a
|
|||||||
|
|
||||||
Computers running Windows 8 and later can be configured as host computers that use Windows To Go automatically whenever a Windows To Go workspace is available at startup. When the Windows To Go startup options are enabled on a host computer, Windows will divert startup to the Windows To Go drive whenever it's attached to the computer. This makes it easy to switch from using the host computer to using the Windows To Go workspace.
|
Computers running Windows 8 and later can be configured as host computers that use Windows To Go automatically whenever a Windows To Go workspace is available at startup. When the Windows To Go startup options are enabled on a host computer, Windows will divert startup to the Windows To Go drive whenever it's attached to the computer. This makes it easy to switch from using the host computer to using the Windows To Go workspace.
|
||||||
|
|
||||||
>[!TIP]
|
> [!TIP]
|
||||||
>If you will be using a PC running Windows 7 as your host computer, see [Tips for configuring your BIOS settings to work with Windows To Go](https://go.microsoft.com/fwlink/p/?LinkId=618951) for information to help you prepare the host computer.
|
> If you will be using a PC running Windows 7 as your host computer, see [Tips for configuring your BIOS settings to work with Windows To Go](https://go.microsoft.com/fwlink/p/?LinkId=618951) for information to help you prepare the host computer.
|
||||||
|
|
||||||
If you want to use the Windows To Go workspace, shut down the computer, plug in the Windows To Go drive, and turn on the computer. To use the host computer, shut down the Windows To Go workspace, unplug the Windows To Go drive, and turn on the computer.
|
If you want to use the Windows To Go workspace, shut down the computer, plug in the Windows To Go drive, and turn on the computer. To use the host computer, shut down the Windows To Go workspace, unplug the Windows To Go drive, and turn on the computer.
|
||||||
|
|
||||||
@ -277,7 +277,7 @@ After you've configured your host PC to boot from USB, you can use the following
|
|||||||
|
|
||||||
2. Insert the Windows To Go USB drive directly into a USB 3.0 or USB 2.0 port on the PC. Don't use a USB hub or extender.
|
2. Insert the Windows To Go USB drive directly into a USB 3.0 or USB 2.0 port on the PC. Don't use a USB hub or extender.
|
||||||
|
|
||||||
3. Turn on the PC. If your Windows To Go drive is protected with BitLocker you'll be asked to type the password, otherwise the workspace will boot directly into the Windows To Go workspace.
|
3. Turn on the PC. If your Windows To Go drive is protected with BitLocker you'll be asked to enter the password, otherwise the workspace will boot directly into the Windows To Go workspace.
|
||||||
|
|
||||||
## Advanced deployment steps
|
## Advanced deployment steps
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ Making sure that Windows To Go workspaces are effective when used off premises i
|
|||||||
```
|
```
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> The index number must be set correctly to a valid Enterprise image in the `.WIM` file.
|
> The index number must be set correctly to a valid Enterprise image in the `.wim` file.
|
||||||
|
|
||||||
6. After those commands have completed, run the following command:
|
6. After those commands have completed, run the following command:
|
||||||
|
|
||||||
@ -521,8 +521,8 @@ BitLocker recovery keys are the keys that can be used to unlock a BitLocker prot
|
|||||||
|
|
||||||
Next you need to apply the operating system image that you want to use with Windows To Go to the operating system partition you created on the disk (this may take 30 minutes or longer, depending on the size of the image and the speed of your USB connection). The following command shows how this can be accomplished using the [Deployment Image Servicing and Management](/windows-hardware/manufacture/desktop/dism---deployment-image-servicing-and-management-technical-reference-for-windows) command-line tool (DISM):
|
Next you need to apply the operating system image that you want to use with Windows To Go to the operating system partition you created on the disk (this may take 30 minutes or longer, depending on the size of the image and the speed of your USB connection). The following command shows how this can be accomplished using the [Deployment Image Servicing and Management](/windows-hardware/manufacture/desktop/dism---deployment-image-servicing-and-management-technical-reference-for-windows) command-line tool (DISM):
|
||||||
|
|
||||||
>[!TIP]
|
> [!TIP]
|
||||||
>The index number must be set correctly to a valid Enterprise image in the .WIM file.
|
> The index number must be set correctly to a valid Enterprise image in the `.wim` file.
|
||||||
|
|
||||||
```cmd
|
```cmd
|
||||||
#The WIM file must contain a sysprep generalized image.
|
#The WIM file must contain a sysprep generalized image.
|
||||||
@ -617,7 +617,7 @@ The sample script creates an unattend file that streamlines the deployment proce
|
|||||||
The RemoteSigned execution policy will prevent unsigned scripts from the internet from running on the computer, but will allow locally created scripts to run. For more information on execution policies, see [Set-ExecutionPolicy](/powershell/module/microsoft.powershell.security/set-executionpolicy).
|
The RemoteSigned execution policy will prevent unsigned scripts from the internet from running on the computer, but will allow locally created scripts to run. For more information on execution policies, see [Set-ExecutionPolicy](/powershell/module/microsoft.powershell.security/set-executionpolicy).
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> To get online help for any Windows PowerShell cmdlet, whether or not it is installed locally type the following cmdlet, replacing <cmdlet-name> with the name of the cmdlet you want to see the help for:
|
> To get online help for any Windows PowerShell cmdlet, whether or not it is installed locally, enter the following cmdlet, replacing `<cmdlet-name>` with the name of the cmdlet you want to see the help for:
|
||||||
>
|
>
|
||||||
> `Get-Help <cmdlet-name> -Online`
|
> `Get-Help <cmdlet-name> -Online`
|
||||||
>
|
>
|
||||||
|
@ -23,7 +23,7 @@ Windows 10 upgrade options are discussed and information is provided about plann
|
|||||||
|[Windows 10 upgrade paths](upgrade/windows-10-upgrade-paths.md) |This article provides information about support for upgrading directly to Windows 10 from a previous operating system. |
|
|[Windows 10 upgrade paths](upgrade/windows-10-upgrade-paths.md) |This article provides information about support for upgrading directly to Windows 10 from a previous operating system. |
|
||||||
|[Windows 10 edition upgrade](upgrade/windows-10-edition-upgrades.md) |This article provides information about support for upgrading from one edition of Windows 10 to another. |
|
|[Windows 10 edition upgrade](upgrade/windows-10-edition-upgrades.md) |This article provides information about support for upgrading from one edition of Windows 10 to another. |
|
||||||
|[Windows 10 volume license media](windows-10-media.md) |This article provides information about updates to volume licensing media in the current version of Windows 10. |
|
|[Windows 10 volume license media](windows-10-media.md) |This article provides information about updates to volume licensing media in the current version of Windows 10. |
|
||||||
|[Manage Windows upgrades with Upgrade Readiness](/mem/configmgr/desktop-analytics/overview) |With Upgrade Readiness, enterprises now have the tools to plan and manage the upgrade process end to end, allowing them to adopt new Windows releases more quickly. With Windows diagnostic data enabled, Upgrade Readiness collects system, application, and driver data for analysis. We then identify compatibility issues that can block an upgrade and suggest fixes when they're known to Microsoft. The Upgrade Readiness workflow steps you through the discovery and rationalization process until you have a list of computers that are ready to be upgraded. |
|
|[Manage Windows upgrades with Upgrade Readiness](/mem/configmgr/desktop-analytics/overview) |With Upgrade Readiness, enterprises now have the tools to plan and manage the upgrade process end to end, allowing them to adopt new Windows releases more quickly. With Windows diagnostic data enabled, Upgrade Readiness collects system, application, and driver data for analysis. We then identify compatibility issues that can block an upgrade and suggest fixes when they're known to Microsoft. The Upgrade Readiness workflow steps you through the discovery and rationalization process until you have a list of computers that are ready to be upgraded. |
|
||||||
|[Windows 10 deployment test lab](windows-10-poc.md) |This guide contains instructions to configure a proof of concept (PoC) environment requiring a minimum amount of resources. The guide makes extensive use of Windows PowerShell and Hyper-V. Subsequent companion guides contain steps to deploy Windows 10 using the PoC environment. After you complete this guide, more guides are provided to deploy Windows 10 in the test lab using [Microsoft Deployment Toolkit](windows-10-poc-mdt.md) or [Microsoft Configuration Manager](windows-10-poc-sc-config-mgr.md). |
|
|[Windows 10 deployment test lab](windows-10-poc.md) |This guide contains instructions to configure a proof of concept (PoC) environment requiring a minimum amount of resources. The guide makes extensive use of Windows PowerShell and Hyper-V. Subsequent companion guides contain steps to deploy Windows 10 using the PoC environment. After you complete this guide, more guides are provided to deploy Windows 10 in the test lab using [Microsoft Deployment Toolkit](windows-10-poc-mdt.md) or [Microsoft Configuration Manager](windows-10-poc-sc-config-mgr.md). |
|
||||||
|[Plan for Windows 10 deployment](planning/index.md) | This section describes Windows 10 deployment considerations and provides information to help Windows 10 deployment planning. |
|
|[Plan for Windows 10 deployment](planning/index.md) | This section describes Windows 10 deployment considerations and provides information to help Windows 10 deployment planning. |
|
||||||
|[Deploy Windows 10 with the Microsoft Deployment Toolkit](./deploy-windows-mdt/prepare-for-windows-deployment-with-mdt.md) |This guide will walk you through the process of deploying Windows 10 in an enterprise environment using the Microsoft Deployment Toolkit (MDT). |
|
|[Deploy Windows 10 with the Microsoft Deployment Toolkit](./deploy-windows-mdt/prepare-for-windows-deployment-with-mdt.md) |This guide will walk you through the process of deploying Windows 10 in an enterprise environment using the Microsoft Deployment Toolkit (MDT). |
|
||||||
|
@ -15,18 +15,23 @@ ms.technology: itpro-deploy
|
|||||||
|
|
||||||
# MBR2GPT.EXE
|
# MBR2GPT.EXE
|
||||||
|
|
||||||
**Applies to**
|
*Applies to:*
|
||||||
- Windows 10
|
|
||||||
|
|
||||||
**MBR2GPT.EXE** converts a disk from the Master Boot Record (MBR) to the GUID Partition Table (GPT) partition style without modifying or deleting data on the disk. The tool runs from a Windows Preinstallation Environment (Windows PE) command prompt, but can also be run from the full Windows 10 operating system (OS) by using the **/allowFullOS** option.
|
- Windows 10
|
||||||
|
|
||||||
MBR2GPT.EXE is located in the **Windows\\System32** directory on a computer running Windows 10 version 1703 (also known as the Creator's Update) or later.
|
**MBR2GPT.EXE** converts a disk from the Master Boot Record (MBR) to the GUID Partition Table (GPT) partition style without modifying or deleting data on the disk. The tool runs from a Windows Preinstallation Environment (Windows PE) command prompt, but can also be run from the full Windows 10 operating system (OS) by using the **`/allowFullOS`** option.
|
||||||
|
|
||||||
|
MBR2GPT.EXE is located in the **`Windows\System32`** directory on a computer running Windows 10 version 1703 or later.
|
||||||
|
|
||||||
The tool is available in both the full OS environment and Windows PE. To use this tool in a deployment task sequence with Configuration Manager or Microsoft Deployment Toolkit (MDT), you must first update the Windows PE image (winpe.wim, boot.wim) with the [Windows ADK](https://developer.microsoft.com/windows/hardware/windows-assessment-deployment-kit) 1703, or a later version.
|
The tool is available in both the full OS environment and Windows PE. To use this tool in a deployment task sequence with Configuration Manager or Microsoft Deployment Toolkit (MDT), you must first update the Windows PE image (winpe.wim, boot.wim) with the [Windows ADK](https://developer.microsoft.com/windows/hardware/windows-assessment-deployment-kit) 1703, or a later version.
|
||||||
|
|
||||||
See the following video for a detailed description and demonstration of MBR2GPT.
|
See the following video for a detailed description and demonstration of MBR2GPT.
|
||||||
|
|
||||||
|
> [!VIDEO https://www.youtube-nocookie.com/embed/hfJep4hmg9o]
|
||||||
|
|
||||||
|
<!-->
|
||||||
<iframe width="560" height="315" align="center" src="https://www.youtube-nocookie.com/embed/hfJep4hmg9o" frameborder="0" allowfullscreen></iframe>
|
<iframe width="560" height="315" align="center" src="https://www.youtube-nocookie.com/embed/hfJep4hmg9o" frameborder="0" allowfullscreen></iframe>
|
||||||
|
-->
|
||||||
|
|
||||||
You can use MBR2GPT to:
|
You can use MBR2GPT to:
|
||||||
|
|
||||||
@ -45,6 +50,7 @@ Offline conversion of system disks with earlier versions of Windows installed, s
|
|||||||
## Disk Prerequisites
|
## Disk Prerequisites
|
||||||
|
|
||||||
Before any change to the disk is made, MBR2GPT validates the layout and geometry of the selected disk to ensure that:
|
Before any change to the disk is made, MBR2GPT validates the layout and geometry of the selected disk to ensure that:
|
||||||
|
|
||||||
- The disk is currently using MBR
|
- The disk is currently using MBR
|
||||||
- There's enough space not occupied by partitions to store the primary and secondary GPTs:
|
- There's enough space not occupied by partitions to store the primary and secondary GPTs:
|
||||||
- 16 KB + 2 sectors at the front of the disk
|
- 16 KB + 2 sectors at the front of the disk
|
||||||
@ -66,18 +72,18 @@ If any of these checks fails, the conversion won't proceed, and an error will be
|
|||||||
|
|
||||||
| Option | Description |
|
| Option | Description |
|
||||||
|----|-------------|
|
|----|-------------|
|
||||||
|/validate| Instructs MBR2GPT.exe to perform only the disk validation steps and report whether the disk is eligible for conversion. |
|
|**/validate**| Instructs `MBR2GPT.exe` to perform only the disk validation steps and report whether the disk is eligible for conversion. |
|
||||||
|/convert| Instructs MBR2GPT.exe to perform the disk validation and to proceed with the conversion if all validation tests pass. |
|
|**/convert**| Instructs `MBR2GPT.exe` to perform the disk validation and to proceed with the conversion if all validation tests pass. |
|
||||||
|/disk:\<diskNumber\>| Specifies the disk number of the disk to be converted to GPT. If not specified, the system disk is used. The mechanism used is the same as used by the diskpart.exe tool **SELECT DISK SYSTEM** command.|
|
|**/disk:*\<diskNumber\>***| Specifies the disk number of the disk to be converted to GPT. If not specified, the system disk is used. The mechanism used is the same as used by the diskpart.exe tool **SELECT DISK SYSTEM** command.|
|
||||||
|/logs:\<logDirectory\>| Specifies the directory where MBR2GPT.exe logs should be written. If not specified, **%windir%** is used. If specified, the directory must already exist, it will not be automatically created or overwritten.|
|
|**/logs:*\<logDirectory\>***| Specifies the directory where `MBR2GPT.exe` logs should be written. If not specified, **%windir%** is used. If specified, the directory must already exist, it will not be automatically created or overwritten.|
|
||||||
|/map:\<source\>=\<destination\>| Specifies other partition type mappings between MBR and GPT. The MBR partition number is specified in decimal notation, not hexadecimal. The GPT GUID can contain brackets, for example: **/map:42={af9b60a0-1431-4f62-bc68-3311714a69ad}**. Multiple /map options can be specified if multiple mappings are required. |
|
|**/map:*\<source\>*=*\<destination\>***| Specifies other partition type mappings between MBR and GPT. The MBR partition number is specified in decimal notation, not hexadecimal. The GPT GUID can contain brackets, for example: **/map:42={af9b60a0-1431-4f62-bc68-3311714a69ad}**. Multiple /map options can be specified if multiple mappings are required. |
|
||||||
|/allowFullOS| By default, MBR2GPT.exe is blocked unless it's run from Windows PE. This option overrides this block and enables disk conversion while running in the full Windows environment. <br>**Note**: Since the existing MBR system partition is in use while running the full Windows environment, it can't be reused. In this case, a new ESP is created by shrinking the OS partition.|
|
|**/allowFullOS**| By default, `MBR2GPT.exe` is blocked unless it's run from Windows PE. This option overrides this block and enables disk conversion while running in the full Windows environment. <br>**Note**: Since the existing MBR system partition is in use while running the full Windows environment, it can't be reused. In this case, a new ESP is created by shrinking the OS partition.|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Validation example
|
### Validation example
|
||||||
|
|
||||||
In the following example, disk 0 is validated for conversion. Errors and warnings are logged to the default location, **%windir%**.
|
In the following example, disk 0 is validated for conversion. Errors and warnings are logged to the default location of **`%windir%`**.
|
||||||
|
|
||||||
```cmd
|
```cmd
|
||||||
X:\>mbr2gpt.exe /validate /disk:0
|
X:\>mbr2gpt.exe /validate /disk:0
|
||||||
@ -92,14 +98,23 @@ MBR2GPT: Validation completed successfully
|
|||||||
In the following example:
|
In the following example:
|
||||||
|
|
||||||
1. Using DiskPart, the current disk partition layout is displayed prior to conversion - three partitions are present on the MBR disk (disk 0): a system reserved partition, a Windows partition, and a recovery partition. A DVD-ROM is also present as volume 0.
|
1. Using DiskPart, the current disk partition layout is displayed prior to conversion - three partitions are present on the MBR disk (disk 0): a system reserved partition, a Windows partition, and a recovery partition. A DVD-ROM is also present as volume 0.
|
||||||
|
|
||||||
2. The OS volume is selected, partitions are listed, and partition details are displayed for the OS partition. The [MBR partition type](/windows/win32/fileio/disk-partition-types) is **07** corresponding to the installable file system (IFS) type.
|
2. The OS volume is selected, partitions are listed, and partition details are displayed for the OS partition. The [MBR partition type](/windows/win32/fileio/disk-partition-types) is **07** corresponding to the installable file system (IFS) type.
|
||||||
2. The MBR2GPT tool is used to convert disk 0.
|
|
||||||
3. The DiskPart tool displays that disk 0 is now using the GPT format.
|
3. The MBR2GPT tool is used to convert disk 0.
|
||||||
4. The new disk layout is displayed - four partitions are present on the GPT disk: three are identical to the previous partitions and one is the new EFI system partition (volume 3).
|
|
||||||
5. The OS volume is selected again, and detail displays that it has been converted to the [GPT partition type](/windows/win32/api/winioctl/ns-winioctl-partition_information_gpt) of **ebd0a0a2-b9e5-4433-87c0-68b6b72699c7** corresponding to the **PARTITION_BASIC_DATA_GUID** type.
|
4. The DiskPart tool displays that disk 0 is now using the GPT format.
|
||||||
|
|
||||||
|
5. The new disk layout is displayed - four partitions are present on the GPT disk: three are identical to the previous partitions and one is the new EFI system partition (volume 3).
|
||||||
|
|
||||||
|
6. The OS volume is selected again, and detail displays that it has been converted to the [GPT partition type](/windows/win32/api/winioctl/ns-winioctl-partition_information_gpt) of **ebd0a0a2-b9e5-4433-87c0-68b6b72699c7** corresponding to the **PARTITION_BASIC_DATA_GUID** type.
|
||||||
|
|
||||||
As noted in the output from the MBR2GPT tool, you must make changes to the computer firmware so that the new EFI system partition will boot properly.
|
As noted in the output from the MBR2GPT tool, you must make changes to the computer firmware so that the new EFI system partition will boot properly.
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<details>
|
||||||
|
<summary>Expand to show MBR2GPT example</summary>
|
||||||
|
|
||||||
```cmd
|
```cmd
|
||||||
X:\>DiskPart.exe
|
X:\>DiskPart.exe
|
||||||
|
|
||||||
@ -219,6 +234,8 @@ Offset in Bytes: 524288000
|
|||||||
* Volume 1 D Windows NTFS Partition 58 GB Healthy
|
* Volume 1 D Windows NTFS Partition 58 GB Healthy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
## Specifications
|
## Specifications
|
||||||
|
|
||||||
### Disk conversion workflow
|
### Disk conversion workflow
|
||||||
@ -259,17 +276,18 @@ Since GPT partitions use a different set of type IDs than MBR partitions, each p
|
|||||||
4. All other MBR partitions recognized by Windows are converted to GPT partitions of type PARTITION_BASIC_DATA_GUID (ebd0a0a2-b9e5-4433-87c0-68b6b72699c7).
|
4. All other MBR partitions recognized by Windows are converted to GPT partitions of type PARTITION_BASIC_DATA_GUID (ebd0a0a2-b9e5-4433-87c0-68b6b72699c7).
|
||||||
|
|
||||||
In addition to applying the correct partition types, partitions of type PARTITION_MSFT_RECOVERY_GUID also have the following GPT attributes set:
|
In addition to applying the correct partition types, partitions of type PARTITION_MSFT_RECOVERY_GUID also have the following GPT attributes set:
|
||||||
|
|
||||||
- GPT_ATTRIBUTE_PLATFORM_REQUIRED (0x0000000000000001)
|
- GPT_ATTRIBUTE_PLATFORM_REQUIRED (0x0000000000000001)
|
||||||
- GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER (0x8000000000000000)
|
- GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER (0x8000000000000000)
|
||||||
|
|
||||||
For more information about partition types, see:
|
For more information about partition types, see:
|
||||||
|
|
||||||
- [GPT partition types](/windows/win32/api/winioctl/ns-winioctl-partition_information_gpt)
|
- [GPT partition types](/windows/win32/api/winioctl/ns-winioctl-partition_information_gpt)
|
||||||
- [MBR partition types](/windows/win32/fileio/disk-partition-types)
|
- [MBR partition types](/windows/win32/fileio/disk-partition-types)
|
||||||
|
|
||||||
|
|
||||||
### Persisting drive letter assignments
|
### Persisting drive letter assignments
|
||||||
|
|
||||||
The conversion tool will attempt to remap all drive letter assignment information contained in the registry that corresponds to the volumes of the converted disk. If a drive letter assignment can't be restored, an error will be displayed at the console and in the log, so that you can manually perform the correct assignment of the drive letter.
|
The conversion tool will attempt to remap all drive letter assignment information contained in the registry that corresponds to the volumes of the converted disk. If a drive letter assignment can't be restored, an error will be displayed at the console and in the log, so that you can manually perform the correct assignment of the drive letter.
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> This code runs after the layout conversion has taken place, so the operation cannot be undone at this stage.
|
> This code runs after the layout conversion has taken place, so the operation cannot be undone at this stage.
|
||||||
@ -293,7 +311,7 @@ Four log files are created by the MBR2GPT tool:
|
|||||||
- setupact.log
|
- setupact.log
|
||||||
- setuperr.log
|
- setuperr.log
|
||||||
|
|
||||||
These files contain errors and warnings encountered during disk validation and conversion. Information in these files can be helpful in diagnosing problems with the tool. The setupact.log and setuperr.log files will have the most detailed information about disk layouts, processes, and other information pertaining to disk validation and conversion.
|
These files contain errors and warnings encountered during disk validation and conversion. Information in these files can be helpful in diagnosing problems with the tool. The setupact.log and setuperr.log files will have the most detailed information about disk layouts, processes, and other information pertaining to disk validation and conversion.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> The setupact*.log files are different than the Windows Setup files that are found in the %Windir%\Panther directory.
|
> The setupact*.log files are different than the Windows Setup files that are found in the %Windir%\Panther directory.
|
||||||
@ -302,7 +320,7 @@ The default location for all these log files in Windows PE is **%windir%**.
|
|||||||
|
|
||||||
### Interactive help
|
### Interactive help
|
||||||
|
|
||||||
To view a list of options available when using the tool, type **mbr2gpt /?**
|
To view a list of options available when using the tool, enter **`mbr2gpt.exe /?`**
|
||||||
|
|
||||||
The following text is displayed:
|
The following text is displayed:
|
||||||
|
|
||||||
@ -348,19 +366,18 @@ MBR2GPT has the following associated return codes:
|
|||||||
|
|
||||||
| Return code | Description |
|
| Return code | Description |
|
||||||
|----|-------------|
|
|----|-------------|
|
||||||
|0| Conversion completed successfully.|
|
|**0**| Conversion completed successfully.|
|
||||||
|1| Conversion was canceled by the user.|
|
|**1**| Conversion was canceled by the user.|
|
||||||
|2| Conversion failed due to an internal error.|
|
|**2**| Conversion failed due to an internal error.|
|
||||||
|3| Conversion failed due to an initialization error.|
|
|**3**| Conversion failed due to an initialization error.|
|
||||||
|4| Conversion failed due to invalid command-line parameters. |
|
|**4**| Conversion failed due to invalid command-line parameters. |
|
||||||
|5| Conversion failed due to error reading the geometry and layout of the selected disk.|
|
|**5**| Conversion failed due to error reading the geometry and layout of the selected disk.|
|
||||||
|6| Conversion failed because one or more volumes on the disk is encrypted.|
|
|**6**| Conversion failed because one or more volumes on the disk is encrypted.|
|
||||||
|7| Conversion failed because the geometry and layout of the selected disk don't meet requirements.|
|
|**7**| Conversion failed because the geometry and layout of the selected disk don't meet requirements.|
|
||||||
|8| Conversion failed due to error while creating the EFI system partition.|
|
|**8**| Conversion failed due to error while creating the EFI system partition.|
|
||||||
|9| Conversion failed due to error installing boot files.|
|
|**9**| Conversion failed due to error installing boot files.|
|
||||||
|10| Conversion failed due to error while applying GPT layout.|
|
|**10**| Conversion failed due to error while applying GPT layout.|
|
||||||
|100| Conversion to GPT layout succeeded, but some boot configuration data entries couldn't be restored.|
|
|**100**| Conversion to GPT layout succeeded, but some boot configuration data entries couldn't be restored.|
|
||||||
|
|
||||||
|
|
||||||
### Determining the partition type
|
### Determining the partition type
|
||||||
|
|
||||||
@ -405,15 +422,15 @@ In this example, Disk 0 is formatted with the MBR partition style, and Disk 1 is
|
|||||||
|
|
||||||
When you start a Windows 10, version 1903-based computer in the Windows Preinstallation Environment (Windows PE), you encounter the following issues:
|
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 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's no output from the tool.
|
**Issue 2** When you manually run the `MBR2GPT.exe` command in a Command Prompt window, there's no output from the tool.
|
||||||
|
|
||||||
**Issue 3** When MBR2GPT.exe runs inside an imaging process such as a Microsoft Configuration Manager task sequence, an MDT task sequence, or by using a script, you receive the following exit code: 0xC0000135/3221225781.
|
**Issue 3** When `MBR2GPT.exe` runs inside an imaging process such as a Microsoft Configuration Manager task sequence, an MDT task sequence, or by using a script, you receive the following exit code: 0xC0000135/3221225781.
|
||||||
|
|
||||||
#### Cause
|
#### 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.
|
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
|
#### Workaround
|
||||||
|
|
||||||
@ -433,28 +450,28 @@ To fix this issue, mount the Windows PE image (WIM), copy the missing file from
|
|||||||
```cmd
|
```cmd
|
||||||
copy "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Setup\amd64\Sources\ReAgent*.*" "C:\WinPE_Mount\Windows\System32"
|
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:
|
This command copies three files:
|
||||||
|
|
||||||
* ReAgent.admx
|
- ReAgent.admx
|
||||||
* ReAgent.dll
|
- ReAgent.dll
|
||||||
* ReAgent.xml
|
- ReAgent.xml
|
||||||
|
|
||||||
**Command 2:**
|
**Command 2:**
|
||||||
|
|
||||||
```cmd
|
```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"
|
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:
|
This command copies two files:
|
||||||
|
|
||||||
* ReAgent.adml
|
- ReAgent.adml
|
||||||
* ReAgent.dll.mui
|
- ReAgent.dll.mui
|
||||||
|
|
||||||
> [!NOTE]
|
> [!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.
|
> 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.
|
||||||
|
|
||||||
3. After you copy all the files, commit the changes and unmount the Windows PE WIM. MBR2GPT.exe now functions as expected in Windows PE. For information about how to unmount WIM files while committing changes, see [Unmounting an image](/windows-hardware/manufacture/desktop/mount-and-modify-a-windows-image-using-dism#unmounting-an-image).
|
3. After you copy all the files, commit the changes and unmount the Windows PE WIM. `MBR2GPT.exe` now functions as expected in Windows PE. For information about how to unmount WIM files while committing changes, see [Unmounting an image](/windows-hardware/manufacture/desktop/mount-and-modify-a-windows-image-using-dism#unmounting-an-image).
|
||||||
|
|
||||||
## Related articles
|
## Related articles
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user