Would you like a fast reliable way to deploy your images? Yeah, who wouldn't? I have found a solution that is both fast and reliable. It involves WinPE (Windows Preinstall Environment) and a USB hard drive. This method will allow you to deploy a 4 gig image to a computer in about 2.5 minutes. Not too bad, huh?
What is WinPE?
There are mixed feelings about WinPE and its function in image deployment. The other day I was reading a post someone made about WinPE. Most of the comments about WinPE were negative because you have to pay for it. You do have to have a license to get WinPE, but if you have a license - or you can afford a license, it is a powerful tool you can add to your belt.
WinPE is basically a stripped down version of Windows. It does not have a GUI interface. Basically, you should think of WinPE as a fancy version of DOS (with all of the modern bells and whistles). The great thing about WinPE is that it does not require a hard drive to run. That means you can run it from a CD, USB Key, or a hard drive.
It does have several restrictions. For instance, it reboots itself every 24 hours. It does not have network sharing capabilities. The other major restriction is something that I mentioned earlier, it does not have a GUI. That means everything you do in WinPE is through the command prompt.
WinPE was originally developed to help deploy Windows XP and Windows 2003. Over time Microsoft has responded to its customers by adding more and more functionality. Now, on top of OS installation, you can also:
- Partition drives
- Run diagnostics
- Data recovery
- Rebuild a computer
If you really want to get your hands dirty you can do things like add network drivers to WinPE. They will allow you to connect to a server and do anything from copy files to deploy an image. When using WinPE, your imagination is really the limit.
Here are some handy resources if you want to learn more about WinPE and its basic functions:
How can you get WinPE?
There are two ways to get WinPE:
- You have a Volume License Agreement with Microsoft.
- You purchase an OEM Builder Windows XP "three pack" (I imagine there is a license update for Vista).
Installing WinPE on your USB Hard Drive:
Installing WinPE on a USB Hard Drive is relatively simple process, but it requires you to follow the steps to the letter. One small deviation will cause problems!
1) Setting up the Drive:
The drive has to have a boot sector. What is a boot sector? According to Wikipedia.com, a boot sector is: "a sector of a hard disk, floppy disk, or similar data storage device that contains code for bootstrapping programs (usually, but not necessarily, operating systems) stored in other parts of the disk." Basically, the boot sector is a part of your hard drive that makes it bootable. This is the most important step! When you format the drive, you must make sure that the hard drive has a boot sector. There are several ways to format a hard drive with a boot sector, here are a few:
- "Installing" Windows on your drive
- Plug your USB hard drive in
- Find your WinXP CD and put it in the drive
- Reboot your computer
- While your computer is booting, make sure that it boots to the WinXP CD
- You want to start the install of Windows on your USB Key, so make sure to select the right hard drive off of the list (if you don't you will hose your computer)
- Once selected, make sure you format the drive
- Once the drive is formatted, turn the computer off
- Proceed to step 2.
- MaxBlast 4 (MB4): This software was created by Maxtor (now owned by Seagate) to help you install a new hard drive.
- Install MB4 (it is attached to this article)
- Once installed, the following screen will appear (after you have run the program)
- Click on "Utilities" and then click "Next"
- The next screen will appear:
- On this screen, select: "Drive to Drive Data Copy" (that is the first radio button) and click "Next"
- The following screen will appear:
- Select your "Source" (your C: drive) and your "Destiniation" (your USB hard drive) drives
- Click "Next," and the program will start to copy the files (by copying your drive exactly)
- When done, proceed to step 2.
- Image your drive! All you have to do is put one of your Windows images on the USB hard drive. Delete all of the files that you are not using, and proceed to step 2.
2) Installing WinPE:
- Insert the WinPE cd into the cd-rom drive
- Go to the USB hard drive and create a folder called Minint
- Open up the WinPE cd and browse into the folder called i386
- Select all the files inside the i386 folder and copy them into the minint folder
Note: If you boot your computer using WinPE and try to copy the files from the i386 folder, it will not copy all of the necessary files to the Minint folder. The best practice is to use a computer that has windows installed to copy the files
- Select the ntdetect.com and setupldr.bin and copy them to the root directory
- Rename the setupldr.bin file to ntldr (with no file extension)
Now we have WinPE installed on our drive we are good to go! Here is what you need to know to start scripting in WinPE:
- On the USB hard drive, go to: minint/system32
- You will find a file called, startnet.cmd. This file is very important. Basically this file contains everything that WinPE needs to set up tcpip, netbios, and msclient. You can also add scripting to this file to automate almost anything.
- To get more information on what scripts can be run, type in "/?" (without the quotes) in the command prompt. It will give you a list of WinPE commands you can run.
Here are some resources you can use to do some crazy scripting in WinPE.
Some people don't want to bother with getting a license for WinPE. There are some other options. One good option is BartPE. It only takes a spare Windows XP license. Here are some differences between Windows XP and Bart PE:
- BartPE is not supported by Microsoft. Windows PE is an official Microsoft product.
- BartPE has a graphical user interface. Windows PE has a command line interface.
- The tools needed to make a BartPE installation are free software. Windows PE is available only to Microsoft OEM users.
- BartPE allows unlimited custom plugins. Windows PE has a limited range of plugin options.
If that is not enough, here are some more technical differences between Bart PE and WinPE:
- Target - Microsoft sees Windows PE as an installation platform. Bart sees Windows PE as the next generation rescue platform.
- Start-menu - Bart's builder gives you a simple, dynamic and powerful start-menu (Nu2Menu, see screenshots). Microsoft's builder does not give you a start-menu, it uses a command prompt.
- Build from - Bart's builder can also build from Windows XP Home Edition or from a preinstalled Windows XP version (without CD).
- Plugins - With PE Builder you can easily add applications, drivers or tools using plugins. This makes PE Builder extremely powerful. The end user can even combine plugins from different software vendors into one CD image.
- Network support - PE Builder includes its own network support tools (bartpe/penetcfg) to start TCP/IP and Microsoft Client. The TCP/IP settings like: dynamic/static ip-address, subnet-mask, default gateway, dns-servers computer-name, workgroup can be changed on-the-fly. You can create pre-defined profiles, that you can select. Microsoft Windows PE only supports DHCP or fixed settings using winbom.ini. Also there is a plugin (NwDskPe) created by Erwin Veermans that loads the Netware Client on BartPE (IP/IPX).
- Fileshare - BartPE can start File Sharing support so you can connect to the system through a share.
- VNC - Because of the File Sharing support you can also run UltraVNC.
- DOS support - Bart's builder has a plugin called "dospe".
- License - Microsoft Windows PE is only for Enterprise/OEM customers (see previous), BartPE is for everybody!
- 64-Bit - Bart's builder does not support Windows 64-bit editions.
Another good option is Linux, which is free. I have no idea how to set this up....
I have done some pretty crazy stuff with WinPE. Probably my pride and joy is setting up an Automated install of Windows XP. The USB drive would boot up, and it would automatically partition the computer, copy the install files, and then install Windows. If there is interest, I can write another article on how I did this amazing feat (I say amazing because it was hard).
I have attached MB4 to this article. I found the software at the following address: http://www.softwarepatch.com/utilities/maxblast.html. From the link you can download an ISO which you can burn to a CD. I chose to extract the ISO and get just the software that I needed to copy the files. If you want the entire CD, feel free to download it.