Computer Hope

Other => FAQ solutions database => Other => Topic started by: killerb255 on July 09, 2009, 07:57:45 PM

Title: How to create a Windows PE boot disc
Post by: killerb255 on July 09, 2009, 07:57:45 PM
I've been here off and on since late 2008, and I've noticed that I've suggested to many people to create a Windows PE disc for one reason or another. 

To avoid sounding too much like a broken record, I figured a FAQ would be a good idea, no? :)

So, without further ado:

1) What is Windows PE?  Is it the next version of Windows?

Nope.  In a nutshell, it's a miniature version of Windows that boots from a CD (or other removable media) and loads directly to your computer's memory. 

2) Why would I need Windows PE?  I already have a working version of Windows (XP, Vista, etc.)!

Windows PE, or "WinPE" is best used for when your Windows is NOT working!  If your computer has a virus, a corrupt file, or if you just simply want to back up your data without removing the hard drive from your PC, PE can get you there!  You can also run some lightweight programs from WinPE!

3) I already use Knoppix, BartPE, or Ultimate Boot CDs for that purpose.  Why do I need Windows PE?

You probably don't.  However, Windows PE does have a few advantages over the former three options:
a) You can install drivers while inside the WinPE environment!!  Forgot to load that SATA driver?  Just put it on a flash drive, plug it in, and use the drvload command, and now PE will see your SATA drives without having to create a whole new disc!!

Also, WinPE comes with drivers for flash drives!  Just plug it in and go!

4) How much does it cost?  Is it free?  If not, can you hook me up with da warez, winkywinkywinky?

Luckily, this ain't da warez--otherwise, I'd be banned and this whole FAQ would be blown away from the Computer Hope Servers!

It's perfectly free, and even Microsoft has information on PE!

http://technet.microsoft.com/en-us/library/cc507857.aspx

It's free as long as:
a) You don't use it as a full-blown OS.  It's designed to reboot itself after 72 hours.
b) You don't distribute it as is.  Instructions on how to make your own is fine.  Even writing automated creation tools are okay.  Distributing an ISO is not so much. 

5) Is my 'puter fast enough for it?

As long as you have around 512 MB of RAM, it'll be fine.  Microsoft says 256 MB, but one of three things will happen booting PE on a machine with 256 MB of RAM:
a) It'll boot up, but no commands will work.
b) Blue Screen of Death (yes, PE can do this).
c) Black Screen of Death.

However, there is a way to boot PE on machines with 256 MB of RAM.  However, I won't get into that unless someone requests that I do so.

6) How did you learn about PE?

From this guy:
http://www.msfn.org/board/index.php?showtopic=83722

His batch instructions made life a lot easier, as PE's documentation is kind of dry...

7) So how do I make me sum PE?

Read on and find out! :)
Title: Re: How to create a Windows PE boot disc
Post by: killerb255 on July 09, 2009, 08:45:39 PM
Steps for creating a Windows PE disc

1) Download the Windows Automated Installation Kit (WAIK).  Currently, there are two now:

a) Windows Vista WAIK for making Vista-based Windows PE 2.1 discs.

b) Windows 7 WAIK for making Win7-based Windows PE 3.0 discs.

I find the Windows 7 WAIK easier to deal with, so we're going to go with that one:

http://www.microsoft.com/downloads/details.aspx?familyid=696DD665-9F76-4177-A811-39C26D3B3B34&displaylang=en

Yes, you read that right: that is a 1.4 GB download!  However, it's worth every byte!

2) Burn the ISO to a DVD using your favorite burning software or mount it with CD emulation software to save yourself a disc.

3) Install the WAIK.  Even though the instructions say that it will only install on Windows Server 2003, Windows Vista, Windows Server 2008, or Windows Server 2008 R2, it'll install just fine for our purposes on Windows XP.

4) Download the attached PE_batch.zip file.  Extract the zip file to the root of your C:\ drive.    EDIT: Never mind...the attachment was deleted.  Create seven batch files using the following instructions: http://www.computerhope.com/forum/index.php/topic,87312.msg652235.html#msg652235

NOTE: Yes, these are variations of Spooky's batch files from the MSFN forums, and he gets full credit for the initial idea.  His were based off of WinPE 2.0 (Vista RTM WAIK).  I modified these to be compatible with WinPE 3.0 and to add additional drivers without typing the command for each driver one-by-one...

5) Double-click each batch file in order from 1-MakePE_Directory.bat thru 7-MakeISO.bat, following the instructions along the way.

