I was trying to make a bootable USB stick for Windows 8 this morning, using the Windows 7 USB/DVD Download Tool from Microsoft and the process outlined in this Redmond Pie article (the same basic steps can be found in a number of places). Even though the tool originated for Windows 7 and the steps I linked to are for the Windows 8 Consumer Preview, it all still works fine with Windows 8 RTM.
The steps are pretty simple:
- Download and install the tool.
- Download the ISO image of the version of Windows you want to install (Windows 7 and 8 for sure, I believe it works with Windows Server 2008 R2 and Windows Server 2012 RC as well).
- Plug in a USB stick (8GB or larger recommended) that is either blank or has no data on it you want to keep (it will be reformatted as part of the process).
- Run the tool and pick the ISO image.
- Select the USB drive (note that this tool can also burn the ISO to DVD).
- Wait for the tool to reformat the USB stick, copy the ISO contents to the stick, and make it bootable.
Everything was going fine for me until I got to step 6. The tool would format the USB stick, and then it would immediately fail before beginning the file copy:
Redmond, we have a problem…
At first I was wondering if it was related to UAC (it wasn’t) or a bad ISO image (it wasn’t). So I plugged the appropriate search terms into Bing and away we went, where I finally found this thread on the TechNet forums, which led me to this comment in the thread (wasn’t even marked as the solution, although it sure should have been):
We ran across this same "Error during backup., Usb; Unable to set active partition. Return code 87" with DataStick Pro 16 GB USB sticks. The Windows 7 DVD/USB Download Tool would format and then fail as soon as the copy started.
We ended up finding that the USB stick has a partition that starts at position 0 according to DiskPart. We used DiskPart to select the disk that was the USB, then ran Clean, then created the partition again. This time it was at position 1024. The USB stick was removed then reinserted and Windows prompted to format the USB stick, answer Yes.
The Windows 7 DVD/USB Download Tool was now able to copy files.
So, here’s the process I followed:
Follow my simple step-by-step instructions. I make hacking FUN!
To do it yourself, launch a command window (either legacy CMD or PowerShell, doesn’t matter) with Administrator privileges and type diskpart to fire up the tool:
- LIST DISK gives a listing of all the drives attached to the system. At this point, no disk is selected.
- I have a lot of disks here, in part because my system includes an always-active 5-in-1 card reader (disks 1 through 5 that say no media). I also have an external USB hard drive (230GB? How cute!) at disk 6. Disk 7, however — that’s the USB stick. Note that the "free" column is *not* showing free space on the drive in terms of file system — it’s showing free space that isn’t allocated to a partition/volume.
- Diskpart, like a lot of Microsoft command-line tools, often requires you to select a specific item for focus, at which point other commands that you run will then run against the currently focused object. Use SELECT DISK to set the focus on your USB stick.
- Now that the USB stick has focus, the LIST PART command will run against the selected disk and show us the partitions on that disk.
- Uh-oh. This is a problem. With a zero-byte offset on that partition (USB sticks typically only have a single partition) that means there’s not enough room for that partition to be marked bootable and for the boot loader to be put on the disk. The volume starts at the first available byte. Windows needs a little bit of room — typically only one megabyte — for the initial boot loader code (which then jumps into the boot code in the bootable disk partition).
- So, let’s use CLEAN to nuke the partitions and restore this USB stick to a fully blank state.
- Use LIST PART again (still focused on the disk object) confirms that we’ve removed the offending partition. You can create a new partition in diskpart but I happened to have the Disk Manager MMC console open already as part of my troubleshooting, so that’s what I used to create the new partition.
- Another LIST PART to confirm that everything is the way it should be…
- Yup! Notice we have that 1 MB offset in place now. There’s now enough room at the start of the USB stick for the boot loader code to be placed.
- Use EXIT to close up diskpart.
This time, when I followed the steps with the Download Tool, the bootable USB stick was created without further ado. Off to install Windows 8!