Convert Windows 10 from Legacy BIOS to UEFI without Data Loss  

Page 1 of 33 12311 ... LastLast
    Convert Windows 10 from Legacy BIOS to UEFI without Data Loss

    Convert Windows 10 from Legacy BIOS to UEFI without Data Loss

    How to Convert Windows 10 from Legacy BIOS to UEFI without Data Loss
    Published by Category: Installation & Upgrade
    15 Jul 2023
    Designer Media Ltd

    How to Convert Windows 10 from Legacy BIOS to UEFI without Data Loss


    Starting in Windows 10 version 1703 build 15063, you can use the MBR2GPT.EXE command line tool to convert a disk from Master Boot Record (MBR) (used in Legacy BIOS) to GUID Partition Table (GPT) (used in UEFI) without having to clean install Windows 10 or modifying or deleting data on the disk. The tool is designed to be run from a Windows Preinstallation Environment (Windows PE) command prompt, but can also be run from the full Windows 10 operating system (OS).

    If your PC or motherboard supports UEFI, then you could use the MBR2GPT tool to switch from a Legacy BIOS to UEFI Windows 10 installation without data loss.

    This tutorial will show you how to convert a Legacy BIOS Windows 10 installation using a MBR disk to a UEFI Windows 10 installation using a GPT disk without data loss.

    You will only be able to convert a 64-bit Windows 10 to UEFI.



    MBR2GPT syntax and options:

    MBR2GPT /validate|convert [/disk:<diskNumber>] [/logs:<logDirectory>] [/map:<source>=<destination>] [/allowFullOS]

    Option Description
    /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.
    /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 that 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. The log file names are: diagerr.xml, diagwrn.xml, setuperr.log, and setupact.log.
    /map:<source>=<destination> Specifies additional partition type mappings between MBR and GPT. The MBR partition number is specified in decimal notation, not hexidecimal. 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 is run from Windows PE. This option overrides this block and enables disk conversion while running in the full Windows environment.

    MBR2GPT Return Codes:

    Return Code Description
    0 Conversion completed successfully.
    1 Conversion was canceled by the user.
    2 Conversion failed due to an internal error.
    3 Conversion failed due to an initialization error.
    4 Conversion failed due to invalid command-line parameters.
    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.
    7 Conversion failed because the geometry and layout of the selected disk do not meet requirements.
    8 Conversion failed due to error while creating the EFI system partition.
    9 Conversion failed due to error installing boot files.
    10 Conversion failed due to error while applying GPT layout.
    100 Conversion to GPT layout succeeded, but some boot configuration data entries could not be restored.

    If you dual boot Windows 10 with any other operating system, then do not use this tutorial. This tutorial is only meant for a standalone Windows 10 installation on a PC.

    If your Windows 10 OS disk is encrypted by BitLocker, then you will need to decrypt the OS disk before conversion. You will be able to encrypt the OS disk again after the conversion. The MBR2GPT tool can convert operating system disks that have earlier versions of Windows 10 installed, such as versions 1507, 1511, and 1607. However, you must run the tool while booted into Windows 10 version 1703 or later, and perform an offline conversion. It is recommended to update to the latest version (ex: 1703) version of Windows 10 instead, then perform the conversion.

    Offline conversion of system disks with earlier versions of Windows installed, such as Windows 7, 8, or 8.1 are not officially supported. The recommended method to convert these disks is to upgrade the operating system to Windows 10 first, then perform the conversion.

    Although disks configured with MBR-style partition can have up to four primary partitions, for this process to work the disk you want to convert can't have more than three partitions, because one allocation is needed to create the new UEFI system partition.


    Contents

    • Option One: To Convert Windows 10 from Legacy BIOS to UEFI in Windows 10
    • Option Two: To Convert Windows 10 from Legacy BIOS to UEFI at Boot



    Video: Shifting from BIOS to UEFI with the Windows 10 Creators Update MBR2GPT disk conversion tool








    OPTION ONE

    To Convert Windows 10 from Legacy BIOS to UEFI in Windows 10


    1 Open an elevated command prompt.

    2 Copy and past the mbr2gpt /convert /allowfullOS command into the elevated command prompt, and press Enter. (see screenshot below)

    3 When the conversion has successfully completed, you will need to boot to UEFI firmware settings, and switch the firmware to boot to UEFI mode instead of Legacy BIOS (CSM).

    You may need to read your PC's or motherboard's manual for its specific instructions on how to change this setting.


    Convert Windows 10 from Legacy BIOS to UEFI without Data Loss-mbr2gtpt-2.jpg






    OPTION TWO

    To Convert Windows 10 from Legacy BIOS to UEFI at Boot


    1 Open a command prompt at boot.

    2 Copy and paste the mbr2gpt /convert command into the command prompt at boot, and press Enter. (see screenshot below)

    3 When the conversion has successfully completed, you will need to boot to UEFI firmware settings, and switch the firmware to boot to UEFI mode instead of Legacy BIOS (CSM).

    You may need to read your PC's or motherboard's manual for its specific instructions on how to change this setting.


    Convert Windows 10 from Legacy BIOS to UEFI without Data Loss-mbr2gtpt_at_boot-2.png


    That's it,
    Shawn Brink






  1. Posts : 16,325
    W10Prox64
       #1

    That's a good one Shawn.
      My Computer


  2. Posts : 10
    windows 11 x64
       #2

    hello, i'm getting this:

    Microsoft Windows [Version 10.0.15063]
    (c) 2017 Microsoft Corporation. All rights reserved.

    C:\WINDOWS\system32>MBR2GPT /validate /allowFullOS
    MBR2GPT: Attempting to validate disk 0
    MBR2GPT: Retrieving layout of disk
    MBR2GPT: Validating layout, disk sector size is: 512 bytes
    Cannot find OS partition(s) for disk 0

    please help
      My Computer


  3. Posts : 68,543
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #3

    Hello gdc88, and welcome to Ten Forums. :)

    Please go ahead and post a screenshot showing the full layout of your drives in Disk Management to see what may be happening.

    Disk Management - How to Post a Screenshot of - Windows 10 General Tips Tutorials

    In addition, upload the log files below from the command.

    C:\Windows\setupact.log

    C:\Windows\setuperr.log
      My Computers


  4. Posts : 10
    windows 11 x64
       #4

    Thanks for fast response - Brink:

    Convert Windows 10 from Legacy BIOS to UEFI without Data Loss-disk-manager.jpg

    logs.rar


    Brink said:

    Hello gdc88, and welcome to Ten Forums. :)

    Please go ahead and post a screenshot showing the full layout of your drives in Disk Management to see what may be happening.

    Disk Management - How to Post a Screenshot of - Windows 10 General Tips Tutorials

    In addition, upload the log files below from the command.

    C:\Windows\setupact.log

    C:\Windows\setuperr.log
      My Computer


  5. Posts : 68,543
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #5

    I'm seeing a lot of "Cannot get volume name for the recovery boot entry" errors.

    As a test, temporarily disconnect all drives other than the Windows drive, run a startup repair, and try the command again. Afterwards, you can connect the other drive again.

    Run Startup Repair in Windows 10 - Windows 10 Performance Maintenance Tutorials
      My Computers


  6. Posts : 10
    windows 11 x64
       #6

    Startup Repair diagnosis and repair log---------------------------Last successful boot time: ‎4/‎12/‎2017 3:22:16 PM (GMT)Number of repair attempts: 2Session details---------------------------System Disk = \Device\Harddisk0Windows directory = H:\WINDOWSAutoChk Run = 0Number of root causes = 1Test Performed: ---------------------------Name: Check for updatesResult: Completed successfully. Error code = 0x0Time taken = 0 msTest Performed: ---------------------------Name: System disk testResult: Completed successfully. Error code = 0x0Time taken = 0 msTest Performed: ---------------------------Name: Disk failure diagnosisResult: Completed successfully. Error code = 0x0Time taken = 16 msTest Performed: ---------------------------Name: Disk metadata testResult: Completed successfully. Error code = 0x0Time taken = 0 msTest Performed: ---------------------------Name: Target OS testResult: Completed successfully. Error code = 0x0Time taken = 297 msTest Performed: ---------------------------Name: Volume content checkResult: Completed successfully. Error code = 0x0Time taken = 0 msTest Performed: ---------------------------Name: Boot manager diagnosisResult: Completed successfully. Error code = 0x0Time taken = 0 msTest Performed: ---------------------------Name: System boot log diagnosisResult: Completed successfully. Error code = 0x0Time taken = 0 msTest Performed: ---------------------------Name: Event log diagnosisResult: Completed successfully. Error code = 0x0Time taken = 16 msTest Performed: ---------------------------Name: Internal state checkResult: Completed successfully. Error code = 0x0Time taken = 0 msTest Performed: ---------------------------Name: Check for pending package installResult: Completed successfully. Error code = 0x0Time taken = 1281 msTest Performed: ---------------------------Name: Boot status testResult: Completed successfully. Error code = 0x0Time taken = 0 msRoot cause found: ---------------------------Boot status indicates that the OS booted successfully.------------------------------------------------------Session details---------------------------System Disk = \Device\Harddisk0Windows directory = H:\WINDOWSAutoChk Run = 0Number of root causes = 1Test Performed: ---------------------------Name: Check for updatesResult: Completed successfully. Error code = 0x0Time taken = 0 msTest Performed: ---------------------------Name: System disk testResult: Completed successfully. Error code = 0x0Time taken = 0 msTest Performed: ---------------------------Name: Disk failure diagnosisResult: Completed successfully. Error code = 0x0Time taken = 0 msTest Performed: ---------------------------Name: Disk metadata testResult: Completed successfully. Error code = 0x0Time taken = 0 msTest Performed: ---------------------------Name: Target OS testResult: Completed successfully. Error code = 0x0Time taken = 281 msTest Performed: ---------------------------Name: Volume content checkResult: Completed successfully. Error code = 0x0Time taken = 250 msTest Performed: ---------------------------Name: Boot manager diagnosisResult: Completed successfully. Error code = 0x0Time taken = 0 msTest Performed: ---------------------------Name: System boot log diagnosisResult: Completed successfully. Error code = 0x0Time taken = 0 msTest Performed: ---------------------------Name: Event log diagnosisResult: Completed successfully. Error code = 0x0Time taken = 16 msTest Performed: ---------------------------Name: Internal state checkResult: Completed successfully. Error code = 0x0Time taken = 0 msTest Performed: ---------------------------Name: Check for pending package installResult: Completed successfully. Error code = 0x0Time taken = 1484 msTest Performed: ---------------------------Name: Boot status testResult: Completed successfully. Error code = 0x0Time taken = 0 msRoot cause found: ---------------------------Boot status indicates that the OS booted successfully.------------------------------------------------------
      My Computer


  7. Posts : 10
    windows 11 x64
       #7

    in addition, i had to start the diagnostic through usb - in my troubleshot doesn't appear "Startup Repair"

    thank you
      My Computer


  8. Posts : 68,543
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #8

    It looks like the issue is that you not have a working recovery partition. That would also be why "Startup Repair" wasn't available unless you booted from the Windows 10 installation USB.
      My Computers


  9. Posts : 10
    windows 11 x64
       #9

    is there any way to recover it?

    * already tried backup restore from my laptop - but it didn't work
      My Computer


 

Tutorial Categories

Convert Windows 10 from Legacy BIOS to UEFI without Data Loss Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:44.
Find Us




Windows 10 Forums