Windows 8 and 8.1 Forums

Tutorial: Upgrade MBR boot disk to EFI boot disk

  1. #1

    Tutorial: In-place upgrade MBR boot disk to EFI boot disk

    I've just finished an in-place upgrade of Windows 7 to 8.1u1 (with a intermediate step of upgrading W7 to W8).

    The system was installed was on a SSD with MBR partitions and I wanted to convert to GPT disk and initialize secure EFI boot, but Windows setup and DiskPart only allow this operation on a clean unformatted disk, and a few threads in the forum advise that this is the only option:

    Cannot boot UEFI install
    EFI / UEFI partition Deleted
    Anybody have luck imaging 8 with UEFI, GPT, Secure Boot?

    Fortunately I have found Microsoft KB articles that detail the process of manually making/restoring an EFI boot partition.

    There is a 3rd party disk partitioning utility that allows you to convert MBR disks to GPT disk and resize partitions to make room for EFI boot, WinRE and MSR partitions.

    So I thought this would be useful if someone would review the process and maybe the admin will eventually make a full step-by-step tutorial out of this thread.

    This guide can also be used to manually restore EFI system boot partition in case of failure.
    Last edited by DmitryKo; 25 May 2014 at 05:39.

      My System SpecsSystem Spec

  2. #2

    How to convert bootable MBR system disk to a UEFI bootable disk without losing your data in Windows 8/8.1

    Repair UEFI system boot partition (only perform steps 1, 5.ii, 6-7).

    You need to have a working Windows installation on a bootable MBR disk which has two partitions - a 100 MB system MBR partition (id=27) and a primary Windows partition with intact C:\Windows.

    In order to boot Windows in UEFI mode, you will have to convert your disk to GUID Partition Table (GPT) format, create (or re-create) the necessary system partitions, copy EFI Windows Boot Manager code to the System partition and create BCD store. Your Windows partition will be left intact and all your programs, files and settings will remain.

    0. Create a System Image Backup

    Control Panel, File History, System Image Backup

    Select a hard disk to store the backup. It should be a basic disk (NOT a dynamic disk) and should have enough free space to hold your entire C: partition.

    The backup should only be required if something goes very wrong with partition resize in step 3 - for example, if you accidentally wipe your main partition, or if a power surge interferes with non-destructive resize operation, in which case you should boot Windows Recovery Environment (WinRE) and restore your partitions.

    Note that if you decide to wipe the disk and run a clean install using Windows Setup media, this backup will NOT allow you to restore your files afterwards, since the size of the new partition will not match. You can only restore the full system partition as it was at the time of the backup.
      My System SpecsSystem Spec

  3. #3

    1. Prepare a bootable USB Recovery Media (WinRE)

    Control Panel, File History, Recovery

    Attach a USB stick with capacity of 512 MBytes or more. All contents on the USB media will be erased without warning.

    If you cannot boot to your Windows installation, you need a second working Windows 8/8.1 PC where you can make such USB Recovery media.

    Alternately, you can download Windows 8.1 setup ISO file from Microsoft, Windows 8 and Windows 8.1 ISO - Download or Create
    then make a bootable UEFI setup media from which you can run the recovery environment: UEFI Bootable USB Flash Drive - Create in Windows

    You can also copy the files from your installation DVD media, your Windows Recovery partition, or download the ISO media from a torrent (look for MSDN media for "Windows 8.1 with Update").

    You may try to boot from ISO DVD media then select Recovery at the Setup screen, but it would be much faster to use bootable USB disk. Plus, you can modify your WinRE WIM image to include the response file provided in step 5 on your USB Recovery Media; more details at
    Customize Windows RE)
      My System SpecsSystem Spec

  4. #4

    2. Prepare Partition Wizard Bootable CD

    You need to convert your system disk to GPT and resize the Windows partition to make room for system partitions. You cannot convert the system disk while the system is running, so you need an offline disk partitioning tool.

    Unfortunately built-in Windows DiskPart utility can only convert empty disks with no volumes and it cannot expand volumes at the beginning of the disk, so you need a third-party tool which supports non-destructive partition more/resize and can convert a MBR disk to a GPT disk.

    You can download MiniTool Partition Mizard Bootable CD from
    Partition Wizard Bootable CD allows user to manage partition directly with partition manager bootable CD.

    Burn the ISO image to a Mini CD-RW or prepare a bootable USB media if you wish, though you would only need to run this tool once.
      My System SpecsSystem Spec

  5. #5

    3. Resize the primary Windows partition

    Boot from Partition Wizard media and run the Partition Wizard.

    Delete the 100 MB system partition (be careful not to delete your primary Windows partition here!). If you still have a 350 Mbyte Vista/7 recovery partition at the end of the disk, you can delete it too.

    Then resize your primary Windows partition (drive C:) to have at least 529 MBytes of unallocated space before the start. This space is needed to hold Win RE, EFI boot and MSR partitions which take 1 + 300 + 100 + 128 MBytes.

    NB: if by any chance your bootable disk is a hard disk drive with native 4K sectors (a.k.a. Advanced Format 4Kn), and not Advanced Format 512e (i.e. emulation of 512 byte sectors) which is the abundant format for currently available 3 and 4 TB hard disks (as of 2014), then your EFI partition has to be 260 Mbytes (because of FAT32 minimum size limit of 65535 clusters), and so you need to reserve at least 689 Mbytes.

    Finally, convert your bootable hard disk from MBR to GPT partition type (even though UEFI specification allows booting from MBR disks, the practice is not consistent and GPT format offers some advantages anyway).

    Click "Apply" to commit the changes and wait for the Partition Wizard to finish.
    Last edited by DmitryKo; 25 May 2014 at 05:41.
      My System SpecsSystem Spec

  6. #6

    4. Boot to Windows Recovery media

    Restart again and boot the USB Recovery Media prepared in step 1.


    Diagnose, Advanced, Command Prompt

    If you are recovering your existing system boot partition, you will be asked for your password, and your command prompt will read C:\

    If you have no valid BCD store yet, you will boot into WinRE command prompt which will read X:\ and your drive C: will also be available. I will use X:\ to indicate WinRE command prompt.
      My System SpecsSystem Spec

  7. #7

    5. Create the three system partitions

    First you have to identify your bootable disk drive, which should now have at least 529 MBytes (or 689 Mbytes for 4Kn disks) of unallocated space at the start followed by your primary Windows partition, and select it:
    X:\ DiskPart
    DISKPART> list disk
    DISKPART> select disk 0

    Substitute 0 for the disk number of your actual Windows boot disk if it's different. Your boot disk can be connected to any SATA port, so it can have any disk number, and you can even install multiple versions of Windows on separate data partitions.

    Only one single disk in the system should have a EFI system partition where a Windows Boot Manager and Boot Configuration Data (BCD) store (and/or any other boot managers and their data) reside within the \EFI folder. UEFI boot managers for other operating systems are not covered here.

    Enter the following commands in the command prompt to prepare the partitions (if you are typing, you can ignore comments which are denoted by the rem command):

    rem == bootpart.txt   ==
    rem * i) Windows RE (Recovery Environment) partition *
    create partition primary size=300 offset=1024
    format quick fs=ntfs label="Windows RE Tools"
    set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
    gpt attributes=0x8000000000000001
    assign letter=R
    rem * ii) EFI System partition (ESP) *
    create partition efi size=100 offset=308224
    rem    ** size=260 for Advanced Format 4Kn drives  ** 
    format quick fs=fat32 label=System
    assign letter=S
    rem * iii) Microsoft Reserved (MSR) partition *
    create partition msr size=128 offset=410624
    rem    ** offset=574464 for Advanced Format 4Kn drives  ** 
    rem == bootpart.txt   ==

    There are quite a few weird alphanumeric constants to type, so you will probably need to print out this list. Alternately you can save these commands in a .TXT file - either on your drive C:, on another USB stick, or integrate to your Recovery USB boot media as outlined in step 1, - then run the script in the response file with
    DiskPart /S X:\bootpart.txt

    NB. Advanced Format 4Kn disks require a 260 MB system partition as outlined above in step 3.

    GPT attributes for the Recovery Environment partition are set to "platform required" and "no drive letter" - this prohibit any changes from within Disk Management snap-in and Windows Explorer.

    You can also set the partition id and GPT attributes at step 8 and skip it here.

    Note that the offset parameter (specified in kilobytes here) is needed if you have large unallocated space somewhere on the disk, like overprovisioning for a SSD drive, or a deleted recovery partition. DiskPart tends to use the largest available unallocated block, so it might use other free space and not the space at the start of the disk that you preserved in step 3. If you have no reserved free space, the offset parameter can be probably omitted.

    More info:
    Configure UEFI/GPT-Based Hard Drive Partitions
    Sample: Configure UEFI/GPT-Based Hard Drive Partitions by Using Windows PE and DiskPart
    Last edited by DmitryKo; 25 May 2014 at 13:38.
      My System SpecsSystem Spec

  8. #8

    6. Verify the partitions

    Your four partitions on the boot disk should look exactly like this now:

    DISKPART> list partition
      Partition ###  Type              Size     Offset
      -------------  ----------------  -------  -------
      Partition 1    Recovery           300 MB  1024 KB
      Partition 2    System             100 MB   301 MB
    * Partition 3    Reserved           128 MB   401 MB
      Partition 4    Primary            XXX GB   529 MB

    Asterisk (*) denotes currently selected partition. Select the EFI system partition and verify its attributes:

    DISKPART> select partition 2
    DISKPART> detail partition
    Partition 2
    Type    : c12a7328-f81f-11d2-ba4b-00a0c93ec93b
    Hidden  : Yes
    Required: No
    Attrib  : 0X8000000000000000
    Offset in Bytes: 315621376
      Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
      ----------  ---  -----------  -----  ----------  -------  ---------  --------
    * Volume 4     S  SYSTEM       FAT32  Partition     100 MB  Healthy    System

    If something is missing, you will have to delete the system partition

    DISKPART> delete partition override

    and re-create it again as specified in step 5.ii.

    Exit DiskPart and return to command prompt:

    DISKPART> exit
    Last edited by DmitryKo; 25 May 2014 at 05:48.
      My System SpecsSystem Spec

  9. #9

    7. Make system partition bootable

    Run BCDBoot tool to rebuild a new BCD store, copy EFI Boot Manager and OS loader files to drive S: and configure Windows Boot Manager settings in the UEFI BIOS. If you are repairing the ESP partition, you might want to make a backup copy of the existing BCD store first:
    X:\ xcopy S:\EFI\Microsoft\Boot\BCD S:\EFI\Microsoft\Boot\BCD.copy01.
    X:\ BCDBoot C:\Windows /l en-US /s S: /f ALL

    To list available boot locales, run
    X:\ dir /ad S:\EFI\Microsoft\Boot

    You can then run BCDBoot command again but this time substitute "en-US" with your preferred locale to be displayed at boot time.

    You can also copy WinRE image now, as outlined in step 8 below.

    Close the command prompt window or type "exit", then click Continue to boot Windows 8/8.1 and leave Windows Recovery Environment.

    You should have a fully working bootable Windows 8/8.1 installation by now.

    More info:
    BCDboot Command-Line Options
    Last edited by DmitryKo; 25 May 2014 at 13:29.
      My System SpecsSystem Spec

  10. #10

    8. Finalize WinRE partition

    Boot Windows and open command prompt (cmd.exe) in administrator mode: press Win key to open Start scren, type CMD, then right click Command Prompt and select Run as Administrator.

    In the first command prompt windows, run DiskPart to assign a drive letter to the WinRE partition on your boot disk (using the disk number obtained on step 5):
    C:\ DiskPart
    DISKPART> select disk 0
    DISKPART> select partition 1
    DISKPART> assign letter=R

    Open the second command prompt window to copy the system WinRE image to the WinRE partition, if not done already,
    md R:\Recovery\WindowsRE
    xcopy /h C:\Windows\System32\Recovery\Winre.wim R:\Recovery\WindowsRE

    and enable WinRE image:
    reagentc /setreimage /path R:\Recovery\WindowsRE /target C:\Windows
    reagentc /enable

    Return to the first "Administrator:Command prompt - DiskPart" window to remove the drive letter assignment:
    DISKPART> remove
    DISKPART> exit

    More info:
    System image backup fails after you upgrade to Windows 8.1 or Windows Server 2012 R2
    REAgentC Command-Line Options
    Last edited by DmitryKo; 25 May 2014 at 13:30.
      My System SpecsSystem Spec

