Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / How to Create a UEFI Bootable USB Drive to Install Windows 10 or 7?

June 2, 2020 PowerShellWindows 10Windows 7

How to Create a UEFI Bootable USB Drive to Install Windows 10 or 7?

This is a step-by-step guide on how to create a bootable USB flash drive with a Windows 10 or Windows 7 install image for a UEFI computer. We’ll need the following:

  • USB flash drive (USB v2 or v3) with a capacity of at least 4 GB for Windows 7 or 8 GB for Windows 10;
  • 64-bit Windows install image (32-bit Windows versions won’t boot on the UEFI computer). A Windows distribution could be in the form of the installation DVD or an ISO image file.

In order to make a UEFI computer boot from a USB flash drive, you must format it in the FAT32 file system.

Let’s look at a few of the most popular ways that you can create a bootable UEFI USB flash drive for installing Windows 10.

Contents:
  • Use Media Creation Tool to Create Windows 10 Install USB Stick
  • Using Rufus to Create Windows UEFI USB stick
  • Using Diskpart to Create UEFI Boot-Stick with Windows
  • Create UEFI Bootable USB Drive to Install Windows 7
  • Create UEFI Bootable USB Media with PowerShell

Use Media Creation Tool to Create Windows 10 Install USB Stick

Microsoft’s official tool for creating installation media and ISO images with Windows 10 is Media Creation Tool. You can download the latest version here – https://www.microsoft.com/en-us/software-download/windows10

download windows 10 media creation tool

Old version of the Windows USB/DVD download tool formatted USB drive in the NTFS file system when burning Windows 7 image. A computer with UEFI architecture cannot boot from that media in native mode. Therefore, this tools is not suitable for creating an installation flash drive with Windows 7.

  1. Run the file MediaCreationTool2004.exe;
  2. Select Create installation media (USB flash drive, DVD, or ISO file) for another PC);create windows10 install media
  3. Select the language, edition and architecture (bitness) of the Windows 10 image that you want to write to the USB drive;select windows10 image
  4. Then select that you want to write the image to a USB flash drive;select usb flash drive
  5. Select your flash drive in the list of removable devices and USB drives.write windows 10 install image to usb stick

That’s all. Click Next -> Next -> Finish and wait until the install Windows image is written to the USB drive.

In this case, all data on the USB flash drive will be deleted permanently during formatting.

This USB flash drive can be used to boot on both UEFI and BIOS computers.

Using Rufus to Create Windows UEFI USB stick

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 version 3.10 is available on the developer’s website https://rufus.ie. The tool 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 tool with administrator privileges and specify the following settings:

  • Device: select your USB flash drive;
  • Boot selection: specify Windows ISO image file (you can create an ISO image with the latest Windows 10 build using the Media Creation Tool, see example);
  • Partition scheme: GPT;
  • Target system: UEFI (non-CSM);
  • File system: FAT32.

rufus 3.0 create uefi gpt usb boot stick with windows7

Click START to write a Windows image to a USB flash drive. After 10-15 minutes, your bootable USB flash drive with Windows install image for UEFI computer is ready.

Using Diskpart to Create UEFI Boot-Stick with Windows

You can create a bootable UEFI flash drive with the Windows install image 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 flash drive for a UEFI system using diskpart:

UEFI bootable USB media for installing Windows 7

  1. Connect a USB flash drive to the corresponding PC port;
  2. Run the command prompt as an administrator;
  3. Run the DISKPART tool by typing in the command prompt: Diskpart
  4. Display the list of all drives in the computer:list disk
  5. Find the disk that corresponds to your USB flash drive (in our example it is Disk 2) and select it:
    Select Disk 2
  6. 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:clean
  7. Create a primary partition:create partition primary
  8. Make this partition active (a system volume):active
  9. List the system volumes with this command:list volume
  10. Select the partition you have created (in our example, it is Volume 3):select volume 3
  11. Format the selected partition with FAT32:format fs=fat32 quick
    Note. Unlike legacy computers with BIOS, which allow booting from partitions with FAT, FAT32, exFAT or NTFS file systems, a UEFI allows to boot only from a bootloader located on a boot drive formatted with the FAT32.
  12. Assign a drive letter to the formatted partition (if Windows doesn’t assign a drive letter to a USB flash drive automatically— see the article):assigndiskpart: format fat32
  13. Exit DISKPART:exit

Copy the contents of your Windows x64 install image to the USB flash drive that you have prepared. You can do it using Windows Explorer, your 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 distro, 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, you won’t be able to copy the large image file install.wim. The size of the install.wim file may be more than 4 GB if you 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 install process.  

This completes the process of creating a bootable UEFI flash drive with Windows 10.

Create UEFI Bootable USB Drive to Install Windows 7

