2012 Illinois Technology Association - CityLights Finalist

BLOGS

MPS Partners provides functional and technical expertise and insights into business process management trends and Microsoft technologies.

Contact Us
HOT JOBS
Interested in reviewing our current job openings or submitting a resume?
CLICK HERE
Home » Blog » Microsoft » How to convert Windows 7 on MBR/BIOS to GPT/UEFI

How to convert Windows 7 on MBR/BIOS to GPT/UEFI

Introduction

There are few reasons to switch from MBR on BIOS to GPT on UEFI, but some like adventure. Current OS and motherboard support is quite inconsistent and not well documented. If you first installed on the former and want to switch to the latter without having to lose all your data or re-install Windows, then this is your guide.

The basic idea is to backup the current install to a disk image, erase the disk, then reload the backup. Windows ships with a disk imaging tool and an image restore tool. Unfortunately the restore tool (wbadmin) requires the target partition to be at least the same size as the original backup, so we have to use another method for restore.

WARNING: You may lose all the data on your disk during this process. Make sure to back up your data!

Prerequisites

  1. A UEFI motherboard
  2. A copy of Windows 7 64bit installed to a local disk partitioned using MBR
  3. Windows install media (DVD, Hard disk, USB stick)
  4. Backup destination with enough space to hold a copy of your existing Windows install
  5. Sufficient free space on the Windows partition; the new partition will be about a gigabyte larger.

Process

  1. Backup your Windows installation and all other partitions on the physical disk to another physical disk. This backup can be done using the built-in image tool found within the control panel under “Backup and Restore” behind the “Create a system image” link. NOTE: The rest of this guide will assume just one partition to be restored.
  2. Reboot the computer to a Windows install disk.
  3. Open the command prompt
    1. press Shift + F10 at the “Install Windows” window.
  4. Repartition the disk
    1. diskpart
    2. list disk
    3. select disk x (where x is the number of the disk to convert)
    4. WARNING: This is your last chance to go back!
    5. clean
    6. convert gpt
    7. create partition ESP size=128
    8. format fs=fat32 quick
    9. assign letter=i or any other free drive letter
    10. create partition MSR size=128
    11. create partition primary
    12. format fs=ntfs label=”Windows” quick
    13. active
    14. assign letter=y or any other free drive letter
    15. exit
  5. Mount the backup VHD
    1. diskpart
    2. select vdisk file=filename.vhd where filename.vhd is your disk backup
    3. attach vdisk
    4. assign letter=z or any other free drive letter for your new partition
    5. type: exit
  6. Restore the files from the image
    1. z: (where z is the letter of your VHD)
    2. xcopy * y:\ /e /c /h /k /o /b /q /y (where d is the letter of your new partition)
      1. e = copy all subdirectories even if they are empty
      2. c = ignore errors
      3. h = copy hidden and system files
      4. k = retain readonly flag
      5. o = copy file ownership
      6. b = copy links as links
      7. q = quiet mode (should speed things up)
      8. y = always respond with yes instead of prompting
  7. Copy EFI bootloader to ESP partition
    1. i: (where z is the letter of your ESP partition)
    2. mkdir EFI
    3. cd EFI
    4. mkdir Boot
    5. mkdir Microsoft
    6. cd Microsoft
    7. mkdir Boot
    8. copy x:\Windows\Boot\EFI\bootmgfw.efi i:\EFI\Microsoft\Boot
    9. copy x:\Windows\Boot\EFI\bootmgfw.edi i:\EFI\Boot\bootx64.efi
  8. Create BCD
    1. This step varies quite a bit, depending on your system’s hardware, existing NVRAM (non-volatile memory on your motherboard), and hidden BCD stores scattered around your system’s disks and partitions.
    2. Cross your fingers and hope that this step can be done automatically
      1. bootrec /RebuildBcd
    3. If things don’t work out, you will have to resort to using bcdedit. A few notes about BCD edit: it operates on the motherboard’s NVRAM unless you specify a file. As far as I can gather, the NVRAM store doesn’t matter as my PC basically ignores any setting within and boots just fine after I’ve erased it.
      1. i:
      2. cd EFI\Microsoft\Boot
      3. bcdedit /createstore BCD
      4. bcdedit /store BCD  /create /d “Windows Boot Manager” {bootmgr}
      5. bcdedit /store BCD /create /d “Windows 7” /application osloader
      6. The previous command will return a GUID, referred to later as <guid>
      7. bcdedit /store BCD /set {bootmgr} default <guid>
      8. bcdedit /store BCD /set {bootmgr} path \EFI\Microsoft\Boot\bootmgfw.efi 
      9. bcdedit /store BCD /set {bootmgr} locale en-us
      10. bcdedit /store BCD /set {bootmgr} displayorder {default}
      11. bcdedit /store BCD /set {bootmgr} timeout 10
      12. bcdedit /store BCD /set {default} device partition=c:
      13. bcdedit /store BCD /set {default} osdevice partition=c:
      14. bcdedit /store BCD /set {default} path \windows\system32\winload.efi
      15. bcdedit /store BCD /set {default} systemroot \windows
  9. Change your motherboard firmware to run in UEFI mode
  10. You should now be able to select your Windows disk as your startup disk.

Good luck!

More Reading

This entry was posted in Microsoft, Mobile Solutions. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *

 
View By Author
  • View By Category
View By Date
Part Of SPR COMPANIES
© 2014 SPR Companies. All rights reserved. About | Competencies | Products | Solutions | Clients | Events & Resources | Careers | Site Map | Legal/Privacy