Page 1 of 2 12 LastLast
Tutorial: Upgrade MBR boot disk to EFI boot disk

Similar Threads
Thread Forum
Cannot Boot From Startup Repair Disk
Hello, I have a Toshiba Laptop Satellite L875D-S7332 Part No. PSKFQU-008003 With Windows 8 x64 Preinstalled. I created a Startup Repair Disk with a DVD. My problem is i cannot boot from this DVD. I changed the Bios to boot from DVD but it still doesn't work! Can Anyone help me? Thank You, heaven5733
Performance & Maintenance
HELP - I can't boot to win 8 recovery disk....
Hi, I have a big problem. I have (had) a dual boot with Windows 8.1 and win7 and I was using EasyBCD to edit the boot order. Now, when I try to reboot, I get a blue screen - saying 'RECOVERY - Your PC needs to be repaired'. I have a bootable USB recovery medium for win 8 but the problem is that I...
General Support
Want to make SSD boot disk, too much on HDD to clone
I have over 600 GB on my HDD from games, media, and files. I bought a 250GB SSD to boot my OS off of and put some selected programs on. Even after deselecting all my media files, there is still too much on my HDD for the included Samsung clone client to proceed. I just want to use my new SSD as a...
Installation & Setup
USB boot disk for Windows 8
I just recently purchased a TOSHIBA Canvio Connect (EZ) portable hard drive to back up my HP Pavilion. The backup went well. Following the Canvio instructions I created a boot drive on a USB Flash drive. Then I booted up the PC using the Flash drive and pressed the F12 Key as per instructions. I...
General Support
How to do a backslash in dos on boot to W8 install disk
Hi when booting to the W8 install disk and going to the dos prompt, my backslash come out as a #, I have tried different keyboards in the first screen but nothing helps so far. Apparently it depends on the keyboard configuration in the dos program, how can i find out what that is, or how...
General Support
PC Will Not Boot From a WinPE 4 Boot Disk
My computer shipped from the factory (Dell) with Windows 7 x64. I recently did a clean ('custom') install of Windows 8 Pro x64. The install went very well, no problems. To install Windows 8, I booted from a USB flash drive. I actually have two licensed copies of Windows 8. The other copy is on a...
General Support
Disk check on boot
Sorry if I'm posting this in the wrong place but I can't decide where to go. I've been using 8RP for a couple of months with no problems. I'm dual booting with 8RP and XP. About a week ago when I tried to shut down I got a black screen with (movable) mouse pointer. Nothing happened and...
Performance & Maintenance

Eight Forums Android App Eight Forums IOS App Follow us on Facebook