How to convert MBR HDD installed with Windows 10 to GPT and make it bootable?

I have an old computer installed with Windows 10 on an MBR HDD. Now I got a new Dell PC. I move the MBR HDD to the new PC but it is not bootable. I turn off the secure boot option and the PPT option, turn on the legacy boot support option, and select the legacy device in the boot sequence page, but it still cann’t boot. It seems Dell ceases the support for booting from internal legacy HDD now. The text shown on BIOS also says the legacy boot option is only for external devices such as USB, and is not for internal devices such as HDD. Worse is I could not downgrade the Dell BIOS to old version hoping the old version of BIOS supports booting from legacy MBR internal HDD. When flashing BIOS with the old bios, it displays the error “BIOS update blocked due to unsupported downgrade version”. I hope I didn’t upgrade my BIOS to the latest version but it is too late. This is a bad barbaric behavior. No wonder its sales is bad in recent years. The only option left for me is to convert the MBD HDD to GPT HDD to boot it in the UEFI mode of BIOS.

How to convert MBR to GPT without data loss and even let the converted GPT bootable with the existing Windows 10 so that I needn’t reinstall OS and hundreds of software on the HDD?

Backup the whole HDD.

Convert the MBR to GPT using gdisk.

Although there is a Windows version of gdisk, I’d like to do it under Linux. First, you need to download a small Linux iso such as the netinstall iso for Fedora. This iso is less than 1GB so it can be burned on a small USB drive less than 1GB. The netinstall iso isn’t for installing Fedora on USB but is intended for downloading most packages of Fedora from the Internet and installing them on a HDD. But the netinstall iso does include a shell and some tools including gdisk that is enough for our aim. After downloading the Fedora netinstall iso, use the Rufus to burn the iso into a thumb drive. Note that you should choose the dd mode instead of the iso mode when burning the ISOHybrid image, otherwise, the usb is not bootable with the error “error file ‘/boot/grub/i386-pc/normal.mod’ not found”. This is not caused by Rufus does not ship with the required Grub files. You don’t need to connect to network to download the required grub version . Just re-burn the image with dd mode. After making the bootable Linux USB drive, boot the computer from the USB and select “troubleshooting” instead of installing from network. It will give you a shell where you can do the work. Run gdisk in the shell then type the device name for the MBR HDD like /dev/sda. type “t” to change the type for a partition , select the system reserved partition, then type “EF00″ as the new type. Now, the type of the system reserved partition is changed from” Miscrosoft basic data” to “EFI system partition”. Type “w” to write the GPT with changed partition type to the disk and exit gdisk.

Now insert the HDD as the internal HDD of the new PC, plugin a USB containing Windows 10 installation media. Boot the new PC in UEFI mode. Because the UEFI information on the HDD is not correct yet, the system will boot from the USB Windows 10 installation disk. Don’t install Windows 10 but choose to repair the PC, then enter into a command prompt to fix the EFI partition on the HDD. Run diskpart, type “select disk 0″ to select the GPT HDD, type “select volume #” to select the volume corresponding to the EFI partition. Type “format fs=fat32″ to format the EFI partition. Type “exit” to exit diskpart. Other useful diskpart commands you might use are “list disk”, “list partition”, “list volume” , “format fs=fat32 override”, “assign letter P:”. Run “bcdboot c:\Windows” to copy the EFI boot files from C:\windows(the location of the existing Windows on the HDD although it was installed in BIOS/MBR mode the directory does have the needed boot files for EFI). If everything is ok, you can now reboot the computer and it will boot the old Windows in UEFI mode.  Note that the original system reserved partition might be formatted in NTFS format. That was not a problem for BIOS/MBR because the BIOS boot process is: BIOS reads/executes the MBR, MBR finds the active partition (the system reserved partition in our case) then reads/executes the PBR(partition boot record – the first sector of the active partition), PBR may read/execute the first several sectors of the active partition then obtain the ability of parsing NTFS file system so it can find and execute the window boot manager in the system reserved partition. But if you don’t change the system reserved partition from NTFS to fat32 as we did in diskpart, even after you fix the boot manager with bcdboot, you still could not boot in UEFI mode because UEFI firmware does not read/execute MBR and PBR. It has the file system parsing ability itself but can only parse FAT32 file system so it won’t find the boot manager in the efi partition.  You can assign a letter P: for the system reserved partition in diskpart and run “bcdboot c:\windows /s P: /f ALL” to copy both BIOS boot manager and UEFI boot manager to the EFI partition provided the EFI partition has enough space(possibly larger than 100M) otherwise you will get “copy boot files failure” error. Then, the HDD can boot in both BIOS and UEFI modes. Also note that without the /s(s stands for system volume) and /f (f stands for firmware) options, bcdboot will add an entry in NVRAM(CMOS) to point to the boot manager in the efi partition. With /s presence, bcdboot won’t bother to modify NVRAM(CMOS) so it relys on the firmware itself to find the proper boot manager.

Posted in Webmaster Tools