Posted on November 11, 2015 · Posted in Windows 7

How to Create UEFI Bootable USB Drive to Install Windows 7

To make a UEFI system boot from a USB flash drive, the latter has to be formatted with FAT32 file system. An official Microsoft utility for making boot USB flash drives, Windows 7 USB/DVD download tool, formats a flash drive with NTFS. So, a UEFI system won’t boot from this flash drive in its native mode.

Let’s try to create a UEFI USB flash drive with Windows 7 distribution ourselves. We’ll need the following:

  1. a 4GB or more USB (v2 or v3) flash drive
  2. a 64-bit Windows 7 distribution (32-bit Windows versions won’t boot in the UEFI system.) A distribution could be in the form of the installation DVD or an ISO image file

Step-by-step guide on how to create a boot Windows 7 flash drive for a UEFI system:

UEFI bootable USB media for installing Windows 7

  • Connect a USB flash drive to the corresponding PC port
  • Run the command prompt with the administrator privileges
  • Run DISKPART by typing the following in the command prompt:Diskpart
  • Display the list of all disks in the system:list disk
  • Find the disk that corresponds to your USB flash drive (in our example it is Disk 2) and select it:
    Select Disk 2
  • Warning. The following command will completely remove all information and partitions on the USB flash drive, so it is better to make sure that you have selected the right device in the previous step.

    Remove all data from the drive using this command:clean

  • Create a primary partition:create partition primary
  • Make this partition active (a system volume):active
  • List the system volumes with this command:list volume
  • Select the partition we have created: (In our example, it is Volume 3.)select volume 3
  • Format the selected partition with FAT32:format fs=fat32

    Note. Unlike systems with BIOS allowing to boot from boot partitions with FAT, FAT32, exFAT or NTFS, a UEFI system only allows to boot from a loader located on a boot drive formatted with the FAT32 file system.

  • Assign a drive letter to the formatted partition:assigndiskpart: format fat32
  • Exit DISKPART:exit
  • Copy the contents of your Windows 7 x64 installation disk to the USB flash drive that you have prepared. You can do it using Windows Explorer, a favorite file manager or from the command prompt, for example:xcopy d:\* f:\ /s /e(where d:\ is an installation DVD or mounted ISO image containing a Windows 7 distribution, and f:\ is a letter assigned to the USB flash drive)
  • Go to f:\efi\microsoft\boot on the USB flash drive
  • Copy its contents to a higher level (to the F:\efi\boot directory)
  • Copy bootmgfw.efi to f:\efi\boot and rename it to bootx64.efi.

    Note. UEFI should pass control to bootx64.efi. The file bootmgfw.efi can be copied from the installed Windows 7 x64 system (it is in %windir%\Boot\EFI). You can also get it using archiver 7ZIP, for example, from install.wim in the distribution. (You can find it in sources\install.wim\1\Windows\Boot\EFI\bootmgfw.efi.)

    bootmgfw.efi extract from install.wim

    Note. Some motherboards require bootx64.efi to be additionally copied to the USB flash drive root; it has to have either the same name or shellx64.efi.

After the described procedures, you have a USB flash drive, using which Windows 7 can be installed on a UEFI system in the native mode. More detailed procedure of Windows 7 installation in a UEFI system will be considered in next article.

Tip. The procedure of making Windows 8 boot USB flash drive is a bit easier. You can find a detailed description here.

Related Articles