Tuesday 12 May 2009

Creating a multiboot USB drive - Part two: prepare the Windows Vista/2008 installation images

Essential items & software for this part:

  • Windows Automated Installation Kit (WAIK)
  • Windows Vista and/or Server 2008 and or Windows 7 installation media for whichever editions you wish to install
  • GImageX - GUI for ImageX, not essential but highly recommended

Special thanks to chon_ from the msfn.org forum for the original instructions from which I derived this part of the guide.

Now that you have your USB drive ready for use, it's time to prepare your Windows installation source. This is done via the ImageX tool, which is part of the Windows Automated Installation Kit, or WAIK. ImageX can export individual images from the install.wim found on the standard Windows Vista and Server 2008 media. If you do not wish to change the images in your install.wim then you can simply extract your installation media to a folder on your hard disk, and move on to the next part.

Part 2.1 - Extract the images from each install media

Firstly, decide which images you want to incorporate into your multi install media. Keep in mind that the more images you want to include, the larger the source will become. To give you some idea of how large, every edition of Longhorn (that is, Server 2008 and Vista) comes to 5.5GB, and if you want to include Windows 7 that goes up to 8.5GB - too big too burn to a dual layer DVD but still useful if you have a 16GB+ drive. In this example, I will use Windows Vista Ultimate x86 & x64 and Server 2008 Enterprise x86 & x64 - probably the most commonly used versions.

Create a working folder with a structure similar to this;



Extract the contents of your Windows Vista x86 disc to the E:\LonghornAIO\Distribution folder (Substitute "E:\LonghornAIO\" for wherever you create your working folder. ) Note: you can use the x86 disc for Server 2008 too if you are building a Server 2008 only image. Avoid using the x64 versions as they will not work on any machine that lacks x64 support - any machine with an x64 capable processor will be able to use the x86 version so it's best to stick to that.

Move E:\LonghornAIO\Distribution\Sources\install.wim to E:\LonghornAIO\Vx86

Extract the install.wim files from each of the installation discs you wish to incorporate into source. For example, extract the install.wim from the Server 2008 x86 disk into Sx86.

Part 2.2 - Export the installation sources into a master install.wim

Now it's time to start merging in the images into your install.wim. Open GImageX and select the Export tab. Click the top Browse button and select E:\LonghornAIO\Vx64\install.wim. Click the bottom Browse button and select E:\LonghornAIO\Distribution\sources\install.wim. Click the Select button, and choose image 4 - Windows Vista ULTIMATE. Change the Compression option to Maximum. When you are finished, you should see something similar to this;



Click Export to begin extracting the image into the new install.wim file. This will probably take a few minutes, depending on the speed of your processor and hard disk. When the process is finished, close the window and change the source WIM to E:\LonghornAIO\Vx86\install.wim and select image 4 - Windows Vista ULTIMATE, then click Export again. The process should be much quicker this time as many of the files in the image are the same as the first one you extracted. Once the process has finished for the second time, you can check that both images are there by clicking the Info tab and selecting E:\LonghornAIO\Distribution\sources\install.wim and you will see something similar to this;



Repeat this process again, this time selecting E:\LonghornAIO\Sx64\install.wim as the Source WIM and selecting image 2 - Windows Longhorn SERVERENTERPRISE, and Export the image. Repeat this a final time selecting E:\LonghornAIO\Sx86\install.wim as the Source WIM and selecting image 2 - Windows Longhorn SERVERENTERPRISE, and Export the image. When you are finished, the Info tab should look something like this;



You may repeat this process as many times as you want, including as many images as you need to, but be careful not to accidentally export the same image twice. If you do accidentally merge the same image twice, you may use the Delete tab to remove the errant image from the install.wim.

Now that you have your super-sized install.wim with all the images you want, you will need to merge the license agreements from the Vista and Server 2008 discs. If you do not do this, you will receive this error message when you try to select an image for which the license agreement does not exist (for example: if you used the Vista x86 disc as the base and try to install Server 2008 Enterprise Edition but didn't copy the license agreement from the Server 2008 disc);



Fortunately, this is easy to do. Extract the sources\license folder from your Server 2008 disc to E:\LonghornAIO\Distribution\sources\license, overwriting any duplicated files. When you select the image now, you will see the license agreement instead;



As you can see, it now works; the Server 2008 Enterprise license agreement correctly appears in the Windows Vista setup.

Part 2.3 - Create a bootable ISO with the new source for testing

That's it, you now have the merged installation sources for Windows Vista Ultimate x86 & x64, and Server 2008 Enterprise x86 & x64. If you wish to test that it works properly before moving on to the next step, you can create an ISO of the new installation media using the WAIK. Run the Windows PE Tools Command Prompt as an Administrator, and use oscdimg.exe to create the ISO using the following command;

oscdimg -bE:\LonghornAIO\Distribution\boot\etfsboot.com E:\LonghornAIO\Distribution E:\LonghornAIO\Longhorn.iso -u2

Note that there is no gap between -b and E:\ - this is the correct syntax for specifying the boot sector. You can read more about the options for oscdimg at
Microsoft's Technet article for the tool. If your image is under 4GB you do not need to use the UDF file system, and you can replace the -u2 with -n.

 

After a couple of minutes oscdimg should finish creating your ISO file and you can now test it by either burning it to DVD or using your favourite virtualisation software. If everything has gone according to plan, you should see four images available for installation;



You can go back at any time and export additional images into your install.wim. For example, I extracted Windows 7 Ultimate x64 & x86 and Server 2008 R2 Enterprise and merged in the license agreements; - for some reason the Windows 7 and Server 2008 R2 images won't install properly if you merge them into an install.wim that contains Vista or Server 2008. I am investigating this to see if there is a workaround.


Now that you've prepared your Windows Vista/7/Server 2008/R2 all-in-one media, it's time to put it onto a USB drive and start actually using it; see part 3 for instructions on how to do this.

1 comment:

  1. 1> i had made 3 folders, distribution,s x86,v x86, and i copied my vista dvd to distribution.
    then i copied install.wim of server 2k8 to s x86, and moved install.wim of vista from distribution to v x86

    2> i merged vista x32 ultimate install.wim & server 2008 x32 enterprise install.wim using giimagex in a single
    install.wim,and deleted all clg files and copyed eula of server to vista license all process done fine.

    3> i made a iso using ocdimage cmd

    4> when i try to install iso using vmware. i could not get server 2008 in os selection menu and vista setup start
    automatically


    plz help me out y server 2008 is not showing in the os selection menu

    ReplyDelete