Wednesday, 15 August 2012

Making bootable disk containing all versions of Windows 7 of both x86 and x64 architecture

Recently I have learned about various Microsoft Offerings which ease the deployment of Operating systems for OEMs and also for any other environment involving large number of computers.
Some of them which are of particular interest  to me are:
  • WAIK (Windows automated Installation Kit- set of tools to customize and streamline OS install (1.7GB!)). [don't download it just yet, here is a way to save Bandwidth]
  • WDS (Windows Distribution Services- help deploy OS(s) over a network).
  • MDT (Microsoft Deployment Toolkit).

In a windows & installation disk two files are of concern to us:
Now in an ordinary win7 installation disk if you remove the ei.cfg then all versions of Windows 7 are made available since ei.cfg is the file containing information about the version to install [more on ei.cfg at TechNet ].

The file conatains the setup files for various versions OS. Ordinarily it will contain folders indexed from [1], [2], [3] …  and so on depending on the architecture (x86-32 has 5 versions while x86-64 has 4 versions coz of windows 7 starter being available on x86-32 architecture only). Along with the folders will be an XML file containing descriptions of all the images present in the install.wim file.

These files can be viewed once install.wim is opened with 7zip
 So to make available all versions of win7 of x86 and x64 architecture in the disk the corresponding folders must be added and entry be made in the XML file.

Before getting started we must have the following software:
  • win7 x86-32(32bit) installation medium
  • win7 x86-64(64 bit) installation medium
  • ei.cfg removal utility
  • imagex (part of WAIK (this post explains a more bandwidth friendly way to obtain imagex which doesn't require downloading and installing complete WAIK )
  • ultraiso or any other iso editing tool that allows creation of bootable disk.

Step1: Use ei.cfg removal utility to remove ei.cfg from iso (if you have installation disk just follow steps 2 and 3 and then remove ei.cfg from sources directory in 32bit and 64bit folders).

Step2: Make two directories in a drive containing enough free space (about 20gb) , lets call them  32bit and 64bit.

Step3: Extract the contents of x86-64 iso and x86-32 to 64bit and 32bit respectively.

Step4: Open elevated command prompt and navigate to the parent directory of 32bit and 64 bit folders . Also copy imagex to that directory. Now execute the following commands:
  • imagex /export 64bit\sources\install.wim 1 32bit\sources\install.wim "Windows 7 Home Basic x64"
  • imagex /export 64bit\sources\install.wim 2 32bit\sources\install.wim "Windows 7 Home Premium x64"
  • imagex /export 64bit\sources\install.wim 3 32bit\sources\install.wim "Windows 7 Professional x64"
  • imagex /export 64bit\sources\install.wim 4 32bit\sources\install.wim "Windows 7 Ultimate x64"
what the first command means is that from the source (64bit) install.wim move the first image (viz of win7 home basic) to install.wim of 32bit win7 (which already contains all the versions of win7-x32) and name it "Windows 7 Home Basic x64" or any other name which isn't already in the .wim file (this is not the name visible in the dialogue visible while installation).
Others have a similar explanation.

Step5: Using Ultra Iso extract boot image from the original Installation medium.
Step6: Create a new bootable disk in Ultra Iso select the extracted .bin file in step5 and paste all the contents of 32bit directory to it and save the ISO.

The Iso is ready now. During installation you the following dialogue will be visible, which can be then used to select the desired version to install.

In the next blog ill try to shorten the list of software required , particularly imagex ,ultraiso and ei.cfg removal utility.