0

Just tried to install Windows 8.1 on an UEFI machine/GPT disk.

I used a 2 TB MBR-based USB drive to contain the installer (FAT32 partition with Windows 8.1 install files). I got as far as selecting a partition to install to before the installer complained that the selected install target was actually a GPT disk and that installation was not possible. I know that it's a GPT disk. No further explanation was provided.

Google searches turned up tips like "you have to boot the DVD drive in UEFI mode to install OS on UEFI", etc. This made me believe that I have to convert my USB drive to GPT just to install an OS on an UEFI machine. Is this really necessary? I mean, it's just files written to disk, does it really matter how the installer was booted? The machine will surely reboot during install and then it can use whatever mode it wants, if it think it's necessary.

I also get the impression that converting from MBR to GPT requires me to also delete my other partition on the USB drive. Thats a 1.97 TB partition and that's not acceptable.

Edit: converted to GPT without problems using third party tools. The question remains though:

Why does the installer say it's impossible to install a UEFI-booted OS from a MBR-based USB drive? Can't it create new UEFI boot options while being booted from MBR, or what?

  • Because in order to even boot to that MBR disk your in legacy mode. It's possible to covert MBR to GPT without data loss – Ramhound Aug 27 '14 at 23:36
  • You're saying I should look up "efi legacy mode"? Googling for that did not answer what kind of restrictions are imposed on the installer to make it impossible to install an UEFI bootable OS. – Sirap Aug 28 '14 at 3:08
  • Where did I tell you to search for anything. I just explained that its possible to convert a MBR disk to a GPT disk without data loss. I just explained that even though your system uses a UEFI firmware its booting in legacy mode in order to support MBR partitions. My comment is limited to Windows. There is also another question where I provided an answer, that explains this limitation only exists with Windows. – Ramhound Aug 28 '14 at 11:08
  • Yeah, thanks. I guess I crammed a lot of questions in there. – Sirap Aug 28 '14 at 12:02
4

Google searches turned up tips like "you have to boot the DVD drive in UEFI mode to install OS on UEFI", etc. This made me believe that I have to convert my USB drive to GPT just to install an OS on an UEFI machine.

<…>

Why does the installer say it's impossible to install a UEFI-booted OS from a MBR-based USB drive? Can't it create new UEFI boot options while being booted from MBR, or what?

Do not confuse booting from a GPT or MBR disk with booting in EFI or BIOS mode.

Normally these two requirements are not related. An UEFI system is required to support both GPT and MBR partition tables. (Likewise, BIOS systems don't normally read the partition table at all, and can easily boot from a GPT disk as long as the sector 0 boot code is capable of it.)

It is only Windows that refuses BIOS-mode boot from GPT disks, and EFI-mode boot from MBR disks. And, well, some buggy BIOS systems do choke on "protective" GPT MBRs; likewise, some buggy UEFI systems do think "MBR = legacy boot".

But, aside from that, your guess about creating boot options is correct. See below.

I mean, it's just files written to disk, does it really matter how the installer was booted? The machine will surely reboot during install and then it can use whatever mode it wants, if it think it's necessary.

No, it cannot. First, the boot mode is not chosen by the OS once booted; it is chosen by how the bootloader was installed. To set up a bootloader for BIOS, you write boot code to the 0th sector. To set up a bootloader for EFI, you add a boot option to NVRAM as an EFI "variable". Second, EFI runtime functions are only accessible when booted in EFI mode, and you need to use them in order to modify EFI variables.

So, if you're in BIOS mode, the installer cannot add a boot option to the NVRAM, and therefore cannot set up EFI-mode boot for the freshly-installed system.

So your assumption that it "can use whatever mode it wants" is incorrect.

(As a precaution, Windows does also install its own bootloader to the "fallback" path, \EFI\Boot\BootX64.efi, however, that path is used only if there are no working boot options in NVRAM. So if you don't add a boot option, there's a small chance that it'll still boot, but it's far from being a guarantee.)

I also get the impression that converting from MBR to GPT requires me to also delete my other partition on the USB drive. Thats a 1.97 TB partition and that's not acceptable.

There are tools that can do in-place conversion; the Linux gdisk being one.

However, even if you do delete a partition, this doesn't normally discard any data within it, so you can access it again if you immediately create a new partition at the exact same place. This is how the conversion tools work, after all. (Again, you might need Linux fdisk or gdisk in order to specify the start/end location precisely; many tools only expose 1 MB accuracy.)

  • Great answer. I stumbled upon the requirement to support UEFI boot from MBR drives too. It seems that either my implementation was bad, or that I actually didn't have to convert to GPT but instead just ensure that the right EFI files were in that fallback path. Not sure how it found those files though, as they were on a random FAT32 partition. Didn't take any active steps to mark it as an EFI system partition. Perhaps the conversion tool flagged the previously active partition... – Sirap Aug 28 '14 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.