Thursday, November 19, 2009

How to create a USB multi boot disk with Windows 7 and Windows Server 2008 R2

from http://blogs.technet.com/ferminsa/archive/2009/03/26/how-to-create-the-ultimate-usb-multi-boot-disk.aspx we read:

Step 1: Preparing the USB key

Since the WIM file we are 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.

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:
------------------------

2643418299

(snip)
Windows 7 SERVERSTANDARD
Windows 7 SERVERSTANDARD
ServerStandard
3637973169
Windows Server 2008 R2 Standard (Full Installation)
(snip)


(snip)
Windows 7 SERVERSTANDARDCORE
Windows 7 SERVERSTANDARDCORE
ServerStandardCore
995178928
Windows Server 2008 R2 Standard (Server Core Installation)


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 /compress maximum /export f:\sources\install.wim 1 d:\temp\install.wim "Windows Server 2008 R2 Standard (FULL)"
imagex.exe /compress maximum /export f:\sources\install.wim 2 d:\temp\install.wim "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 /compress maximum /export f:\sources\install.wim 1 d:\temp\install.wim "Windows Server 2008 Enterprise x64 (FULL)"
imagex.exe /compress maximum /export f:\sources\install.wim 2 d:\temp\install.wim "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.

Also take a look at this link http://g0b3ars.wordpress.com/2009/09/20/create-an-all-in-one-win7vistawindows-server-2008-discusb-stick/

No comments:

Post a Comment