Friday, October 26, 2012

Installing Windows 7 in UEFI mode from a USB drive

Thanks mainly to this post, I finally installed Window 7 in UEFI mode from a USB drive.

Windows Setup will only install in UEFI mode if it boots in UEFI mode. As PCs transition from BIOS to UEFI many of them automatically fallback to BIOS mode if there’s no EFI-bootable partition.

The Microsoft USB/DVD tool, which modifies a USB key so that Windows 7 can be installed from it, unfortunately formats the USB key NTFS. EFI requires an FAT32 boot partition. So as soon as this particular system, a Fujitsu Lifebook UH572, tried to boot from the USB drive it switched into BIOS mode.

To install Windows 7 from a USB key in UEFI mode:

  1. Format the USB key specifying FAT32 as the filesystem type.
  2. Mount your Windows 7 ISO or DVD.
  3. Copy the contents of the ISO or DVD onto the USB.
    1. That’s right, you can use plain old Windows Explorer to copy the files.
    2. The directory structure on the USB key should be identical to the directory structure on the ISO/DVD when this step is done.
  4. Copy the \efi\microsoft\boot directory up 1 level – to \efi\boot.
    1. This directory was put in the wrong location on the ISO/DVD. A UEFI firmware expects to find a bootloader in \efi\boot.
  5. Download the bootmgfw.efi from this post and copy it to \efi\boot then rename it bootx64.efi.
  6. Boot your target machine from the USB drive.
  7. At the “Welcome to…” window, press SHIFT+F10 to open a command prompt.
  8. Clean the primary disk then convert it to GPT (convert gpt).
  9. Exit then reboot (again from the USB drive).

That’s it. Since the primary disk is GPT formatted and the USB key has \efi\boot\bootx64.efi Windows 7 setup should be running in UEFI mode.


  1. I was having this same issue in Windows 8 as I attempted to install the OS on a 3 TB HDD. I needed to start UEFI from USB.

    I followed the steps listed except for the part of the bootmgfw.efi. It looks as though the Windows 8 ISO already has a bootx64.efi in that folder, so i left it untouched.

    So far, everything seems to be working after installing.

  2. The trick of converting the USB filesystem from NTFS to FAT32 doesn't work for my Windows 7 installation since the file install.wim is larger than 2GB.

  3. [SOLUTION] Use 7-Zip and open d:/sources/install.wim
    and extract /sources/install.wim/1/Windows/EFI/bootmgfw.efi
    rename bootmgfw.efi to bootx64.efi
    now you can complete the tutorial wihtout downloading the file linked above.