6) Burn the resulting ISO file in C:\PE\winpe_x86 or C:\PE\winpe_AMD64 to a CD using your favorite burning software.

[attachment deleted by admin]
Title: Re: How to create a Windows PE boot disc
Post by: Quantos on July 20, 2009, 08:09:29 PM
I just use [email protected] (http://www.ntfs.com/boot-disk.htm).
Title: Re: How to create a Windows PE boot disc
Post by: killerb255 on July 21, 2009, 09:46:58 AM
[email protected] is not free.  It's a 10-day trial version.

Create your own PE disc (or use the batches provided in the second post) and not have to deal with the hassle.
Title: Re: How to create a Windows PE boot disc
Post by: ea3ot on September 15, 2009, 12:01:25 PM
To make the CD is not only sufficent  with  the M$ ISO????
Title: Re: How to create a Windows PE boot disc
Post by: Geek-9pm on September 15, 2009, 03:34:00 PM
Quote
7) So how do I make me sum PE?

This is a Pragmatic answer.

Slave the original drive. Put a good drive in the master position.
Do an full install. Now you can a full OS. Who needs a PE.

While the install is underway, order Pizza.


Title: Re: How to create a Windows PE boot disc
Post by: killerb255 on September 18, 2009, 10:03:41 AM
This is a Pragmatic answer.

Slave the original drive. Put a good drive in the master position.
Do an full install. Now you can a full OS. Who needs a PE.

While the install is underway, order Pizza.




This is fine if you want a permanent backup OS on your PC.  Not everyone wants this.
Title: Re: How to create a Windows PE boot disc
Post by: darrcry on September 18, 2009, 04:55:28 PM
This is my first time and I'm a novice at computers but I can follow directions.  However, none of this seems to be working for me.
Title: Re: How to create a Windows PE boot disc
Post by: killerb255 on September 19, 2009, 08:48:31 PM
This is my first time and I'm a novice at computers but I can follow directions.  However, none of this seems to be working for me.


Which part isn't working?  If I know this, it'll help me improve the directions (and, perhaps, help you get this working).
Title: Re: How to create a Windows PE boot disc
Post by: andypies on December 09, 2009, 10:28:36 AM
do you have the batch files, they appear to have been removed?

Thanks

Steps for creating a Windows PE disc

1) Download the Windows Automated Installation Kit (WAIK).  Currently, there are two now:

a) Windows Vista WAIK for making Vista-based Windows PE 2.1 discs.

b) Windows 7 WAIK for making Win7-based Windows PE 3.0 discs.

I find the Windows 7 WAIK easier to deal with, so we're going to go with that one:

http://www.microsoft.com/downloads/details.aspx?familyid=60A07E71-0ACB-453A-8035-D30EAD27EF72&displaylang=en

Yes, you read that right: that is a 1.4 GB download!  However, it's worth every byte!

2) Burn the ISO to a DVD using your favorite burning software or mount it with CD emulation software to save yourself a disc.

3) Install the WAIK.  Even though the instructions say that it will only install on Windows Server 2003, Windows Vista, Windows Server 2008, or Windows Server 2008 R2, it'll install just fine for our purposes on Windows XP.

4) Download the attached PE_batch.zip file.  Extract the zip file to the root of your C:\ drive. 

NOTE: Yes, these are variations of Spooky's batch files from the MSFN forums, and he gets full credit for the initial idea.  His were based off of WinPE 2.0 (Vista RTM WAIK).  I modified these to be compatible with WinPE 3.0 and to add additional drivers without typing the command for each driver one-by-one...

5) Double-click each batch file in order from 1-MakePE_Directory.bat thru 7-MakeISO.bat, following the instructions along the way.

6) Burn the resulting ISO file in C:\PE\winpe_x86 or C:\PE\winpe_AMD64 to a CD using your favorite burning software.

[attachment deleted by admin]
Title: Re: How to create a Windows PE boot disc
Post by: killerb255 on December 09, 2009, 12:49:14 PM
Hmmm...I wonder why the attachment was deleted?  Oh well.

Follow the instructions below to recreate what was in the attachment...

---------------------------------------------------------------------------------------------------

1) Copy the contents of the following into notepad (replace any instances of x86 with AMD64 if you want to make a 64-bit PE disc).  Save the file as 1-MakePE Directory.bat

Code: [Select]
REM 1-MakePE Directory.bat
REM This will delete and re-create a directory called C:\PE\winpe_x86
REM You must have the Windows Automated Installation Kit installed for this to work.

