TechRepublic : A ZDNet Tech Community

Microsoft Windows

Host: Mark Kaelin
Contact

Configure a USB flash drive to be a Windows 7 installation platform

In a recent 10 Things blog, “10 Cool Things You Can Do with a USB Flash Drive,” I presented 10 tasks that you can perform with a flash drive, including booting an operating system. However, I have since discovered a technique on the Microsoft TechNet Magazine site that describes how you can use a USB flash drive to install Windows 7.

This technique is very cool for two reasons: First, a flash drive is much more responsive than an optical drive, since it doesn’t rely on physically moving components, so the installation procedure will be faster. Second, it provides an easy way to install Microsoft Windows 7 on a system that doesn’t have a DVD drive, such as a netbook.

Since this technique would be a valuable addition to the 10 Things list as well as to users planning on installing Windows 7 on a netbook or who want to be able to quickly and easily install Windows 7, such as the Family Pack, on multiple systems without having to mess around with a DVD, I thought that I would examine the technique.

In this edition of the Windows Vista and Windows 7 Report, I’ll show you how to use the DiskPart utility to configure a bootable USB flash drive that you can then use to install the Microsoft Windows 7 operating system.

This blog post is also available in PDF format in a free TechRepublic download.

Getting started

Of course, in order to employ this technique you’ll need a USB flash drive that is big enough to hold the contents of the Windows 7 DVD. The Windows 7 RC DVD is about 2.5GB, and you can expect that the RTM DVD will be at least that if not more. For my test system I am using a 4GB USB flash drive.

Keep in mind that the procedure we will use will completely reformat the USB flash drive. So you want to make sure that you back up any data that you have on the drive before you begin.

The systems on which you want to install Windows 7 via the USB flash drive have to be able to be configured to boot from a USB drive. Most new systems have the capability to boot from a USB flash drive, and the operation can usually be configured in the BIOS or by simply pressing a certain key during bootup. You’ll need to check your specific hardware in order to be sure.

Using the DiskPart utility

As you may know, the DiskPart utility is a command-line version of the Disk Management snap-in and is designed to allow you to manage disks, partitions, or volumes from within scripts or directly from a command prompt. We can use the DiskPart command in Windows Vista or in Windows 7 to configure a USB flash drive to be a bootable device. (Keep in mind that Windows XP’s DiskPart command is unable to create a bootable USB flash drive.)

To begin, connect your USB flash drive to a computer on which you will be preparing the drive. For my example, I’ll be using a Windows Vista system.

Now, locate the command Prompt shortcut on the Start menu, right-click on it, and select the Run as Administrator command. Then, respond appropriately to the UAC. You can now launch the DiskPart utility by typing DiskPart on the command line. You’ll then see the DISKPART prompt, as shown in Figure A.

Figure A

DiskPart has its own command-line environment complete with a special prompt.

Now that you’re in the DiskPart environment, you’ll need to locate the USB flash drive using the List Disk command. As you can see in Figure B, the List Disk command has identified my USB flash drive as Disk 5. I can verify that my USB flash drive is indeed Disk 5 by checking the Size column, which lists the size as 3906MB, which is roughly 4GB.

Figure B

Using the List Disk command displays all the disks in the system.

(If you have difficulty identifying your USB flash drive using the List Disk command, you can try the List Volume command, which will provide the drive letter as well as the label, both of which can help you to identify the drive.)

Once you identify the drive number of your USB flash drive, you will need to set the focus of the DiskPart environment on that disk. (This is an extremely important step–Make sure that you select the correct drive or you could accidentally destroy valuable data!). On my example, the USB flash drive is Disk 5, so I will use the command Select Disk 5, as shown in Figure C.

Figure C

To shift the focus over to the USB flash drive you’ll use the Select Disk command.

Now that your USB flash drive has the focus, you need to remove all the partition or volume formatting information from the disk. To do that, you’ll use the Clean command. The Clean operation should occur rather quickly. When it is done you will see a success message like the one shown in Figure D.

