EWF on WinPE

Joined
Sep 9, 2008
Messages
1
Reaction score
0
Dietmar said:
Hi Konstantin,
it is on the first CD of Windows Embedded.
I use an OPK version, XPProSP1. There is a newer Version of
WindowsServer2003SP1RC with WINPE 2005 OPK. Which with you can do ramboot
and boot Winpe from USBstick.

I am interested, whether there is a LIMIT to that ramdisk.sys from there.

Here is the tutorial, how to install WinPE on harddiskpartition. My
problem is, to do vice versa after enabling EWF there.

Placing Bootable Windows PE on Hard DisksYou can place a customized
version (see the text at the end of this) of the Windows Preinstallation
Environment (Windows PE) on a hard disk, which can be useful for either
preinstalling Windows or creating a hard disk-based recovery solution.

This procedure assumes that you have created a custom version of Windows
PE, as detailed in Creating a Customized Version of Windows PE. After you
complete this procedure, the customized Windows PE files will be in
build_location on your technician computer or other network share.

Note

If you create a bootable Windows PE hard disk from an East Asian language
version of Windows, copy Bootfont.bin from the build_location\i386 folder
(for 32-bit versions of Windows PE) or the build_location\ia64 folder (for
64-bit versions of Windows PE) to the root of the destination hard disk.
Without Bootfont.bin, the loader prompt displays invalid characters
instead of double-byte characters.
To create a bootable Windows PE disk (32-bit versions of Windows PE)
Boot the destination computer into Windows PE by using a Windows PE CD.
Create a formatted and active partition labeled C.
On the active partition, create a directory called C:\Minint. You must
name the directory "Minint".
Copy the contents of build_location\i386 to C:\Minint.
xcopy "C:\Build.x86\i386\*.*" C:\Minint /S
Copy Ntdetect.com from build_location\I386 to drive C.
xcopy "C:\Build.x86\I386\ntdetect.com" C:\
On the destination hard disk, copy C:\Minint\setupldr.bin to C:\ntldr.
xcopy "C:\Minint\setupldr.bin" C:\ntldr
Restart the destination computer.
The computer starts using Windows PE.

To create a bootable Windows PE disk (64-bit versions of Windows PE)
This procedure assumes that the destination computer has a clean hard disk
and that you have created a custom version of Windows PE stored in
build_location on your technician computer or other network share, as
detailed in Creating a Customized Version of Windows PE.

Boot the destination computer into Windows PE by using a Windows PE CD.
Create EFI and primary data partitions by running Diskpart.exe with the
following commands:
select disk 0
clean
convert gpt
create partition efi size=100
assign letter=g
create partition msr size=32
create partition pri
assign letter=c
exit
The EFI partition is assigned the letter G and the data partition is
letter C.

Format the new partitions by running Format.exe with the following
commands:
format G: /fs:fat32 /q /y
format C: /fs:ntfs /q /y
On drive C, create a directory called \Winpe.
mkdir C:\Winpe
Copy the contents of build_location\ia64 to C:\Winpe.
xcopy "C:\Build.ia64\ia64\*.*" C:\Winpe /hide
Copy build_location\ia64\Setupldr.efi to drive G.
xcopy \\server\share\ia64\Setupldr.efi G:\
Create an empty file named $WinPE$.$$$ on drive G.
echo empty file > G:\$Winpe$.$$$
Add a boot entry for this version of Windows PE that you have placed on
drive C by running the Efinvr command.
efinvr /add G:\Setupldr.efi C:\Winpe\ia64 /setactive
Restart the destination computer.
There is now a new option in NVRAM to boot Windows PE.

Note

You can follow a similar procedure if you start the computer from an
operating system located on the hard disk, instead of initially starting
the computer with a Windows PE CD. When you run Diskpart from a full
Windows operating system, Diskpart cannot assign a drive letter to an EFI
partition. Instead, in step 2 of this procedure, use the Mountvol command.

mountvol /s g:
For more information on using Diskpart to format and partition the hard
disk, see DiskPart Commands.