rd /s/q %systemdrive%\PE

%systemdrive%
cd "%programfiles%\windows aik\tools\petools"
call copype.cmd x86 %systemdrive%\PE\winpe_x86
copy "%systemdrive%\PE\winpe_x86\winpe.wim" "%systemdrive%\PE\winpe_x86\ISO\sources\boot.wim"

pause

2) Copy the contents of the following into notepad  (replace any instances of x86 with AMD64 if you want to make a 64-bit PE disc).  Save the file as 2-Mount.bat

Code: [Select]
REM 2-Mount.bat
REM This mounts the boot.wim file which is the operating system itself and allows you to edit its settings.
Anything you put in this mounted directory will be in the X:\ drive when the pe is booted. There is also a
folder called ISO--this is where you want files just on the CD but not in the mounted image.

%systemdrive%
cd \
cd %programfiles%\Windows AIK\Tools\x86\Servicing"

DISM /Mount-wim /WimFile:%systemdrive%\PE\winpe_x86\ISO\sources\boot.wim /index:1 /MountDir:%systemdrive%\PE\winpe_x86\mount

pause

3) Copy the contents of the following into notepad (again, replace any instances of x86 with AMD64 if you want to make a 64-bit PE disc).  Save the file as 3-Packages.bat

Code: [Select]
REM 3-Packages.bat
REM This installs the packages into the image which include HTA, MDAC, Scripting, WDS and WMI.

%systemdrive%
cd \
cd "%programfiles%\Windows AIK\Tools\x86\Servicing"

dism /image:%systemdrive%\PE\winpe_x86\mount /Add-Package /PackagePath:"%systemdrive%\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-wmi.cab"
dism /image:%systemdrive%\PE\winpe_x86\mount /Add-Package /PackagePath:"%systemdrive%\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-hta.cab"
dism /image:%systemdrive%\PE\winpe_x86\mount /Add-Package /PackagePath:"%systemdrive%\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-mdac.cab"
dism /image:%systemdrive%\PE\winpe_x86\mount /Add-Package /PackagePath:"%systemdrive%\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-scripting.cab"
dism /image:%systemdrive%\PE\winpe_x86\mount /Add-Package /PackagePath:"%systemdrive%\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-wds-tools.cab"

echo The packages have now been installed and will now be prepared.

dism /image:%systemdrive%\PE\winpe_x86\mount\ /Get-Packages

pause
Title: Re: How to create a Windows PE boot disc
Post by: killerb255 on December 09, 2009, 12:59:03 PM
4)
a) Download any additional drivers that you want to add to your PE and save them in a folder.
b) Copy the contents of the following into Notepad (again, replace any instances of x86 with AMD64 if you want to make a 64-bit PE disc):

Code: [Select]
@echo off

echo 4-Drivers.bat
echo This installs various drivers to your PE Image. Edit this accordingly to include SCSI,
echo SATA, NIC, and other drivers.
echo Syntax is "Dism /image:DRIVE:\Temp\Mount /Add-Driver /driver:DRIVE:FOLDER\*.inf"

set SOURCE=(path to your drivers)
set MOUNTPATH="%systemdrive%\PE\winpe_x86\mount"

%systemdrive%
cd \
cd "%programfiles%\Windows AIK\Tools\Servicing\"

echo Examples:

echo 3Com 3C90X family NIC drivers

Dism /image:%mountpath% /Add-Driver /driver:%source%\3Com3C90X\W9X90XBC.INF
Dism /image:%mountpath% /Add-Driver /driver:%source%\3Com3C90X\W9XEL90X.INF

echo 3Com 3CCFE575CT family NIC drivers

Dism /image:%mountpath% /Add-Driver /driver:%source%\3Com3CCFE575CT\NET575N5.INF

echo Linksys EG1032v1

Dism /image:%mountpath% /Add-Driver /driver:%source%\LinksysEG1032\v1\EG103264.inf

echo Linksys EG1032v2

Dism /image:%mountpath% /Add-Driver /driver:%source%\LinksysEG1032\v2\EG1032v2.inf

echo Linksys EG1032v3

Dism /image:%mountpath% /Add-Driver /driver:%source%\LinksysEG1032\v3\EG1032v3.inf

echo Dell Optiplex 170L Intel NIC Drivers

Dism /image:%mountpath% /Add-Driver /driver:%source%\Optiplex170L\Intel\WinXP\E100B325.inf

echo Dell Optiplex 320 Broadcom NIC Drivers