Figure D

In order to start with a clean slate you’ll use the Clean command to remove all partition and volume information from the USB flash drive.

You’ll now use the Create Partition Primary command to create a primary partition on the disk. After you create the partition, you will see a success message and the focus will automatically shift to the new partition. You’ll use the Active command to mark the partition as active, as shown in Figure E. Marking the partition as active will essentially allow the BIOS to recognize that the partition is a valid bootable system partition.

Figure E

Using the Create Partition Primary and the Active commands, you’ll create a bootable partition on the USB flash drive.

With the partition created and active, you’re now ready to quickly format the drive and set up the FAT32 file system using the Format fs=FAT32 quick command. (While you could format the drive as NTFS, the typical way to format a USB flash drive is to use FAT32.) Once the drive is formatted, you’ll use the Assign command, as shown in Figure F, to allow the drive to be assigned a drive letter.

Figure F

To complete the preparation, you’ll format the drive and assign it a drive letter.

The USB flash drive is now ready. At this point, you can use the Exit command to exit the DiskPart environment and then close the Command Prompt window.

Copying the Windows 7 files

Copying the Windows 7 files is easy. Just open Windows Explorer, access the Windows 7 DVD, select all the files and folders, and then drag and drop them on the USB flash drive icon, as shown in Figure G. Keep in mind that the copy operation will take a little while to complete.

Figure G

Once the USB flash drive is ready to go, you can copy all the files and folders from the Windows 7 DVD to the newly prepared bootable drive.

Installing Windows 7 from the USB flash drive

With the contents of the Windows 7 DVD on a bootable USB flash drive, installing the operating system is a snap. Just boot the system from the USB drive and the installation procedure will begin as it normally would, as shown in Figure H. However, the installation procedure will actually run quicker off of a USB flash drive since it doesn’t contain any physically moving components.

Figure H

Once the system boots from the USB flash drive, the Windows 7 installation will begin as normal, but it will actually run faster.

What’s your take?

Have you ever wanted to be able to install an operating system from a USB flash drive? Now that you know how to do it, are you likely to employ this technique to install Windows 7 on a Netbook or on multiple computers? As always, if you have comments or information to share about these topics, please take a moment to drop by the TechRepublic Community Forums and let us hear from you.

TechRepublic’s Windows Vista and Windows 7 Report newsletter, delivered every Friday, offers tips, news, and scuttlebutt on Vista and Windows 7, including a look at new features in the latest version of the Windows OS. Automatically sign up today!

Greg ShultzGreg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry. Read his full bio and profile.

Print/View all Posts Comments on this blog

