When I installed win8.1 on a old laptop, I met a problem that the disk is MBR. Since I’ve deleted previous win7, it is impossible for me to search for a correct software on the Internet. However, I managed to deal with it with Diskpart. Just record the process for usage in the future.

Diskpart

Windows has a built-in command line tool named Diskpart. To start it, run it from something like cmd. Just type

diskpart

The command line will load Diskpart. There are some basic commands.

list volume # list all the volumes like C, D
select volume C # select C, like select a database in MySQL?
delete volume # delete it

list disk # list all the disks
select disk 0 # similar to select volume

How to Convert MBR to GPT with DiskPart

list disk
select disk 0 # for laptop with only one disk, generally it is 0
clean # clean everything on disk 0
convert gpt # convert MBR to GPT

# GPT okay, then for efi
create partition efi size=100 # EFI partition
create partition msr size=128 # As Microsoft recommended
create partition primary size=100000 # the primary partition. You can set other partition after you install the OS.
list partition # done

Then I can install Windows after I set EFI.