In order to make a UEFI system boot from a USB flash drive, the latter has to be formatted in the FAT32 file system. An official Microsoft utility for creating bootable USB flash drives, Windows 7 USB/DVD download tool, formats a flash drive to the NTFS file system. So, a UEFI system won’t boot from such a flash drive in native mode.
Let’s try to create a bootable USB flash drive with Windows 7 distribution for UEFI computer by ourselves. We’ll need the following:
- USB flash drive (USB v2 or v3) with a capacity of at least 4 GB;
- 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.
Consider two ways to create a bootable UEFI flash drive for installing Windows 7.
How to manually create a bootable UEFI USB flash drive with Windows 7 installer?
You can create a bootable UEFI flash drive with the correct Windows distribution manually. The procedure described below is suitable for advanced users, is performed from the command line and allows you to fully control (and understand) all the steps in the process of creating a bootable USB flash drive.
Step-by-step guide on how to create a boot Windows 7 flash drive for a UEFI system:
- Connect a USB flash drive to the corresponding PC port;
- Run the command prompt as an administrator;
- Run the DISKPART tool by typing in the command prompt:
- Display the list of all drives in the system:
- 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 your removable USB device in the previous step, and not one of the computer’s hard drives.Remove all data from the drive using this command:
- Create a primary partition:
create partition primary
- Make this partition active (a system volume):
- List the system volumes with this command:
- Select the partition you have created (in our example, it is Volume 3):
select volume 3
- Format the selected partition with FAT32:
format fs=fat32 quickNote. Unlike systems with BIOS, which allow booting from boot partitions with FAT, FAT32, exFAT or NTFS, a UEFI systems allow to boot only from a bootloader located on a boot drive formatted with the FAT32 file system.
- Assign a drive letter to the formatted partition (if Windows doesn’t assign a drive letter to an USB flash drive — see the article):
- Exit DISKPART:
- 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);Note. Since the maximum file size on the FAT32 file system should not exceed 4 GB, in some cases you won’t be able to copy the large image file install.wim. The file size of install.wim, maybe more than 4 GB, you have integrated updates, drivers, etc. into it. In this case, you will have to split the install.wim file into several files up to 4 GB in size (for example, 3 GB files). To do this, you can use the command Dism /Split-Image:
Dism /Split-Image /ImageFile:D:\sources\install.wim /SWMFile:c:\tmp\install.swm /FileSize:3000
Or using the imagex tool:
imagex /split D:\sources\install.wim c:\tmp\install.swm 3000
The resulting files (install.swm, install2.swm, install3.swm …) need to be copied to the USB flash drive into the directory F:\sources. The Windows Installer will assemble the swm files and apply the full wim image to the disk during the installation process.
- Go to f:\efi\microsoft\boot folder on the USB flash drive;
- Entirely copy its contents one level up (to the F:\efi\boot directory);
- Copy the bootmgfw.efi file to the f:\efi\boot folder and rename it to bootx64.efi.Note. The UEFI environment should pass control to the bootx64.efi file. The file bootmgfw.efi can be copied from the installed Windows 7 x64 system (located in the %windir%\Boot\EFI folder). You can also get it using 7ZIP archiver, for example, from install.wim in the distribution iso. You can find it in the folder sources\install.wim\1\Windows\Boot\EFI\bootmgfw.efi.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.
Creating Windows 7 UEFI USB stick using Rufus
It is much easier for novice users to create bootable UEFI flash drive for installing Windows using the graphical interface of the popular Rufus utility. At the moment, the Rufus 3.3 is available on the developer’s website https://rufus.ie. The utility is quite compact (about 1 MB), doesn’t require installation and it’s completely free. In addition, it works much faster than analogs.
Run the Rufus utility and specify the following settings:
- Device: select your USB flash drive;
- Boot selection: specify the Windows 7 iso image;
- Partition scheme: GPT;
- Target system: UEFI (non-CSM);
- File system: FAT32.
Click START to start recording a Windows 7 image to an USB flash drive. After 10-15 minutes, your installation USB flash drive with Windows 7 for UEFI systems is ready.
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 (note that, in order to install the operating system in UEFI mode, the hard disk of the computer must have a GPT partition layout). More detailed procedure of Windows 7 installation in a UEFI system will be considered in next article.