Hardware

Configure a USB flash drive for Windows 7 installation: Revisited

Using a USB Flash drive as a Windows 7 installation platform is a great idea, but when Greg Shultz proposed it, there were some questions raised.

In my August 18th blog post, "Configure a USB Flash Drive to Be a Windows 7 Installation Platform," I showed 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.

As I mentioned in that blog post, 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.

In the Discussion Thread stemming from that blog post, I was asked several questions that prompted me to revisit this technique.

  • First, h3driver asked if the preparation phase of the technique could be done from the GUI Disk Management Console rather than from the Command Prompt with the DiskPart command.
  • Second, odedszpiro asked me why I chose to use FAT32 as opposed to NTFS to format the USB flash drive.
  • Third, inertman echoed the question about using the Disk Management Console but also asked why I didn't use the new exFAT file system to format the USB flash drive. I've also heard from some folks who have been asking about solutions to problems with the DiskPart command. To all, I say great questions!

In this edition of the Windows Vista and Windows 7 Report, I'll explore these question and answers in more detail.

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

Disk Management Console

Conceivably, the idea of using Vista's Disk Management Console makes sense — you could just point and click to prepare the USB flash drive. However, that doesn't seem to be the case.

In fact, every piece of documentation from Microsoft that I have seen about formatting a bootable USB flash drive specifically describes the procedure using the Vista DiskPart command. Microsoft even describes the DiskPart command as enabling a superset of the actions that are supported by the Disk Management snap-in. As such, it may not be possible.

In experimenting with this, I have not been able to successfully prepare a bootable USB flash drive from the Disk Management Console. Something always seems to go wrong. However, using the DiskPart command with its very specific command structure, I have always been able to prepare a bootable USB flash drive. Since I know using the DiskPart command works, that is the procedure I described in my article.

Now, that being said, I'm open to the possibility that I may be wrong about the Disk Management Console and would ask that anyone who has been able to successfully prepare a bootable USB flash drive from the Disk Management Console, please let us know how you went about it.

FAT32 vs. NTFS

When it comes to choosing between FAT32 and NTFS when formatting USB flash drives, I think that FAT32 is the best way to go. The reason that FAT32 is better in this situation is that people tend to pull USB flash drives out of the port when they are finished using them rather than using the Safely Remove Hardware method and FAT32 is more forgiving of this type of termination than NTFS is. If you yank out an NTFS drive that has not yet completed working with the files on the USB flash drive, you could very well end up with corrupted data.

Another reason against using NTFS for USB flash drives is that NTFS is a more feature-rich file system and as such has more overhead, making it perform a bit slower on USB flash drives than FAT32.

However, as long as you take these drawbacks into consideration, there is no reason that you can't use NTFS to format a bootable USB flash drive to use as a Windows 7 installation platform.

FAT32 vs. exFAT

When it comes to choosing between FAT32 and exFAT when formatting a bootable USB flash drive, you have to use FAT32. At this point in time, exFAT for Windows XP/Vista/7 does not support booting from the file system.

As you may know, with Vista SP1, Microsoft added the exFAT file system to the operating system and then shortly afterward released an exFAT patch for Windows XP. As the successor to the FAT32 file system, exFAT is designed for Windows Embedded CE 6.0 to allow it to support larger drives and file sizes than FAT32, which was released with Windows 95 OSR2 — back when today's standard hard disk and file sizes were unfathomable. (Windows CE devices can boot from exFAT drives using a special boot loader in the BIOS.)

When Microsoft ported exFAT over to Vista, the idea was to improve support for flash-based media by allowing the operating system to be able to support larger-sized drives and larger file sizes.

More specifically, Microsoft describes the exFAT system as offering the following advantages:

  • Enables the file system to handle media capacity of 32GB and larger.
  • Handles more than 1,000 files in a single directory.
  • Speeds up storage allocation processes.
  • Removes the previous file-size limit of 4GB.
  • Supports interoperability with future desktop operating systems.

Therefore, if you have a large USB flash drive that you are going to be using for data transfer and storage, using exFAT instead of FAT32 would be a good way improve performance and to take advantage of a new technology, but not if you are using the USB flash drive as a bootable device.

DiskPart problems/solutions

To set the stage for this section, let me begin by listing the set of DiskPart commands that you will use to prepare the USB flash drive:

  1. DiskPart
  2. List Disk
  3. Select Disk #
  4. Clean
  5. Create Partition Primary
  6. Active
  7. Format fs=FAT32 quick
  8. Assign

I've heard from a number of folks who have been following the set of instructions for using the DiskPart command and gotten to the Create Partition Primary command and encountered the error message:

There is insufficient free space to create a partition at the specified size and offset. Specify different size and offset values or don't specify either to create the maximum sized partition.

While the first part of this error message is on target, the second part tends to lead you off in another direction. The reason that there is insufficient free space to create a partition is that the existing partition is still there because, for some reason or another, the Clean command did not do its job. So, the solution to this error is to simply type the Clean command again. If that still doesn't work, try the Clean All command. Once you do, you can then type the Create Partition Primary command again.

I've also heard from several folks that after creating the primary partition, attempting to issue the next command brought up the error message:

There is no partition selected. Please select a partition and try again.

In this case, the solution appears to be adding the Select Partition 1 command to the list of steps. Since the partition was just created, we know that it is partition 1. As such, the set of DiskPart commands becomes:

  1. DiskPart
  2. List Disk
  3. Select Disk #
  4. Clean
  5. Create Partition Primary
  6. Select Partition 1
  7. Active
  8. Format fs=FAT32 quick
  9. Assign

Not XP

In my original version of the article, I failed to mention that you must use the DiskPart command in Windows Vista or Windows 7 in order to perform the operation. The DiskPart command in XP cannot be used to set up a partition on the USB drive. While I did add this correction the article within 24 hours of it being published thanks to peter.j.boyles, I just thought I would reiterate it here.

A DiskPart script

Several of you responded to my inquiry in the discussion area, and as such, I am working on a DiskPart script to automate the procedure of configuring a USB flash drive to be a Windows 7 installation platform. Stay tuned.

What's your take?

If you have any questions or comments concerning this topic, 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!

About

Greg 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.

Editor's Picks