Create an all-in-one x86+x64 Win7/Vista/Server 2008/R2 USB stick

One of the great things about the Vista and post-Vista operating systems is that the installer subsystem allows you a great deal of flexibility when it comes to installing multiple operating systems. It is fairly easy to put together a single installation DVD or USB stick that will allow you to install Vista, Windows 7, Server 2008 and Server 2008 R2 – in a variety of x86 and x64 flavors.

A couple of things to note about this guide:

  • I do not use Vista — I have never really used Vista and now with Windows 7 out there really is no reason to; however the steps here should work just fine with Vista installation sources
  • I have only tested this using a USB stick and will only cover that method here – it’s much more flexible (and faster) for installation than using DVD — but DVDs should work just fine: you can find plenty of tutorials on the web that will tell you how to use oscdimg.exe to take the files we create here and turn them into a burnable ISO

WHAT YOU WILL NEED:

  • USB stick, at least 4 GB (perhaps larger depending on how many OSes you plan to integrate, I use a 16 GB) that has been properly formatted using Steps 1 and 2 here
  • ISOs or DVDs of the operating systems that you plan to integrate
  • imagex.exe (can be found for download on the web, or you can download the full 1.7 GB WAIK here)
  • computer running Vista or newer operating system (XP should work but I have not tested it)

STEP 1: Extract the operating system files

Take your various ISO files or DVDs and copy their contents into subfolders on your hard drive – in my case I have Windows 7 x86, Windows 7 x64, and Windows 2008 R2, so I created folders called e:\7×86, e:\7×64, and e:\2008r2    (E is the letter of my hard drive, not the USB drive).

STEP 2: Browse the WIM files and extract the desired editions

Open a WAIK command prompt, or browse to whatever folder you downloaded imagex.exe to within an administrative level command prompt.  Start by running the following command:

imagex.exe /info e:\7×86\sources\install.wim