If you are creating an install USB flash drive with Windows 7 for a UEFI computer, you need to perform additional steps:

  1. Go to f:\efi\microsoft\boot folder on the USB flash drive;
  2. Entirely copy its contents one level up (to the F:\efi\boot directory);
  3. 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 deployed Windows 7 x64 computer (located in the %windir%\Boot\EFI folder). You can also get it using 7ZIP archiver, for example, from install.wim in the ISO install image. You can find it in the folder 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.

Create UEFI Bootable USB Media with PowerShell

You can also use PowerShell cmdlets to create a bootable UEFI flash drive.

The following PowerShell one-liner will list the connected USB media devices. After you select the flash drive you need, it will be cleaned up, the primary partition will be created and formatted in the FAT32 file system (using cmdlets from the Storage disk management module):

$Results = Get-Disk |Where-Object BusType -eq USB |Out-GridView -Title 'Select USB Drive to Create UEFI bootable device' -OutputMode Single |Clear-Disk -RemoveData -RemoveOEM -Confirm:$false -PassThru |New-Partition -UseMaximumSize -IsActive -AssignDriveLetter |Format-Volume -FileSystem FAT32

powershell: select usb flash drive to format

Mount the install ISO image of Windows 10:

$Volumes = (Get-Volume).Where({$_.DriveLetter}).DriveLetter
Mount-DiskImage -ImagePath C:\ISO\Windows10-2004x64.iso
$ISO = (Compare-Object -ReferenceObject $Volumes -DifferenceObject (Get-Volume).Where({$_.DriveLetter}).DriveLetter).InputObject

Because in PowerShell, I could not detect which drive letter was assigned to the mounted ISO image; I had to compare the list of disks before and after mounting using Compare-Object.

Now you need to go to the Boot directory and copy the contents to a USB flash drive using Copy-Item cmdlet:

Set-Location -Path "$($ISO):\boot"
bootsect.exe /nt60 "$($Results.DriveLetter):"
Copy-Item -Path "$($ISO):\*" -Destination "$($Results.DriveLetter):" -Recurse -Verbose

write windows install image on usb stick using powershell

Please note that in order to install the Windows operating system in UEFI mode, you must use the GUID Partition Table (GPT) for your computer’s hard disk. To convert an MBR disk to a GPT partition table without data loss, you can use the mbr2gpt tool).

After the described procedures, you have a bootable USB flash drive to install Windows on a UEFI computer in the native mode. More detailed procedure of Windows installation on computer with UEFI interface will be considered in one of the next article.

20 comments
5
Facebook Twitter Google + Pinterest
previous post
How to Backup Active Directory Domain Controller?
next post
Windows Boot Error: An Operating System Wasn’t Found

Related Reading

Using Previous Command History in PowerShell Console

January 31, 2023

How to Install the PowerShell Active Directory Module...

January 31, 2023

Enable Internet Explorer (IE) Compatibility Mode in Microsoft...

January 27, 2023

Finding Duplicate E-mail (SMTP) Addresses in Exchange

January 27, 2023

How to Disable or Uninstall Internet Explorer (IE)...

January 26, 2023

20 comments

Luis May 29, 2016 - 7:53 pm

Thank you so much for providing this guide!

Reply
Gilberto May 29, 2016 - 10:00 pm

Using cmd for making bootable usb is advanced methos and so easy also. I always prefer cmd program to make bootable usb. No software is required now only cmd can make usb bootable.

Reply
Mikhail July 13, 2016 - 11:45 pm

Hi
could you please put more details Go to f:\efi\microsoft\boot on the USB flash drive and Copy its contents to a higher level (to the F:\efi\boot directory). There is not such directory efi\boot. Should I create this? My structure is like that F: \boot\efi\source\support\upgrade etc.
Thank you.

Reply
Shyju Wilson July 19, 2016 - 9:40 am

Thank you so much….
 

Reply
Aireagoir August 17, 2016 - 1:11 pm

Hello there I have a installer disc it installs 32 and 64 bit windows all versions but i don’t have an efi foler in sources\install.wim\1\Windows\Boot
How do I make a uefi usb or disc?

Reply
Max August 22, 2016 - 9:23 am

Hi,
Try to download original installation images from Microsoft site.

Reply
Kane October 17, 2016 - 2:21 am

Or use the freeware ISO2Disc. It allows to create a UEFI bootable USB from ISO file.

Reply
Terry October 25, 2016 - 10:29 pm

I agree 100%, after screwing around with partitions, different format schemes and wasting 4 hours of my life I stumbled on ISO2Disc 
 
Holy cow that made life soooooo much easier! Get it, you can’t go wrong its free and it works flawless. I needed it for Server 2016 and UEFI boot

Reply
Singh November 21, 2018 - 9:34 am

