0

My MSI Z390 board is set to boot from Legacy + UEFI, but when I converted my MBR drive to GPT it didn't recognise it as a UEFI drive, despite it showing up as GPT in DiskPart. The same thing happens when its set to boot from UEFI only.

Is this most likely just a procedural error in the conversion step or something else? I reinstalled w10 from scratch after not being able to boot from the drive, and weirdly it didn't let me install on that disk because it was GPT - and my bios was still set to Legacy + UEFI.

(I converted using the aomei partition assistant because for whatever reason the mbr2gpt tool didn't want to work)

3
  • "when I converted my MBR drive to GPT" - how? "it didn't let me install on that disk because it was GPT" - you booted the drive via CSM/BIOS, you have to boot with UEFI to install for UEFI.
    – gronostaj
    Jun 6, 2019 at 9:44
  • sorry if this is stupid, but if my bios is set to legacy + uefi, and the drive I wanted to install on is gpt, what did I do wrong? would setting boot to UEFI only and using non uefi installation media work?
    – chris
    Jun 6, 2019 at 9:46
  • 3
    No, it wouldn't work. You need a UEFI installation media. AFAIR Microsoft's media creation tools create a hybrid UEFI/BIOS media. If you have legacy + UEFI enabled, then you should have 2 ways to boot from that single media. You have to choose UEFI.
    – gronostaj
    Jun 6, 2019 at 10:25

1 Answer 1

3

It's not enough for a disk to be GPT. (In fact, it's not actually required for a disk to be GPT – practically all UEFI-bootable USB sticks are MBR-partitioned. And vice versa, GPT disks are often used on BIOS systems.)

What really defines a disk as "UEFI" or "BIOS" is the kind of bootloader it has installed. To be a BIOS disk, it needs BIOS-compatible bootcode in the zeroth sector (alongside the MBR). And to be an UEFI disk, it needs an EFI System Partition (i.e. a FAT-formatted partition) in which the bootloader is installed as an *.efi file.

(These are not mutually exclusive, and usually OS install media support both.)

So merely changing the partition table won't bring the correct bootloader into existence – you need to do that later, somehow. For example, Windows has bcdboot that can be used to install both BIOS and UEFI bootloaders into a new disk, although I'm not sure if it's suitable for USB sticks. (And again, practically all UEFI systems require a FAT-formatted partition to start from.)

So if you have just changed the partition table format for your system disk:

  1. You probably have a small (100–200 MB) NTFS-formatted "Microsoft system partition", as most new Windows installations do. Repurpose it as the new "EFI system partition".

    • If you are using diskpart, delete the old partition, then simply create the new one as:
      diskpart> create partition efi
    • The partition needs to be FAT-formatted.
    • If you're using AOMEI or fdisk/gdisk, you'll need to set th correct "partition type GUID". (Note: Don't mix up "partition type GUID" with the regular "partition GUID".)

      The type-GUID is C12A7328-F81F-11D2-BA4B-00A0C93EC93B, but most tools let you select the correct type from a list.

    • Optionally the partition can have 'required' and 'hidden' GPT flags set.

  2. From the Windows install media, run bcdboot /v c:\windows to install the UEFI bootloader files into the newly made EFI system partition. The tool will also install the correct UEFI NVRAM bootloader entry, but if that part fails, the disk should still be bootable.
5
  • that makes a lot of sense as to why it failed then. so if I have a fresh mbr / bios install (which I do), I can convert that to GPT, and from installation media run bcdboot on that converted drive?
    – chris
    Jun 6, 2019 at 11:54
  • 1
    Yes. In addition to the "recovery from current situation" steps above, you can also find several threads documenting the whole manual conversion process (search for older ones which predate mbr2gpt; e.g. look for mentions of gptgen.) Jun 6, 2019 at 12:14
  • in theory should MBR2GPT just work out of the box? and if it doesn't I go for the recovery options?
    – chris
    Jun 6, 2019 at 13:03
  • 1
    It should, I mean that's why it got recently added to Windows in the first place... Jun 6, 2019 at 16:05
  • 1
    In general GPT and UEFI are completely independent, but Windows's implementation is limited. For MBR disks it boots with BIOS/CSM/legacy and for GPT it requires UEFI. May be worth to mention this in your answer. For other OSes, including Linux, this may not be the case.
    – gronostaj
    Jun 7, 2019 at 15:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .