Freigeben über


How to create the ultimate USB multi boot disk

Since I'm preparing myself for the new Windows 7 and Windows Server 2008 R2 operating systems, I tend to download new builds fairly often and was looking for a quick way to install an operating system on a physical machine without burning DVDs all the time. The obvious answer: I created my own USB boot key that lets me boot multiple operating systems.

What do you need?

  • A "Technician PC" to create the USB key – I did it on a workstation running Windows 7 build 7000, but Vista (and possibly XP? Not tested, though) will also do.
  • The Windows Advanced Installation Kit (WAIK). You can get it from various sources like Technet or from here.
  • A USB key. I'm creating my "monster WIM file" as we speak, and it's already 4.3 GB. You should get an 8 GB (or better) key that's fairly new (for read/write speed).
  • The sources. In other words, you need the x:\sources\install.wim (x: being your CD drive) file of the operating systems you'd like to install.

Step 1: Preparing the USB key

Since the WIM file I'm creating (see Step 2) will be larger than 4 GB, the USB stick needs to be formatted with NTFS. In a command prompt with administrative rights, do the following ( "clean" will permanently erase the contents of your USB key!! ):

diskpart
list disk
select disk 1
clean
create partition primary
select partition 1
active
format fs=ntfs quick
assign
exit

The above assumes that the "list disk" command showed you two disks, "Disk 0" being your internal hard disk and "Disk 1" being the USB stick. Your system might be different. "clean" will permanently erase the contents of your USB key!! Ony my system, the "assign" command put my USB key on drive H:, this could also be different on yours.

Next, copy the contents for example of a Vista Windows 7 (*)  CD to your USB key:

xcopy f:\*.* /s /e /f h:\

Your USB key is now ready to go.
(*) = I found Windows 7 to work best for me. Just use Beta 1 or, when available, RC.

Step 2: Creating the "Monster WIM"

The WIM format introduced with Windows Vista is basically a container for one or more OS images. You can have a look into such a container by starting the WAIK command prompt (see your Windows start menu after installing WAIK) and entering the command "imagex.exe /info x:\sources\install.wim" (assuming x: is your DVD drive). The output will look something like this (some output snipped):

C:\Windows\system32>imagex.exe /info f:\sources\install.wim

ImageX Tool for Windows
Copyright (C) Microsoft Corp. All rights reserved.

WIM Information:
----------------
GUID: {a99a2697-00aa-47fb-a514-86e22cc1a7a6}
Image Count: 6
Compression: LZX
Part Number: 1/1
Attributes: 0xc
Integrity info
Relative path junction

Available Image Choices:
------------------------
<WIM>
<TOTALBYTES>2643418299</TOTALBYTES>
<IMAGE INDEX="1">
(snip)
<NAME>Windows 7 SERVERSTANDARD</NAME>
<DESCRIPTION>Windows 7 SERVERSTANDARD</DESCRIPTION>
<FLAGS>ServerStandard</FLAGS>
<HARDLINKBYTES>3637973169</HARDLINKBYTES>
<DISPLAYNAME>Windows Server 2008 R2 Standard (Full Installation)</ DISPLAYNAME>
(snip)
</IMAGE>
<IMAGE INDEX="2">
(snip)
<NAME>Windows 7 SERVERSTANDARDCORE</NAME>
<DESCRIPTION>Windows 7 SERVERSTANDARDCORE</DESCRIPTION>
<FLAGS>ServerStandardCore</FLAGS>
<HARDLINKBYTES>995178928</HARDLINKBYTES>
<DISPLAYNAME>Windows Server 2008 R2 Standard (Server Core Installation) </DISPLAYNAME>
</IMAGE>

As you can see in the partial output above, the WIM contains 6 images; I've included the more important parts of the first two images. Creating the actual WIM is now straightforward enough:

imagex.exe /export f:\sources\install.wim 1 d:\temp\install.wim 1 "Windows Server 2008 R2 Standard (FULL)"
imagex.exe /export f:\sources\install.wim 1 d:\temp\install.wim 2 "Windows Server 2008 R2 Standard (CORE)"

Now insert the next DVD, say with Windows Server 2008 x64, and repeat the process (run "imagex.exe /info …" to see which images to get):

imagex.exe /export f:\sources\install.wim 1 d:\temp\install.wim 2 "Windows Server 2008 Enterprise x64 (FULL)"
imagex.exe /export f:\sources\install.wim 1 d:\temp\install.wim 5 "Windows Server 2008 Enterprise x64 (CORE)"

You don't have to worry about numbering in your newly created WIM file; imagex.exe will assign them automatically in ascending order. If you want to get rid of an image in your WIM, use:

imagex.exe /delete d:\temp\install.wim 1

Step 3: Copying the new WIM file to the USB key

All that remains to do is replacing the "install.wim" on your USB key with your customized one:

copy d:\temp\install.wim h:\sources

Select "Yes" if prompted to overwrite the existing install.wim.

Conclusion

That's it, you should now be able to boot from the USB key (provided your computer's BIOS supports this and it has been enabled) and start installing away. To dramatically increase performance during the export of the images, either mount the source OS DVDs using a .ISO mount tool or copy the install.wim to your local hard disk. You may also want to experiment with different USB key drives to find one that is fast enough for your needs.

Comments

  • Anonymous
    January 01, 2003
    Hi Fermin, your blog was helpful, however it did not worked out. with windows 7 version. I used the Windows Server 2008 R2 disc instead. everything else is as you instructed. Now i have a bottable USB drive with windows 7 Enterprise, Windows 7 Professional, Windows 7 Ultimate, Windows Server 2008 Standard Full/Core, and Windows Server 2008 Enterprise Full/core.

  • Anonymous
    January 01, 2003
    Thanks. This was exactly what I was looking for and works better than anything else I've come across. @mikeyhalla