This will display a big verbose mess that, once you parse through it, lists out all the editions embedded in the WIM file (and their associated index #).  Most default Microsoft WIMs will have multiple editions – in this case the ones in the Windows 7 x86 WIM boil down to:

  • 1 Starter
  • 2 Home Basic
  • 3 Home Premium
  • 4 Professional
  • 5 Ultimate

Since Starter edition is basically worthless, I only want editions 2-5 in my custom WIM file, so I run these commands one after another:

imagex.exe /export e:\7×86\sources\install.wim 2 e:\install.wim “Windows 7 HOMEBASIC (x86)” /compress maximum

imagex.exe /export e:\7×86\sources\install.wim 3 e:\install.wim “Windows 7 HOMEPREMIUM (x86)” /compress maximum

imagex.exe /export e:\7×86\sources\install.wim 4 e:\install.wim “Windows 7 PROFESSIONAL (x86)” /compress maximum

imagex.exe /export e:\7×86\sources\install.wim 5 e:\install.wim “Windows 7 ULTIMATE (x86)” /compress maximum

I now have an install.wim file in the root of my E drive that contains only the editions I specified in these commands.  Next,  I want to integrate Windows 7 x64 so I repeat the above steps using the 7×64 path instead of 7×86.  You will notice that the x64 version of Windows 7 has no Starter edition, so the index numbers are not the same as the x86 source!  Also, since just about any machine new enough to run x64 is likely new enough to handle Aero graphics, I don’t bother with integrating the Home Basic version of x64 into my WIM – so I only add Home Premium, Professional, and Ultimate.

I then repeat these steps again using the Windows 2008 R2 source (here again I discriminate – I only pull Standard, Enterprise, Standard Core, and Enterprise Core because I have no use for the DataCenter or Web versions).

You can of course integrate any OSes and editions you like!  When you are done, you will have an install.wim file of varying size (for those of you planning on burning to DVD, you may have issues with WIM files that are larger than 4 GB…  To get around this see this link)

STEP 3: Finalize the USB stick

You must now choose which OS you want to use as the boot environment – this needs to be an x86 operating system if you plan to install any x86 OSes (because x86 OSes cannot be installed from x64 boot environments).  You also want to use the newest operating system you can, because you may encounter issues if you try to deploy an OS that is older than the boot environment – in my case I use Windows 7 x86 to ensure I can deploy any operating system I like:

  • take the custom install.wim file (from E:\) and replace the install.wim file in e:\7×86\sources
  • copy all contents from e:\7×86 to your USB stick
  • ***EDIT*** please see JAG’s comment below for a link to the extra step required to get the server OS to work properly!

Now boot from the USB stick and you should see all your OSes, like below!

osinstall1 osinstall2

Advertisements

20 thoughts on “Create an all-in-one x86+x64 Win7/Vista/Server 2008/R2 USB stick

    • What a great article! Any possiblity to have a completed iso of your setup? So that way we can just extract it and copy onto the usb drive! That would be fantastic. Just thought i would ask. Again, great article.

  1. Tried this and my USB drive only shows Windows 7 Ultimate (32-bit) and Windows 7 Ultimate (64-bit). Not sure what I’m doing wrong. Followed all the directions here.

    • G’day Ken,

      I’m seeing the exact same issue – Win 7 Ultimate x64 and x86 are the only choices presented whereas if I perform an “imagex.exe /info e:\7×86\sources\install.wim” I see all 21 OSes that I pulled into the WIM file (which is over 8.5 GB, by the way).

      • And I sorted it out. There’s a file called “ei.cfg” in the Sources folder that contains the following:

        [EditionID]
        Ultimate
        [Channel]
        Retail
        [VL]
        0

        So, I deleted this file and like magic, all 21 of the OSes became visible! Woot! 🙂

        Now, to add a hdd to that trest system and check some installs…

      • OK, so, having fixed (?) the “Ultimate only” issue, now I’m seeing “Windows could not display the images available for installation” for everything other than Windows 7 installations, so there’s something else that’s needed in addition to the instructions above.

        Sure, I can now see all 21 installation options, but that’s not really helpful when I can’t install anything other than Win 7 OS options (not just Ultimate, Pro, Ult, Home Premium all work, but no Server OSes).

        I’ll post back when I get that sorted.

  2. Sorry guys, have been on the road… Indeed it appears that unfortunately pushing out Server 2008 and Server 2008 R2 from the Win7 boot environment errors out. Bummer! What I’ve done instead is basically set up subfolders on my 16 GB usb stick – one for 7 (which includes x64 and x86 in one wim), one for 2008, and one for 2008 r2. Then on the rare occasion I’m going to build a server, I move the appropriate files out into the root temporarily. I also have a custom Win7 WIM that I use for building ready-to-go machines at client sites where we don’t have WDS available.

    Thanks for all the comments!

    Also, be sure that when you guys copy your ISO files over that you are deleting the ei.cfg file (if it exists). This file can limit the edition of Windows that setup will show you…

  3. Thanks for the method, I’ve found that when I use Windows 7 to try and use my image it doesn’t list them, but when I use the Windows 2008 installer all my OSes show up as expected. I haven’t actually tried to install anything yet as I don’t have the system to donate to the cause, but I guess I could use a virtual machine…

    Microsoft claims that WIM uses single instancing, do you (or anyone) know if that is from image to image within a single WIM image? (IE if they didn’t change a file from a totally different code branch, does it do single instancing on a per flavour, or do they just like a basic MD5, and then symlink the hell out of it? From what I’m seeing actually using it, it may do it on the same flavour of OS, but not from one flavour to another)

    Good write up! Cheers!

  4. I found the info on merging Windows 7 32/64 onto one disc, and had decided to try merging vista in there as well. But the windows 7 setup.exe seems to break the vista images, it doesn’t install for me that way, just as it seems that it won’t install server either. I’ve been working on putting together a general purpose multiboot usb key, and i’m really trying to avoid partitioning it, but it seems I may have to in order to get things working like I want

    Just curious though, has anyone else been able to get Vista to install using the windows 7 installer? I’m sure its supposed to work, but in all my searching, this blog is the closest thing to anything relevant that I can find about merging the win7 and vista installation files together for a single installer.

    At first I thought it was an issue with the post SP2 vista builds, but i’ve spent the last 2 days “slipstreaming” the service packs which has been more than tedious, and made new seperate vista install discs that work fine, and i can boot the vista installer from a usb key with vista 32/64 merged into a single install.wim just fine as well. But when I try to merge it into the Windows 7 install files, its a no go

  5. Hi,

    I’ve merged 3 pieces of x86 liveCD into one wim according to your solution (ERD Commander 6.0, Paragon Adaptive Restore, Paragon Hard Disk Manager) in this order. When I try to make an iso file from the wim (copied all the original boot, efi and sources folders and their contents into ezboot’s disk 1, made a boot.bif from one of the original iso-s, put it into ezboot’s dir, made a menu item running it then compiled the iso) it only runs the first item, even no option to choose from the three.
    Do you have any idea, suggestions?
    The concept is ok, as trying with the original iso-s, all of them can be put into ezboot dir and run one by one after compiling the iso…
    Would be even better, if you could give some advice how to make them a separate boot item (and not a submenu-like boot event) in my already existing multiboot dvd (consisting of xp and linux based utilities).

    Aprreciating your work, b.r.,

    dull

    • Thanks for the link Jag! Copying the license folder over is indeed the trick to getting the server OSes to install from the Win7 boot environment…

  6. Hi !

    Great Article !! – Thank you … !!! 🙂

    When I get the Windows Install Menu I cant read the choices ??
    I have captured 3 images using Imagex. And all 3 images works fine.
    Now I have exported them to one .wim file following this instruction.
    I can move the choice bar up and down 3 steps. So it can read the 3
    images in the .wim file. – But there is no text to choose from ???
    When I use imagex /info, every image has a “Name” !!
    Any ideas, anyone … ???
    Best regards
    /Allan (Sorry for my bad English) 🙂

  7. Pingback: Create Windows 7 AIO (All In One) DVD at it.megocollector.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s