Hi,thanks!
I am able to make USB bootable in UEFI mode but once setup of windows 7 starts copying files then
I get error that a file is missing \windows\system32\boot\winload.efi anyone faced this ? Please help to resolve this.

Reply
admin November 27, 2018 - 7:06 am

Did you use the original Windows 7 ISO image? At what stage of the installation does the error appear? Already after you choose a partition to install?

Reply
Singh November 27, 2018 - 7:36 pm

USB boot starts and windows setup starts copying files then this error appears. Windows iso seems fine as I used a CD setup to install windows to another machine. From same setup I created ISO file using imgburn software. Please advice further. Thanks

Reply
Francesco January 2, 2019 - 3:14 pm

hi, i have a notebook acer A315, the bios has only UEFI, how can i start windows 7 installation from usb stick? thank you so much.

Reply
giorgos June 17, 2019 - 8:58 am

Good evening! My name is george. I have a vision problem and I want your children to help you as much as possible. I use a voice reader in Windows 10 but the voice reader is not compatible with the specific operating system. I try to get back through the bios uefi to legacy so I can install Windows 7. When I start installing it does Windows loading file. Then he asks me the language and when I click on install now he displays the following message:
It says there is a missing cd dvd driver installed via a USB stick.
Settings within the bios are done correctly. Also bios has been upgraded to its latest version and the security boot is disabled.
The computer has been purchased 3 days ago and unfortunately I can not use it.
Its processor is the eighth generation Intel i7.
And the computer model is the following:
hp probook 450 g6
Thanks in advance for your answers!

Reply
admin July 8, 2019 - 5:15 am

Windows 7 doesn’t have native USB 3.0 support. You should add USB drivers to the install image manually. See the article: https://woshub.com/adding-usb-3-0-controller-drivers-to-windows-7-install-media/

Reply
Ronal July 20, 2019 - 2:07 am

Thank you for providing this helpful guide, while rufus is the easier way to go i had to use diskpart because i was dealing with fake usb drive with fake capacity. There was no way to specify partition size in rufus. Cheers.

Note, i used the following to create 10GB partition :
create partition primary size=10240

Reply
32bit-Fan June 17, 2020 - 4:59 pm

I can only build a working x64 UEFI Boot stick.
But i want install a x86 UEFI Windows 8.1
This seems to be very difficulty.

Reply
WILFRIEDD February 10, 2021 - 5:37 am

This doesn’t work , for UEFI MODE , copying files in boot section (Efi) and renaming didn’t work .

I got the message in the Bios : CANNOT FIND BOOT …….. press a key .

My System is in UEFI , and my usb stick is GPT …so GPT /UEFI . it should work …

Reply
Popli March 28, 2022 - 3:47 pm

For usb use efi folder contents alone.
For cd/dvd use dvd folder files
Thank you for this information you saved me.

Reply
rakesh August 20, 2022 - 1:31 pm

last i year i make a usb boot able from rufus software that works good and all types of win 10 in gpt auromatic install origenal from pen drive to laptop.but still now i make usb drive to gpt that not works as automatic origenal installation from pen drive

Reply
rakesh August 20, 2022 - 1:34 pm

last i year i make a usb boot able from rufus software that works good and all types of win 10 in gpt auromatic install origenal from pen drive to laptop.but still now i make usb drive to gpt that not works as automatic origenal installation from pen drive
plz send solution for making all win 10 boot able pen drive from one iso

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Using Previous Command History in PowerShell Console

    January 31, 2023
  • How to Install the PowerShell Active Directory Module and Manage AD?

    January 31, 2023
  • Finding Duplicate E-mail (SMTP) Addresses in Exchange

    January 27, 2023
  • How to Delete Old User Profiles in Windows?

    January 25, 2023
  • How to Install Free VMware Hypervisor (ESXi)?

    January 24, 2023
  • How to Enable TLS 1.2 on Windows?

    January 18, 2023
  • Allow or Prevent Non-Admin Users from Reboot/Shutdown Windows

    January 17, 2023
  • Fix: Can’t Extend Volume in Windows

    January 12, 2023
  • Wi-Fi (Internet) Disconnects After Sleep or Hibernation on Windows 10/11

    January 11, 2023
  • Adding Trusted Root Certificates on Linux

    January 9, 2023

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Installing RSAT Administration Tools on Windows 10 and 11
  • Get-ADUser: Find Active Directory User Info with PowerShell
  • How to Hide Installed Programs in Windows 10 and 11?
  • Managing Printers and Drivers with PowerShell in Windows 10 / Server 2016
  • PowerShell: Get Folder Sizes on Disk in Windows
  • Deploy PowerShell Active Directory Module without Installing RSAT
  • Managing User Photos in Active Directory Using ThumbnailPhoto Attribute
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top