How to move an existing installation of Window 7 64bit to UEFI (from legacy)
No, you shouldn't have to format and reinstall, as you can convert your disk to allow UEFI booting via
gptgen, an excellent opensource project that non-destructively converts a MBR partition table to GPT.
Microsoft published a good tutorial on this process (unabridged), with the abridged version below taking <10 minutes to do:
- Backup anything important by creating a system repair disc or using the Windows install media
- Identity the hard disk you want to convert via Windows Disk Manager (usually
- Download and unzip
gptgen, start a cmd prompt as Admin, and run:
WARNING: You did back up your data, right - this is the point of no-return
You may or may not see a blue-screen after you run the above command, either is normal
gptgen.exe -w \\.\physicaldrive0
- Boot the Windows install disc or system repair disc, choosing language and preferences, then: Repair Your Computer - Troubleshoot - Advanced options - Command Prompt
diskpart, identifying the boot disk containing Windows via
Disk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- --- * Disk 0 Online 128 GB 0 B *
- Select the disk via
select disk <#>and verify via
Partition ### Type Size Offset ------------- ---------------- ------- ------- Partition 1 Primary 350 MB 1024 KB Partition 2 Primary 126 GB 350 MB
- Delete previous system partition:
select partition 1 delete partition
- Create the new boot and Microsoft reserved partitions:
create partition EFI size=100 offset=1 format quick fs=fat32 label="System" assign letter=S create partition msr size=128 offset=103424
- Verify via
Partition ### Type Size Offset ------------- ---------------- ------- ------- Partition 1 System 100 MB 1024 KB Partition 2 Reserved 128 MB 101 MB Partition 3 Primary 126 GB 229 MB
- Ensure the Windows install is mounted, replacing
3with the Windows installation, then exit:
list volume select volume 3 assign letter=C exit
- Generate boot partition data, replacing
C:with the Windows installation, then reboot:
bcdboot C:\Windows /s S: /f UEFI
Convert Windows Installation from Legacy to UEFI:
Please note that this technique will work only for those computer systems which support UEFI firmware. Please check that first in your BIOS settings and then continue with this tutorial.
Step 1: Confirm that you installation is indeed in Legacy Mode. Press WinKey + R and then type
msinfo32and hit enter. The BIOS mode should be Legacy in System Summary.
Step 2: Download System Rescue Disk and make a bootable media from it. Download the disk from here. See instructions to make bootable media. That is pretty trivial and one can follow this tutorial.
- Step 3: Reboot into Legacy or UEFI mode using the bootable media that you created in Step2.
- Step 4: Run the command:
testdiskUse the arrow keys to navigate. Select your HDD in which Windows is installed in Legacy Mode and press enter. Select [EFI GPT] EFI GPT Partition Map and press enter. Select Analyze and hit enter. Select Quick Search (at the bottom) and hit enter. Select Continue (at the bottom) and hit enter. Hit enter again. Select Write (at the bottom) and hit enter. Press Y and hit enter. Your partition table has changed from MBR to GPT.
- Step 5: Reboot into UEFI mode using Windows recovery/installation media.
- Step 6: Open command prompt. Shortcut is: shift+F10
Step 7: Run the following commands:
list disk- Note the disk number which contains your windows installation. Let us say, it is
select disk x
list partition- Note the partition number which contains your windows installation. Let us say, it is
select partition y
shrink minimum=200 desired=200
create partition efi
list partition- Note the partition number of the new one. Let us say, it is
select partition z
format fs = fat32
assign letter = b:
cd /d b:\EFI\Microsoft
bcdboot c:\windows /l en-us /s b: /f ALL- Please note that here
c:denotes the letter of the partition in which windows is installed. Lets find that out first.
Step 8: Reboot. Tada! Done! Check whether your installation has changed into UEFI or not.
Ref: How to Convert Windows 7/8/8.1 Installation from Legacy to UEFI Without Data Loss!
Simpler way using gdisk: Convert Windows 7/8/10 Installation from Legacy to UEFI Without Data Loss (Simpler Method)
Windows 7 on UEFI requires that the disk partitions use GUID partition table (GPT) rather than the traditional MBR partitioning format found on BIOS systems. Unfortunately, windows provides no way of converting an MBR partition to a GPT one non-destructively.
However, if you don't mind copying data off your drive, converting, then copying it back then you could use Windows to do it as described in this Microsoft Technet article Change a Master Boot Record Disk into a GUID Partition Table Disk. The article describes two procedures, both of which require making a copy of the data then modifying the disk to use GPT. Using the Windows interface you first delete any volumes on the disk and then convert the disk to a GPT disk using right click on the disk and selecting menu items. Using the command shell with Admin elevation, you use the
diskpart utility to delete any volumes and then convert the disk to a GPT disk.
If you don't want to backup the data first and have access to a a Linux machine that you can install the drive in, there are tools in Linux that will allow you to convert the partition type non-destructively as described here. If you don't have a Linux box handy, you can also try creating a Linux boot CD and booting from that.
Searhing for "convert MBR to GPT" brings up other tools, but I have never tried them.