Tag Archives: uefi

Windows 10 – Converting To UEFI

Background

With Windows 10 preparing to shuffle off this mortal coil, I’m trying to decide how to handle it. Based on the Windows 11 hardware requirements (TPM, and an unsupported CPU i7-6800k/Broadwell-E) I’m likely going to move to Zorin OS. But I’m planning on dual-booting as a transition (as well as if I hit any issues gaming), so eventually Zorin will be the main driver, and the Win10 image just for emergencies.

Unfortunately I’ve running Win10 since the beginning, so its a little rough around the edges. The main thing to change is move from MBR to the shiny UEFI compatible GPT boot partition.

Unfortunately the handy mbr2gpt.exe tool was hitting the “OS Not Found” problem, and apparently the Windows Recovery Environment [WinRE] never worked, so here we go!

Fixing the Windows Recovery image

Download the Windows Media Creation Tool and create an ISO image for installation on another system.

Open the ISO archive and extract Sources\install.esd

Usually Windows Pro is number 6, but just to check

g:\>dism /Get-WimInfo /WimFile:install.esd

Deployment Image Servicing and Management tool
Version: 10.0.19041.3636

Details for image : install.esd

Index : 1
Name : Windows 10 Home
Description : Windows 10 Home
Size : 15,236,014,793 bytes

Index : 2
Name : Windows 10 Home N
Description : Windows 10 Home N
Size : 14,461,663,459 bytes

Index : 3
Name : Windows 10 Home Single Language
Description : Windows 10 Home Single Language
Size : 15,238,702,954 bytes

Index : 4
Name : Windows 10 Education
Description : Windows 10 Education
Size : 15,586,696,335 bytes

Index : 5
Name : Windows 10 Education N
Description : Windows 10 Education N
Size : 14,821,374,633 bytes

Index : 6
Name : Windows 10 Pro
Description : Windows 10 Pro
Size : 15,583,732,666 bytes

Index : 7
Name : Windows 10 Pro N
Description : Windows 10 Pro N
Size : 14,818,128,477 bytes

The operation completed successfully.

Now extract the encrypted image as a wim file

g:\>dism /export-image /SourceImageFile:install.esd /SourceIndex:6 /DestinationImageFile:install.wim /Compress:max /CheckIntegrity

Deployment Image Servicing and Management tool
Version: 10.0.19041.3636

Exporting image
[==========================100.0%==========================]
The operation completed successfully.

Mount the image (wait for the mount to complete before the next step)

g:\>md tempMount

g:\>dism /mount-wim /wimfile:"install.wim" /index:1 /mountdir:"tempMount" /ReadOnly

Deployment Image Servicing and Management tool
Version: 10.0.19041.3636

Extract the needed file (Winre.wim) from Windows\System32\Recovery, move it to C:\Windows\System32\Recovery register it, and enable it

reagentc /setreimage /path C:\Windows\System32\Recovery
reagentc /enable
reagentc /info

Rebuild BCD

Now boot into recovery (shift + reboot), select Advanced, and boot into the shell. Then run

bootrec /rebuildbcd

Convert to GPT

Assuming that runs successfully, you should now be able to run (do /validate first!!)

mbr2gpt.exe /convert /allowFullOS

In my case it left the “System Reserved” partition alone, resized the OS partition, and created an EFI partition. At which point Windows Blue Screened (so no captures) and eventually rebooted.

All came back, and we are now in the shiny world of EFI 🙂