Making a USB flash drive for Window setup

This article demonstrates how to copy a Windows installation source to a USB flash drive (UFD), and make that UFD bootable, without using any third-party app. Every now and then, such an article must be re-written to update the sum of knowledge. Only the tools included with the operating system are used. This article assumes you have at least Windows 7. Also, it assumes that the OS you’d like to copy to a UFD is Windows Vista, 7, 8, 8.1 or 10 and is already available to you on DVD or in folder somewhere.

Plan A: The simple approach

If you have a Windows setup DVD, insert it into a DVD drive. If the Windows setup files are on a network share or in a folder, make sure they are accessible. Take an empty UFD which has a FAT32 file system and enough disk space (4GB +). Copy the contents of a Windows installation DVD to its root.

That’s it. You can now boot almost any computer with it.

Plan B: When the simple approach does not work

When the plan A does not work, usually it is because either there is something extraordinary about the computer on which the UFD was supposed to boot up or about the UFD itself.

I am going to assume you have already ensured that the target computer is properly set to boot up from the UFD.

  1. Plug your UFD in
  2. Copy everything you do not want destroyed off it
  3. Open Command Prompt with administrative privileges. To do so, hold down Ctrl+Shift keys and click on the Start menu shortcut for Command Prompt.
  4. Run the following commands:
diskpart
list disk
  1. Find your UFD’s number in the “Disk ###” column.
  2. Type “select disk” without quotation marks, press space key, and type the number corresponding to your USB flash drive. For example, if the number was 2, the result should be “select disk 2”. Press Enter.
  3. Recommended: Issue the following command to ensure that you have selected the right disk. You are about to destroy everything on it and you don’t want to do it to the wrong disk.
detail disk
list part
list volume"
  1. Type the following commands:
clean
create partition primary
active
format fs=ntfs quick
  1. Check that everything has gone fine. If everything has gone fine so far (which you will know by the sight of an error message while typing these commands in) you should now have an empty USB flash drive formatted with NTFS file system using maximum capacity and no irregularity.
  2. Type “exit” (without quotation marks) and press Enter.
  3. Modify the following command as needed, type it (do not omit quotation marks) and press Enter:
"%SRC%\boot\bootsect.exe" /nt60 %DEST% /force /mbr

%SRC% must be replaced with the path to the Windows installation source, which you’d like to copy to UFD. If you want to copy it from a DVD drive called H:, %SRC% must be replaced with H:. If you want to copy it from a folder called “Windows Setup” on the root of drive C:, then %SRC% is C:\Windows Setup.

%DEST% is the path to your UFD. For example, if your UFD is J:, %DEST% would be J:. So, here are the examples of modified versions of the command:

"h:\boot\bootsect.exe" /nt60 j: /force /mbr
"c:\Windows Setup\boot\bootsect.exe" /nt60 j: /force /mbr
  1. Copy everything to the UFD by modifying the following command as needed, typing it and pressing Enter:
XCopy "%SRC%\" "%DEST%\" /herky

%SRC% and %DEST% are exactly what were above. Here are the corresponding examples:

XCopy "h:\" "j:\" /herky
XCopy "c:\Windows Setup\" "j:\" /herky

Extra reading

When would plan A fail?

Plan A may fail when:

  1. Your Windows setup source has a file (or files) bigger than 4 GB in size. Standard Windows setup sources to this date do not have such files. But customized ones might have. FAT32 does not support such files but NTFS does.
  2. Your UFD has a partition-related peculiarity, i.e. when there is more than one partition, one misaligned partition or no primary partitions
  3. Your UFD has an alien MBR code interfering with the boot process

USB3 warning

Do not attempt to install Windows 7 from a UFD plugged into a USB3 port. The setup will start but will tell to you that it does not have a driver for your storage device. (It does not tell you which storage device.) Windows 7 setup does not support USB3 natively. Windows 8 does.

Native EFI mode

Windows Vista and Windows 7 setup discs in circulation are faulty. The do not have necessary files to start in EFI mode. The missing item is a folder called “efi\boot”. On 32-bit discs, it should contain one file called “bootia32.efi”. (IA-32 is the name of the Intel 32-bit CPU architecture. Microsoft calls it x86 for marketing purposes.) On 64-bit discs, it should contain one file called “bootx64.efi”. If you are making a Windows 7 USB drive and have a Windows 8 or Windows 10 installation source at hand, you can copy these files from those discs. (User “r3loaded” from forums.bit-tech.net reports an alternative method.)

Advertisements

Posted on 9 June 2016, in Windows Administration. Bookmark the permalink. Leave a comment.

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: