There are lots of ways to make a bootable USB flash disk (Pendrive, USB stick, Flashdrive, or whatever you call it), but most require you to download something you don’t already have. However, if the goal is to make a bootable Windows Vista/Windows 7/Windows Server 2008/R2 USB installation drive to install Windows on a server or other computer that doesn’t have a DVD drive in it, then you already have all the required software. All you need is a USB flashdrive of 4GB or more and the installation DVD. The rest is just a bit of command line fun. On a Windows computer that does have a DVD drive, do the following:
- Insert the target USB disk (in this case, a 16 GB pen drive)
- Insert the source DVD disk (drive letter is D: and it’s a Windows Server 2008 R2 DVD)
- Open a PowerShell or CMD window As Administrator
- Type diskpart and press
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 111 GB 0 B
Disk 1 Online 16 GB 0 B
DISKPART> select disk 1
Disk 1 is now the selected disk.
DiskPart succeeded in cleaning the disk.
DISKPART> create partition primary
DiskPart succeeded in creating the specified partition.
DISKPART> select partition 1
Partition 1 is now the selected partition.
DiskPart marked the current partition as active.
DISKPART> format fs=ntfs
100 percent completed
DiskPart successfully formatted the volume.
DiskPart successfully assigned the drive letter or mount point.
Now, assuming your DVD drive with the Server 2k8 R2 DVD in is D:, and your target USB drive is H:
PSH> D:\boot\bootsect /nt60 h:
Target volumes will be updated with BOOTMGR compatible bootcode.
Successfully updated NTFS filesystem bootcode.
Bootcode was successfully updated on all targeted volumes.
Now, finally, copy the contents of the source DVD to the new bootable USB stick:
PSH> xcopy d:\*.* h:\ /e /h /j
When the copy is finished, you’ll have a bootable USB drive.
Now, finally a couple of comments and cautions. First, you need to use a source disk and a computer to do this on that are compatible. So either both need to be 64-bit, or if for some reason you try to do this on a 32-bit Windows but want to make a 64-bit install USB stick, then you’ll need to juggle DVDs a bit since the bootsect.exe that you run must match the architecture of the computer you’re running it on.
Second, if you don’t like xcopy, and you’re running this on a Win7 computer or have robocopy available, then you can use the robocopy command:
PSH> robocopy d:\ h:\ /mir
Third (and this should be obvious, but just in case), you’ll need to adjust your drive letters and the selected disk in diskpart.exe to match your environment.
Finally, if you’re working from an ISO image, you can mount that ISO image as if it were an actual DVD disk using a utility such as VirtualCloneDrive. (This is freeware, no nag, and really useful!)
All this because my new HP DL160se G6 came with no optical drive at all. But more on that HP later.