Deployment Solution

 View Only

Installing WinPE on a USB Device - Part I (setting everything up) 

Mar 28, 2007 01:07 PM

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.

Resources:

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
    1. Plug your USB hard drive in
    2. Find your WinXP CD and put it in the drive
    3. Reboot your computer
    4. While your computer is booting, make sure that it boots to the WinXP CD
    5. 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)
    6. Once selected, make sure you format the drive
    7. Once the drive is formatted, turn the computer off
    8. 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.
    1. Install MB4 (it is attached to this article)
    2. Once installed, the following screen will appear (after you have run the program)
    3. Click on "Utilities" and then click "Next"
    4. The next screen will appear:
    5. On this screen, select: "Drive to Drive Data Copy" (that is the first radio button) and click "Next"
    6. The following screen will appear:
    7. Select your "Source" (your C: drive) and your "Destiniation" (your USB hard drive) drives
    8. Click "Next," and the program will start to copy the files (by copying your drive exactly)
    9. When done, proceed to step 2.
Note: You may not have to wait for all of the files on your drive to copy (I did not and everything worked out).
  • 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:

  1. Insert the WinPE cd into the cd-rom drive
  2. Go to the USB hard drive and create a folder called Minint
  3. Open up the WinPE cd and browse into the folder called i386
  4. 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
  5. Select the ntdetect.com and setupldr.bin and copy them to the root directory
  6. Rename the setupldr.bin file to ntldr (with no file extension)

3) Scripting:

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:

  1. On the USB hard drive, go to: minint/system32
  2. 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.
  3. 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.

Scripting Resources:

Here are some resources you can use to do some crazy scripting in WinPE.

Other options:

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....

Example:

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).

Notes:

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.

Statistics
0 Favorited
0 Views
5 Files
0 Shares
0 Downloads
Attachment(s)
doc file
Installing WinPE on a USB Device.doc   1.74 MB   1 version
Uploaded - Feb 25, 2020
zip file
MB4.zip   3.46 MB   1 version
Uploaded - Feb 25, 2020
JPG file
mb4-1.JPG   54 KB   1 version
Uploaded - Feb 25, 2020
JPG file
mb4-2.JPG   38 KB   1 version
Uploaded - Feb 25, 2020
JPG file
mb4-3.JPG   52 KB   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Comments

Jun 18, 2011 04:39 PM

Hi trb48,

Your post is very interested, i have a question about WinPE for Win7, I built my WinPE 4 Win7 and now I would like to insert PGP into the boot then I can use my PGP command line there. How do I do to insert it into my project, thanks for advance.

ChuBa.

Jun 17, 2007 04:48 PM

Installing bartpe's winpe onto a usb drive only require 256mb of space.
Also you guys should check out winpe2.0 as it is easier to install on a USB HD. I recommend downloading the vista WAIK and checking the help files.

May 04, 2007 04:35 PM

I finally got some time for Part II. Here is the link: http://juice.altiris.com/node/1569

May 04, 2007 11:03 AM

You can get Win PE 2.0 from the WAIK
Windows AIK
It also comes with some pretty thorough documentation in the .CHM format
I have used it to install Win 2003 / XP / using a utility called bootsect that comes with the WAIK
Win PE 2.0 is Vista like and has very many nice built in utilities.

Apr 13, 2007 04:59 PM

I use it already on several USB drives. I carry them with me for the specific needs of my customers.
Thanxsss
regards
Erik

Apr 13, 2007 02:16 PM

Ok got winpe running on a thumb drive and I built it through the ds console. I used a pny 1gb that had U3 stuff all over it. First I used the U3 uninstall utility avail from U3 to get rid of everything and format it FAT. I have done this on several diff manuf not only pny.
The author hit the nail on the head with the startnet.cmd it is a very versital way to image and do many other quick things. trb48 if you would like a hand on the next articles let me know

Apr 10, 2007 09:28 AM

Wow, thanks for the great article and also the tip on using the Maxtor application to create a boot sector on my USB drive. I was not aware you could do that. Awesome job.

Apr 09, 2007 07:00 PM

The photo I added to the top of this article (the one of a pair of USB flash drives) probably didn't help.
I've changed the photo to correctly reflect the medium discussed in the article: USB Hard Drive.
JM

Apr 09, 2007 06:17 PM

For some reason, it is really hit and miss when you use a flash drive. I am not sure why.
I do know that this works every time if you use a USB hard drive.

Apr 09, 2007 05:41 PM

I was following your procedure but using a USB "FLASH" Drive ... not a USB Hard Drive ... seems like it should still work.
I would like to see how you accomplished the Unattended Win XP Setup nonetheless.

Apr 07, 2007 12:59 AM

When I get a few minutes I am going to write some follow-up articles. Is there anything thing in particular you want me to focus on?
-trb48

Apr 05, 2007 05:37 PM

The drive needs to be at least 700MB. Why? You need enough room to install WinPE. It is smaller than 700MB (and you can remove some things from WinPE to save on size).
I hope that all works out...

Apr 05, 2007 05:35 PM

If you boot to the drive does it load WinPE?
If you followed my directions correctly, and you boot to the hard drive, WinPE should load.
Let me know...

Apr 05, 2007 04:18 PM

"If there is interest, I can write another article on how I did this amazing feat (I say amazing because it was hard)."
I get to the point where the installation boots to the hard drive for the first time, and I get "OS not found" error.

Apr 03, 2007 03:48 PM

What is the minimum capacity of the USB drive?

Mar 28, 2007 01:37 PM

Fantastic description! It could be useful also to test Linux, when I will have enough time I'll test it.
Thanks

Related Entries and Links

No Related Resource entered.