02 - How to create a USB drive that will install one of many choices of Windows OS's (Vista/Win7/Server 2008/XP)

unique hitsgodaddy tracker
Note: The instructions have been tested and seem to work OK using a Vista, Win 7, Server 2K8, Server 2008 R2 install DVDs and Win 7 PE 32bit. Let me know if you have tried it with any others. See other article for how to add XP Setup CDs.



ATTENTION: This tutorial is now superseded/replaced by Tutorial #43 if you want to keep all the DVDs as ISO files instead OR better yet (and much easier), you can make an Easy2Boot MultiBoot USB drive and just copy all your Windows Install ISO files (and 100's of others) to it.



Note: If you want to install any one of 11 different versions of Windows 7, you can simply combine all the Win 7 WIM images into one big Install.Wim file see here for details (use RMPrepUSB to prepare an NTFS USB drive for Win7 booting and copy over the entire E:\AIO\DVD folder).

This tutorial allows you to choose from Vista/Win7/Server 2K8 all from the same bootable USB drive.

Aim
You wish to create a single USB boot key/drive that will install any version of Vista, Windows 7 or Server 2008 to a system's hard disk - i.e. just as if you had all the Micro$oft Windows install DVDs in your pocket. This tutorial has been written so that you can adapt it to install as few or as many as you wish (or have room for on your USB drive!).

Note: You can also install Windows XP as well as the other OS's. To install from a Setup CD (just like booting from an XP install CD) see Tutorial #30 here.
To install XP from an image file, you first need to boot to WinPE v3 (see menu option below) and also have a copy of the XP CD files on your USB drive (or a ZIP file containing all the files) - see here for details.

This tutorial will allow you to boot from a USB flash drive (or USB hard disk) and choose from a menu:

Fig. 1 This menu was made using menu2.lst (renamed to menu.lst).

Equipment required
  • Source Microsoft DVDs or ISOs for Vista/Win7/Server 2008 (note OEM DVDs will usually not work) (Win7 ISOs here - use Digital River links, some other links may be broken)
  • A USB drive large enough to fit all source files onto (min 4GB for one DVD, 32GB+ for all DVDs)
  • RMPrepUSB v2.1.617 or later
  • Windows 7 WAIK (click to download)
  • A Windows Vista/Windows 7 computer to prepare the USB drive files (Win7/Vista required as BCDEdit.exe is required)
  • The MultiWin9.Zip file (click the link to download from the Tutorials download section)
Method

Outline
  1. Download and install the Windows 7 WAIK to obtain ImageX utility and WinPE OS (you MUST use Windows 7 RTM WAIK version or the menu.lst patches to bootmgr will not work)
  2. Make a new folder called C:\MYUSB
  3. Copy bootmgr (or make multiple copies of bootmgr)
  4. Copy the BCD files from each DVD and modify them
  5. Copy the boot.wim file from each DVD (a .WIM file is like a .ZIP file)
  6. Modify each boot.wim file
  7. Copy over the Windows source file(s) from each DVD (usually sources\install.wim)
  8. Partition, format and create the USB drive using RMPrepUSB
  9. Boot from the target system using your new USB install drive

Final structure of C:\MYUSB folder (note: folder names must not contain spaces):

\MYUSB
menu.lst
bootmgr
bootmgr1
bootmgr2
bootmgr3
bootmgr4
bootmgr5
bootmgr6
changeBCD.cmd (does not need to be copied to the USB drive)
zbootmgr.exe (does not need to be copied to the USB drive)
ModBootWim.cmd (does not need to be copied to the USB drive)
grldr (only on USB drive after running grub4dos install in step 8)


\MYUSB\Sources
boot.wim
boot1.wim
boot2.wim
boot3.wim
boot4.wim
boot5.wim
boot6.wim

\MYUSB\Boot
boot.sdi (BSOD if not present!)
bcd
bc1
bc2
bc3
bc4
bc5
bc6

\MYUSB\W732
Install.wim
\OEM folder (optional)
unattend.xml (optional)
\MYUSB\W764
Install.wim
\OEM folder (optional)
unattend.xml (optional)
\MYUSB\V32
Install.wim + all other files from DVD \Sources folder
\OEM folder (optional)
unattend.xml (optional)
\MYUSB\V64
Install.wim + all other files from DVD \Sources folder
\OEM folder (optional)
unattend.xml (optional)
\MYUSB\SVR2K832
Install.wim (+ all other files from DVD \Sources folder if not RC2 version)
\OEM folder (optional)
unattend.xml (optional)
\MYUSB\SVR2K864
Install.wim (+ all other files from DVD \Sources folder if not RC2 version)
\OEM folder (optional)
unattend.xml (optional)

How it works:

PC boots from USB -> grub4dos loads -> menu.lst presented -> bootmgrx selected -> \boot\bcx selected -> \sources\bootx.wim loaded -> winpeshl.exe -> winpeshl.ini -> mysetup.cmd runs -> windows setup directed to correct install.wim file by mysetup.cmd file.


Step-by-step instructions

1. Download and install the Windows 7 WAIK to obtain the ImageX utility
For instructions on how to do this, please refer to the first part of my tutorial here.
Follow the instruction up to the point where a WinPE folder has been created (Step 1)
You can create either an x86 version or an amd64 (64-bit) version (x86 recommended as 64-bit WinPE will not boot on 32-bit only CPUs such as Atom N270/netbook CPUs).

2. Create a new folder called C:\MYUSB on you hard drive.

Copy and extract the contents of the latest version of MultiWin9.ZIP file in the Beta Downloads - Miscellaneous Tutorials section of this website to the C:\MYUSB folder.

Latest version of zbootmgr.

Note: If you delete menu.lst and rename menu2.lst to menu.lst you can omit step 3.1 below (recommended).

3. Copy bootmgr from the c:\pe86\ISO folder made in step 1 above to your new C:\MYUSB folder.

(before you follow the next 3 instructions in section 3.1 below, read the footnote at the bottom of this page to save you some work - you are recommended to use menu2.lst and skip section 3.1 but you MUST use the Win7 RTM version of bootmgr with a CRC32 value of EE471B58!)

3.1 Now run the program zbootmgr.exe and select the \MYUSB\bootmgr file.
Click the Save button and save the modified bootmgr as bootmgr1.
Repeat this 5 more times to save 6 versions (bootmgr1, bootmgr2, bootmgr3... bootmgr6) of the file.

4. Copy the \boot\BCD file from each different source Windows install DVD to C:\MYUSB\boot\bcx as follows:
From the Windows 7 64-bit DVD, copy the file \boot\bcd to C:\MYUSB\boot\bc1
From the Windows 7 32-bit DVD, copy the file \boot\bcd to C:\MYUSB\boot\bc2