Windows 7 from a USB drive Mark W. KaelinTechrepublic Moderator | 08/18/09
Windows 7 from USB -multiple computers... ruhl@... | 08/19/09
As far as licensing goes... Greg Shultz | 08/19/09
So let me get this straight... Guy1124 | 12/16/09
Will not work with a Windows XP system peter.j.boyles@... | 08/19/09
You are right... Greg Shultz | 08/19/09
Read my mind... TechRepublic@... | 08/21/09
Paranoia is good when... Greg Shultz | 08/21/09
Prepare bootable flash drive for Win7 to XP m/c? imanother | 11/23/09
OK, Windows 7 is on the flash drive, but . . . imanother | 11/24/09
sama andrie_tutorial | 08/20/09
Reloading XP? rjoplin@... | 08/21/09
Reload or Restore ?? lhehe@... | 08/22/09
Reload. rjoplin@... | 08/22/09
Why not use Disk Management Console? h3driver | 08/21/09
On a Netbook JackNZ | 08/21/09
could be done from the GUI Disk Management Console wfecng@... | 09/03/09
new problem with USB windows 7 boot method dovidg@... | 10/08/09
Windows 7 from a USB drive thyssens@... | 11/26/09
cryptographic service provider abderrahmane | 01/21/10
Can't wait until the O/S runs on a flash drive CG IT | 08/18/09
USB 3 Jacky Howe | 08/18/09
USB 3 will be a fast... Greg Shultz | 08/19/09
Thanks for the link Jacky Howe | 08/19/09
Yeah that's why I said I can't wait ... CG IT | 08/19/09
Flash drives are fast reading, slow writing DWalker88001 | 08/21/09
It is here today, called SDD Ron_007 | 08/20/09
Indeed vadodsantos@... | 08/22/09
RE: Configure a USB flash drive to be a Windows 7 installation platform david.gray@... | 08/19/09
Nice addition, but... Greg Shultz | 08/19/09
Please Create a Script david.gray@... | 08/19/09
Please creat a script martin_l_77084@... | 08/19/09
Please Create a Script BlackDiamond | 08/21/09
Please Create a Script Network God | 08/21/09
RE: Configure a USB flash drive to be a Windows 7 installation platform shakespear.joy@... | 08/19/09
RE: Configure a USB flash drive to be a Windows 7 installation platform charlyham@... | 08/19/09
Must use Vista or 7 DiskPart... Greg Shultz | 08/19/09
Formatting USB Stick Mike Williams | 08/20/09
RE: Configure a USB flash drive to be a Windows 7 installation platform odedszpiro | 08/19/09
FAT32 vs NTFS on USB Greg Shultz | 08/19/09
FAT32 v NTFS on USB odedszpiro | 08/20/09
Fat32 vs. NTFS gcdimarketing@... | 11/24/09
Formatting USB Stick Mike Williams | 08/20/09
RE: Configure a USB flash drive to be a Windows 7 installation platform mykesoftouch | 08/20/09
RE: Configure a USB flash drive to be a Windows 7 installation platform wmorris@... | 08/21/09
Works on Windows Vista, Server 2008 and 2008 R2 msawyer91 | 08/21/09
2 points... of inquiry, any answer? inertman@... | 08/21/09
Informative vadodsantos@... | 08/22/09
RE: Configure a USB flash drive to be a Windows 7 installation platform MGuyM | 08/24/09
Invalid Partition Table mblake@... | 08/25/09
Try a different USB Flash drive... Greg Shultz | 08/27/09
RE: Configure a USB flash drive to be a Windows 7 installation platform rapitorul@... | 09/03/09
This article is about... Greg Shultz | 09/03/09
I appologise rapitorul@... | 09/03/09
No problem... Greg Shultz | 09/04/09
Probably yes mrbobyu@... | 09/04/09
Please Create a Script cwielgus@... | 10/12/09
RE: Configure a USB flash drive to be a Windows 7 installation platform louborok@... | 10/21/09
Needed DVD to escape error Clark.Catchall@... | 10/31/09
There is a much easier way to do that instead of command line..... chronic8000@... | 11/24/09
All versions of Win 7? public@... | 11/24/09
RE: Configure a USB flash drive to be a Windows 7 installation platform epo_guy | 11/25/09
Invalid partition table imanother | 11/27/09
Invalid Partition Table epo_guy | 11/30/09
I installed windows xp pro from usb. shmoiger@... | 11/27/09
RE: Configure a USB flash drive to be a Windows 7 installation platform helen@... | 12/02/09

What do you think?

White Papers, Webcasts, and Downloads

Recent Entries

TR on Twitter

Archives

TechRepublic Blogs



Quick Reference: Linux Commands
Reduce stress and speed up resolutions with the easiest command references right at your fingertips. You'll receive a PDF file covering Linux, packed with the most common commands you'll need and use daily.
Buy Now
500 Things Every Technology Professional Needs to Know
Did you know Microsoft's RegClean does not work with XP but you can use shareware to clean your registry? Did you know most wireless access points don't have encryption enabled by default? Did you know there are 500 tidbits of information contained in TechRepublic's 500 Things Every Technology Professional Needs to Know that will help you become a successful IT professional.
Buy Now

SmartPlanet

Click Here