Creating a Customized Version of Windows PEThe Windows OPK CD is a
bootable copy of the basic 32-bit version of Windows Preinstallation
Environment (Windows PE). However, you may want to create a version of
Windows PE for 64-bit computers, or configure Windows PE to use a
different set of drivers. To support these needs, the OPK includes a
collection of scripts and utilities that enable you to build a version of
Windows PE customized for your factory environment.

Important

The Windows OPK CD is only available to OEMs. Corporate users must build a
custom Windows PE CD.
You can build a custom version of Windows PE from any version of Windows
XP except Windows XP Home Edition, Windows Server 2003, Datacenter
Edition, and Windows Server 2003, Web Edition.
A custom version of Windows PE is still subject to the conditions listed
on Limitations of Windows PE.
Windows XP 64-Bit Edition and the 64-bit versions of the Windows Server
2003 family are available only in English, French, German, and Japanese.
Basic Process: Building a Custom Version of Windows PE
Building a custom version of Windows PE requires several minutes. This
process creates a directory structure of the Windows PE files and
optionally creates an image file that you can burn to a CD-ROM.

Note

You must have backup and restore privileges to use the Windows PE build
tools.
To create a custom version of Windows PE
Create and name a directory on your hard disk, specified by
build_location.
Place the Windows OPK CD into the CD-ROM drive, denoted as cd_drive.
Copy cd_drive\Winpe\*.* to build_location.
Copy Factory.exe and Netcfg.exe from the cd_drive\Tools\platform directory
into the build_location directory.
To build a 32-bit version of Windows PE, the value of platform is x86.

To build a 64-bit version of Windows PE, the value of platform is ia64,
and you also must copy Efinvr.exe into the build_location directory.

Remove the Windows OPK CD from the CD-ROM drive.
To build a 32-bit version of Windows PE:
Place the 32-bit Windows product CD in the CD-ROM drive.

–OR–

To build a 64-bit version of Windows PE:

Place the 64-bit Windows product CD in the CD-ROM drive.

To build a 64-bit version of Windows PE, place a floppy disk in the A:\
drive of the computer. This disk is used for temporary storage during the
build process of the 64-bit Windows PE.
Navigate to build_location.
Run this command:
Mkimg.cmd source_directory destination_directory [image_name]

source_directory
Specifies the location of the Windows product CD. If source_directory is a
CD-ROM drive, you need only to specify the drive letter. If
source_directory is a network path, the path must be to the parent
directory of the \i386 directory.
Note

Do not include a trailing slash in source_directory.
destination_directory
Specifies the path where the files necessary to create the image are
temporarily stored. If this directory does not already exist, Mkimg.cmd
creates it.
image_name
Optional. Specifies the path and file name of the ISO image file that
contains this customized version of Windows PE, if you place this version
of Windows PE onto a CD-ROM.
If you are creating a CD-ROM, use CD creation software to burn the ISO
image file directly to the CD media.
Important

You must have read/write permissions for build_location. You cannot run
the mkimg command from a read-only device such as a CD-ROM drive.
For more information, see Mkimg Command.

Example
For example, if build_location is C:\Build.x86, this command-line creates
an ISO image called x86winpe.iso by using C:\Winpe.tmp as a temporary
storage area.

C:\Build.x86\Mkimg.cmd E: C:\Winpe.tmp C:\x86winpe.iso
Note

Instead of using the Mkimg tool, you can also use Oscdimg to create an
iso file. Oscdimg requires an existing Windows PE fileset to build the
iso from.
If you create an .iso image file, you can burn this version of Windows PE
to a CD. You can also place the customized version of Windows PE on a hard
disk, as described in Placing a Bootable Version of Windows PE on a Hard
Disk, or on a Remote Installation Server (RIS). Although not explicitly
discussed in this guide, you can also place Windows PE on bootable media
other than a CD or a hard disk.

Important

To configure the Windows PE CD so that it starts from the CD every time,
if the Windows PE CD is present in the CD-ROM drive, remove the
\i386\Bootfix.bin file from the Windows PE directory structure before you
create an .iso file. Bootfix.bin is the file that provides the "Press any
key to boot from CD-ROM" message.
Building a Bootable 64-Bit Windows PE CD
You can create a bootable 64-bit Windows PE CD that starts automatically
without user interaction. This method assumes that the computer you are
booting has been configured to boot from CD-ROM.