Dism /image:%mountpath% /Add-Driver /driver:%source%\Optiplex320\Broadcom\WinXP\b44win.inf

echo Dell Optiplex 360 Broadcom NIC Drivers

Dism /image:%mountpath% /Add-Driver /driver:%source%\Optiplex360\k57nd60x.inf

echo Dell Optiplex 755 Broadcom NIC Drivers

Dism /image:%mountpath% /Add-Driver /driver:%source%\Optiplex755\Broadcom\WinVista\b57nd60x.inf

echo Dell Optiplex 755 Intel NIC Drivers

Dism /image:%mountpath% /Add-Driver /driver:%source%\Optiplex755\Intel\Vista32\E1E6032.inf
Dism /image:%mountpath% /Add-Driver /driver:%source%\Optiplex755\Intel\Vista32\E1G6032.inf

echo Dell Optiplex 760 Intel NIC Drivers

Dism /image:%mountpath% /Add-Driver /driver:%source%\Optiplex760\E1K6032.inf

echo The drivers have now been injected into your PE image.
pause

echo 3rd party driver list
Dism /image:%mountpath% /Get-Drivers
pause

echo All drivers
Dism /image:%mountpath% /Get-Drivers /all

pause

c) Edit set SOURCE=(path to your drivers) to include the path that your drivers are installed under. 
d) Edit the code below that for the drivers that you do want.  You probably don't need NIC drivers for that many Dell PCs, but my company deals with A LOT of Dells, so that's why my batch has all that!
e) Save the resulting file as 4-Drivers.bat.

NOTE: This batch file is optional.  If everything works without using this batch file, great!  If not, then you'll need to inject some drivers into your PE image, and this is the way to do it.
Title: Re: How to create a Windows PE boot disc
Post by: killerb255 on December 09, 2009, 01:11:11 PM
5) Similar to #4, this one is optional as well, but it helps to have.

Copy the contents of the following into Notepad (again, replace any instances of x86 with AMD64 if you're making a 64-bit PE disc).  Edit the appropriate items and save as 5-Additions.bat.

Code: [Select]
@echo off

echo 5-Additions.bat
echo This will copy various files and folders into your PE image.  They will be loaded to the X:\ drive
echo (the RAM drive) instead of the drive letter of the CD itself.
echo Don't try to load too much into the RAM drive--you'll end up needing a ton of RAM just to
echo use your PE disc, kinda defeating the purpose...

:STEP1
set source=(path to the additional files you want)
set pemount=%systemdrive%\PE\winpe_x86\Mount
goto STEP2

:STEP2
c:
cd \
cd c:\Program Files\Windows AIK\Tools\PETools\

echo Example of copying the contents of a "Tools" folder to the PE RAM drive
echo They will be accessible in the PE environment under X:\Tools.

md "%pemount%\Tools"
xcopy "%source%\Tools\*.*" "%pemount%\Tools\*.*" /e /y

echo
echo Example of copying items to the PE RAM disk's Windows\System32 folder.
echo These items will be accessible from X:\Windows\System32.

xcopy "%source%\Windows\System32\*.*" "%pemount%\Windows\System32\*.*" /e /y

echo The appropriate files have been copied.

pause
Title: Re: How to create a Windows PE boot disc
Post by: killerb255 on December 09, 2009, 01:29:06 PM
6) Copy the contents of the following into Notepad (replace x86 with AMD64 for x64 PE).  Save the file as 6-Unmount.bat

Code: [Select]
REM 6-Unmount.bat
REM Once you are done changing the boot.wim OS file this will unmount the image.

%systemdrive%
cd "%programfiles%\Windows AIK\Tools\x86\Servicing"

DISM.exe /unmount-Wim /MountDir:%systemdrive%\PE\winpe_x86\mount /Commit

pause

7) Copy the contents of the following into Notepad (replace x86 with AMD64 for x64 PE).  Save the file as 7-MakeISO.bat

Code: [Select]
REM 7-MakeISO.bat
REM This makes your .iso image.

cd \
%systemdrive%
cd %programfiles%\Windows AIK\Tools\x86"

oscdimg -n -b%systemdrive%\PE\winpe_x86\etfsboot.com %systemdrive%\PE\winpe_x86\ISO %systemdrive%\PE\winpe_x86\winpe_x86.iso

pause

There you have it: the last four posts are what was in the attachment...
Title: Re: How to create a Windows PE boot disc
Post by: bookie56 on January 04, 2010, 04:48:27 AM
Hi folks ;D
I am the new kid on the block but not new to Windows, Linux etc..