This process creates a directory structure of the Windows PE files which
is used to create an ISO file that can be burned to CD-ROM.

To create a custom 64-bit version of Windows PE
On an x86 machine running a 32-bit version of Windows 2000 or Windows XP,
open a command prompt. This can be done by clicking the Start menu,
selecting Run, and typing CMD.EXE.
Create a directory on your hard disk to hold the tools required to create
a Windows PE CD. For example: MD C:\WINPE.
Place the Windows OPK CD into the CD-ROM drive, denoted as cd_drive.
Type Copy cd_drive\Winpe\*.* C:\WinPE.
Type Copy cd_drive\Tools\IA64\FACTORY.EXE C:\WINPE.
Type Copy cd_drive\Tools\IA64\NETCFG.EXE C:\WINPE.
Type Copy cd_drive\Tools\IA64\EFINVR.EXE C:\WINPE.
Remove the Windows OPK CD from the CD-ROM drive.
Place the Windows XP 64-Bit Edition CD in the CD-ROM drive.
Navigate to the Windows PE directory by typing CD \WINPE.
Run this command:
Mkimg.cmd source_directory destination_directory

source_directory specifies the location of the CD for the 64-bit Edition
of Windows XP and destination_directory specifies the path where the files
necessary to create the image are temporarily stored. If this directory
does not already exist, Mkimg.cmd creates it.

If source_directory is a CD-ROM drive, you need to specify only the drive
letter. If source_directory is a network path, the path must be to the
parent directory of the \i386 directory. Do not include a trailing slash
in source_directory.

To build the bootable 64-bit Windows PE CD ISO file
Create this directory structure on a blank formatted floppy diskette:
A:\
|_EFI
|_BOOT
Type:

MD A:\EFI
MD A:\EFI\BOOT

Copy SETUPLDR.EFI to the A:\EFI\BOOT directory and rename it as
BOOTIA64.EFI. For example:
COPY C:\IA64PE\IA64\SETUPLDR.EFI A:\EFI\BOOT\BOOTIA64.EFI.

Type CD \WINPE.
Type DSKIMAGE A: .\EFISYS.BIN.
To create the bootable ISO image file that can be burned to CD, use this
syntax:

OSCDIMG -b.\efisys.bin -n -h destination_directory iso_filename

For example:

OSCDIMG -b.\efisys.bin -n -h C:\IA64PE C:\IA64PE.ISO
The ISO file that is generated can be burned to CD using the CD-burning
software of your choice. After burning the ISO file to CD, ensure that the
target IA64 computer has been configured so that the CD-ROM drive is the
primary boot device. This can be done by using the EFI Shell Boot Menu
Editor.

See the documentation that came with your computer for specific details on
modifying the EFI Shell Boot Menu.

Extensions of the Basic Process: More Customizations of Windows PE
You can make additional customizations of this version of Windows PE
before burning it to a CD or copying it to a hard disk.

Adding Support for Other Languages
By default, multi-language Windows PE builds are not supported. Use the
[RegionalSettings] section to add support for multiple languages.

There are two reasons for using multi-language support in Windows PE:

To use one set of preinstallation tools to build multiple localized
Windows PE images.
To use preinstallation tools in multiple languages to build Windows PE in
one language.
To use one set of tools, the key is to use [RegionalSettings] to always
match the Language value to the language of the source Windows product CD.
You then use LanguageGroup to specify the languages of both the Windows PE
tools and the source CD.

In this example, the goal is to create a Japanese Windows PE image from a
Japanese Windows product CD that will support using English
preinstallation tools:

[RegionalSettings]
LanguageGroup = 1, 7
Language = 0x0411
1 is the LanguageGroup ID for Western Europe and United States, and 7 is
the Japanese LanguageGroup ID. 0x0411 is the locale ID (LCID) for
Japanese, which matches the locale of the source CD. By adding 1 to the
LanguageGroup entry, you add English support so that you can use the
English preinstallation tools.

To use the preinstallation tools in multiple languages, match the Language
value to the source CD, and specify the additional languages in
LanguageGroup. In this example, Japanese language support is added to an
English Windows PE image.

[RegionalSettings]
LanguageGroup = 1, 7
Language = 0x0409
0x0409 is the LCID for English, which matches the locale of the source CD.
By including 7 in the LanguageGroup entry, you add Japanese support so that
you can use both the English and Japanese preinstallation tools.

If you create a custom version of Windows PE from an East Asian language
version of Windows, you must ensure that the file Bootfont.bin is located
in the \i386 folder (for 32-bit versions of Windows PE) or
in the \ia64 folder (for 64-bit versions of Windows PE).
Without Bootfont.bin, the loader prompt displays invalid characters
instead of double-byte character sets.

Including a specific Winbom.ini file or Startnet.cmd file
You can include a generic Winbom.ini file in a custom Windows PE
installation that specifies basic information about connecting to your
network, formatting the hard disk, and running basic hardware
diagnostics.

You can include a generic Winbom.ini file in a custom Windows PE
installation. Factory uses this file if another Winbom.ini is not located
in the floppy drive. After using the settings in [WinPE.Net] to establish
network connectivity, the Factory tool can use the NewWinbom entry to
point to another Winbom.ini file located on the network.

You can also create your own version of Startnet.cmd to run a specific set
of commands, batch files, or scripts.

To gain access to Windows Networking APIs, run the command netcfg -winpe
from the Windows PE command line, if this command is not already part of
your Startnet.cmd. For more information, see Netcfg Command-Line Options.

Including Hardware Diagnostics or Other Basic Tools
If you have created any custom tools that are a core part of your
validation process, you may want to include these tools in your custom
Windows PE installation before preinstalling the operating system.

Adding or Removing Network Drivers
By default, all network drivers on the Windows XP Professional CD or
Windows XP 64-Bit Edition are supported. When you create your own Windows
PE image, you can add or remove the network drivers or replace the network
driver list. By keeping the set of drivers to a minimum, you reduce the
time required for Plug and Play detection.

To add network drivers to a custom Windows PE CD, copy these files as
specified:

All network driver *.inf files to the \%WINDIR%\inf directory.
All *.sys files to the \%WINDIR%\system32\drivers directory.
Any related *.dll, .exe, or other files to the \%WINDIR%\system32
directory.
Catalog files are unnecessary, as they are not processed by the Windows PE
environment.

Adding or Removing Mass-Storage Drivers
To reduce boot time, you may configure a custom version of Windows PE to
load a limited set of mass-storage drivers, instead of loading the entire
set of mass-storage drivers that are natively supported in Windows XP. You
may also configure Windows PE to load additional third-party drivers.

To control which mass-storage drivers are loaded in Windows PE, customize
the Winpeoem.sif file. Modifying this file changes the list of drivers
that Windows PE loads when it boots, which affects the boot time of
Windows PE.

Changing the Winpeoem.sif file does not remove or add any files into the
customized version of Windows PE. If, in addition to reducing the boot
time, you also want to reduce the size of your Windows PE image, you must
separately remove the unnecessary driver files from your custom version of
Windows PE. If you include any third-party drivers in the Winpeoem.sif
file, you must manually add any required driver files to your custom
version of Windows PE.

For more information, see Winpeoem.sif.

In most cases you will add mass storage drivers to the Windows PE image
rather than replace them. If you want to reduce the size or boot time of
the Windows PE image, you can use the [MassStorageDrivers.Replace] section
to remove the drivers from the \system32 directory.

Notes

When files are added or removed from Windows PE, the image will have to be
recreated using Oscdimg.exe unless your are booting Windows PE from a RIS
server. You can use the F6 option to add mass storage devices when booting
Windows PE.
To add support for mass storage controllers using Windows PE
Copy your driver package to a directory under %WINPEROOT%\system32. For
example:
%WINPEROOT%\system32\Driver1
Edit the %WINPEROOT%\system32\Winpeoem.sif to remove the semicolons from
the [OemDriverParams] section and add the name of the directory into which
you copied your driver package to the OemDriverDirs line. For example:
[OemDriverParams]
OemDriverRoot=""
OemDriverDirs=Driver1