killerb255
I was wondering if you had done a set of bat files for 64 bit architecture? If not - could I copy your bat files...replacing them with the relevant 64 bit information?

I have recently bought Windows 7 Ultimate and would like to create an image of my C: partition. This worked well with Vista - but I only made 32 bit PE boot cd's

I would appreciate any help that you can give on this matter.

bookie56
Title: Re: How to create a Windows PE boot disc
Post by: killerb255 on January 06, 2010, 11:35:37 AM
I've done 64-bit batch files as well.  Just Edit -> Replace in Notepad anything referencing x86 with AMD64.

You'll also have to modify 4-Drivers.bat as well with the correct paths to the 64-bit drivers you want to inject.
Title: Re: How to create a Windows PE boot disc
Post by: bookie56 on January 09, 2010, 05:46:06 AM
Hi killerb255  ;D

Thanks so much for your reply.....sorry to ask a stupid question...here goes..

I have an Intel processor and installed windows 7 64bit ...I noticed that there was a folder for ia64 ...why do I use the amd one instead of this one?

Sorry, that has been bugging me and I thought it would be nice to get som clarification on that ....might help others as well.

Thanks a bunch!

bookie56
Title: Re: How to create a Windows PE boot disc
Post by: killerb255 on January 12, 2010, 12:37:28 PM
IA-64 = Itanium processor.  Those are used in super-high end servers.

AMD64/x86-64/EM64T/Intel64 = means the same thing for the most part: 64-bit instructions on an x86 processor.  Since AMD came up with it first, AMD64 is the common name used by Microsoft.
Title: Re: How to create a Windows PE boot disc
Post by: patio on January 12, 2010, 02:58:40 PM
You guys are aware the Posts in the FAQ section are for info only and not for responding to ? ?
Title: Re: How to create a Windows PE boot disc
Post by: killerb255 on January 13, 2010, 09:27:40 AM
Go ahead and delete any posts that aren't relevant to the FAQ, then.

I amended the relevant posts to accommodate 64-bit PE, so the extra discussion can be deleted...
Title: Re: How to create a Windows PE boot disc
Post by: pulkitgupta23 on May 05, 2010, 10:21:52 PM
i have done all the steps
but finally i got just an 135mb iso & when it boots it stucks at a dos mode where i can just type commands
GUI interface is not coming
what to do??
Title: Re: How to create a Windows PE boot disc
Post by: killerb255 on May 25, 2010, 12:25:24 PM
There is no GUI.  If you get a gray-ish wallpaper with a black command prompt, then you got what you're supposed to get.
Title: Re: How to create a Windows PE boot disc
Post by: Mikely on September 12, 2010, 11:27:31 AM
Hi, I'm new to this forum~
I am using a Windows 7. After a forced shutdown few days ago, I found that the computer won't boot. (before the selecting user page, it freezes at a black screen) (You can read Microsoft article kb974719 (http://support.microsoft.com/kb/974719) to find out more about my problem.)

The solution to my problem is starting the system using PE disk, and I found your post very helpful in creating a PE disk. (I used a XP computer to create the disk.)
After creating a PE disk following your steps, I tried to boot with the *censored*. However, it did not progress form the dos box, and the prompt said: "X:\windows\system32>wpe init"
After reading several posts from various forums, my theory is that my problem appeared b/c I created my PE disk on a XP. (also, my XP computer couldn't create a ISO image for 64 bit PE disk. My Windows 7 has 64bit system, so that may have been the problem)

Do you know why it does not progress at the dos box? Can you help me with this?
Thanks...

(I am a novice and I apologize if I have not been very clear with what I meant)
Title: Re: How to create a Windows PE boot disc
Post by: Salmon Trout on September 12, 2010, 12:32:08 PM
Mikely, do not hijack another thread. This is an FAQ. Did you see where it said "Do not post questions here"? Anyway, for 64 bit Windows you need 64 bit PE and if you have a valid license you can download a 64 bit Windows Repair CD image from Microsoft. If you wish to discuss this more, start a new thread in the Windows 7 section of the forum.


Title: Re: How to create a Windows PE boot disc
Post by: jmaur004 on December 20, 2010, 09:00:35 AM
As the man said earlier, just replace "x86" with amd64  and voila!
Title: Re: How to create a Windows PE boot disc
Post by: patio on December 20, 2010, 04:26:28 PM
As the man said earlier, just replace "x86" with amd64  and voila!

Just a quick heads up....the FAQ section is not for general posting....