Optional: If you are using the [MassStorageDrivers.Append] or
[MassStorageDrivers.Replace] sections of Winpeoem.sif, copy the mass
storage driver *.sys file to the \system32\drivers subdirectory.
Optional: If the mass storage device requires any supporting *.dll files,
copy those to the appropriate directory. You can determine if these files
are required by examining the Txtsetup.oem file.
With these changes made, your Windows PE image will now attempt to start
the driver specified in the [Defaults] section of the Txtsetup.oem in the
driver package in the \Driver1 subdirectory. When the system is loaded,
the Winpeoem.sif file will be opened and any mass storage drivers listed
will be loaded before any of the inbox-provided drivers.

However, in some cases the Txtsetup.oem file provided by the manufacturer
may have to be edited. Many driver packages today support a variety of
mass storage devices, and only those listed in the [Defaults] section will
be loaded. Read the [SCSI] section in the Txtsetup.oem file to determine
which driver entry corresponds to the one you wish to load. In the
following example, only Driver1 will be loaded. To load Driver2, change
the "scsi=" line under the [Defaults] section to "scsi = driver2".

[Disks]
driver1 = "generic driver for device 1", \generic.sys, \
driver2 = "generic driver for device 2", \generic2.sys, \

[Defaults]
scsi = driver1

[scsi]
driver1 = "generic driver for device 1", generic.sys
driver2 = "generic driver for device 2", generic2.sys
Notes

If loading more than one mass storage driver, this must be done for each
txtsetup.oem file if the Winpeoem.sif supports multiple adapters. If
multiple mass storage drivers are required, you can do so by appending
additional directory names to the OemDriverDirs entry in Winpeoem.sif. For
example:
[OemDriverParams]
OemDriverRoot=""
OemDriverDirs=Driver1, Driver2, Driver3
Adding Optional Component Packages to Windows PE
BuildOptionalComponents.vbs is a script for adding support for optional
component packages to Windows PE. The packages include Windows Script Host
(WSH), HTML Applications (HTA), and ActiveX Data Objects (ADO) to allow
database connectivity from Windows PE to a Microsoft SQL Server.

The script uses these command-line options:

Option Function
/S:location Alternate source location other than the Windows product CD
/D:location Alternate destination for the WinPE Optional Component Files
(I386). If not specified, the files are saved to the desktop
/ADO Builds ADO (ActiveX Database Objects) for Microsoft SQL Server
connectivity
/HTA Builds HTA (HTML applications)
/WSH Builds WSH (Windows Script Host)
/64 Builds and checks 64-bit version of Windows PE; requires Windows XP
64-Bit Edition
/Q Runs the script with prompts suppressed. Notifies only on failure.
/E Explores the resulting folder automatically when complete
To add optional components to Windows PE
If you are building Windows PE 1.0, then set /S to the path of the Windows
XP Professional CD-ROM. If you are building Windows PE 1.1, then set /S to
the path of a directory that has Windows XP SP1 integrated into a I386
directory.
In your \WinPE directory, run this command:
buildoptionalcomponents.vbs /S:d:\sourcefiles
You should have the following directory on your desktop:

WinPE Optional Component Files (I386)
+---I386
| +---Registration
| \---System32
+---Program Files
| \---Common Files
| \---System
| +---ado
| +---msadc
| \---Ole db
\---Samples
The \Registration directory is created onlf if you add support for ADO,
and it must be there for ADO to function.

If you built Windows PE to C:\bin, then copy the \Program Files directory
to C:\bin\i386
Copy the \Samples directory to C:\bin\i386
Copy the \i386\system32\*.* to C:\bin\i386\system32
Make sure that your Startnet.cmd file has the following line:
oc.bat
If you do not specify components, or you do not run this script from the
command prompt, all optional components are installed. If you include HTA,
WSH is included automatically, and cannot be removed.

Notes

ADO access to Active Directory and Active Directory Service Interface are
not supported in Windows PE.
BuildOptionalComponents.vbs is not supported in the following language
versions of Windows PE:
Brazilian
Danish
German
Italian
Norwegian
Portuguese
Spanish
Swedish

It works,
Dietmar

Dear Dietmar,
your information is more helpfull to one and all.
i need one more information that,
what other platforms (beside VB 6.0) can be used to devolop applications for WinPE.

Thanks in Advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top