次の方法で共有


Walkthrough: Boot Windows PE from CD-ROM

This walkthrough describes how to boot Windows PE directly from CD-ROM/DVD-ROM media but not into a RAM disk. This method enables you to start a computer that has fewer than 512 megabytes (MB) of memory for the purpose of deployment or recovery.

Prerequisites

To complete this walkthrough, you need the following:

  • A technician computer, which provides all the tools and the source files. For more information, see Building a Technician Computer.
  • CD-ROM burning software. Microsoft Windows OPK, Windows AIK, and Windows PE Kit do not include CD-ROM- or DVD-ROM-burning software. However, you can obtain burning software from the Windows 2003 Resource Kit (cdburn and dvdburn) or use any third-party software.
  • A blank CD-ROM or DVD-ROM.

Step 1: Set up a Windows PE build environment

In this step, you will create a directory structure that supports building a Windows PE image.

  1. On your technician computer, click Start, point to All Programs, point to Windows OPK or Windows AIK, and click Windows PE Tools Command Prompt.

Important

If you are running Windows Vista, you must select run as Administrator.

The menu shortcut opens a command prompt window and automatically sets environment variables to point to all the necessary tools. By default, all tools are installed at C:\\Program Files\\`<version>`\\Tools, where `<version>` can be **Windows OPK** or **Windows AIK**.  
  1. At the command prompt, run the Copype.cmd script. The script requires two arguments: hardware architecture and destination location. For example,
    copype.cmd <arch> <destination>
    where <arch> can be x86, amd64, or ia64 and <destination> is a path to a local directory. For example,
    copype.cmd x86 c:\winpe_x86
    The script creates the following directory structure and copies all the necessary files for that architecture. For example,
    \winpe_x86
    \winpe_x86\ISO
    \winpe_x86\mount

Step 2: Add boot support

In this step, you will add boot files to your Windows PE image. Before you can add files to the image, you must expand the image by using the imagex /apply command.

  1. At the command prompt, apply the image to the \mount directory by using the ImageX tool. For example,
    imagex /apply c:\winpe_x86\winpe.wim 1 C:\winpe_x86\mount
  2. Add the appropriate boot support files and directory. For example,
    copy c:\winpe_x86\ISO\bootmgr c:\winpe_x86\mount
    mkdir c:\winpe_x86\mount\boot

Step 3: (Optional) Add additional customizations

This step is optional but recommended. You can add applications and scripts to your Windows PE image that you might need while working in Windows PE. The following is a list of common tools to include in your Windows PE image.

  • ImageX - A tool for capturing and applying images during deployment scenarios. For example, at a command prompt, type:
    copy “c:\program files\<version>\Tools\x86\imagex.exe” c:\winpe_x86\mount
  • Package Manager (Pkgmgr.exe) - A tool for servicing Windows images (.wim files) offline. You must copy the entire \Servicing folder. Offline servicing requires ImageX. For example,
    xcopy “c:\program files\<version>\Tools\<architecture>\Servicing” c:\winpe_x86\mount\Servicing /s
    copy %WINDIR%\system32\msxml6*.dll c:\winpe_x86\mount\Servicing

where <version> can be Windows OPK or Windows AIK and <architecture> can be x86, amd64, or ia64. In both previous examples, the tools are not loaded into memory during a Windows PE RAM boot. The media must be available to access the tools.

Step 4: (Optional) Create an exclusion list

This step is optional, but recommended if you include ImageX as part of your Windows PE image. During an ImageX capture operation, some files might be locked, which will cause ImageX to fail. You can exclude specific files from being captured by creating a configuration file called Wimscript.ini. A configuration file is a text file; the following is a sample configuration file that includes common files that you must exclude during a capture operation.

  1. Create a configuration file called Wimscript.ini by using any text editor, such as Notepad.

    [ExclusionList]
    ntfs.log
    hiberfil.sys
    pagefile.sys
    "System Volume Information"
    RECYCLER
    Windows\CSC
    
    [CompressionExclusionList]
    *.mp3
    *.zip
    *.cab
    \WINDOWS\inf\*.pnf
    

    You can add additional files or directories that you intend to exclude during a capture operation. For more information about configuration files, see Create an ImageX Configuration File.

  2. Save the configuration file to the same location of ImageX as specified in step 3. For example,

    c:\winpe_x86\mount\
    

    ImageX will automatically detect Wimscript.ini only if it is saved to the same location.

Step 5: Configure BCD Store

In this step, you create a new boot configuration file called BCD by using BCDEdit. BCD replaces Boot.ini. BCDEdit is a command-line tool designed to manage BCD stores. BCDEdit is available in Windows PE and in Windows Vista. For example,

Bcdedit /createstore c:\winpe_x86\mount\boot\BCD

Bcdedit /store c:\winpe_x86\mount\boot\BCD –create {bootmgr} /d “Boot Manager”

Bcdedit /store c:\winpe_x86\mount\boot\BCD –set {bootmgr} device boot

Bcdedit /store c:\winpe_x86\mount\boot\BCD –create /d “WINPE” –application osloader

The last command returns a GUID value. Substitute <GUID> with this value in the following examples.

Bcdedit /store c:\winpe_x86\mount\boot\BCD –set <GUID> osdevice boot

Bcdedit /store c:\winpe_x86\mount\boot\BCD –set <GUID> device boot

Bcdedit /store c:\winpe_x86\mount\boot\BCD –set <GUID> path \windows\system32\winload.exe

Bcdedit /store c:\winpe_x86\mount\boot\BCD –set <GUID> systemroot \windows

Bcdedit /store c:\winpe_x86\mount\boot\BCD –set <GUID> winpe yes

Bcdedit /store c:\winpe_x86\mount\boot\BCD –set <GUID> detecthal yes

Bcdedit /store c:\winpe_x86\mount\boot\BCD –displayorder <GUID> -addlast

Step 6: Create a bootable CD-ROM

In this step, you put a Windows PE RAM disk onto a CD-ROM. This option requires that you create an .iso file by using the Oscdimg tool.

  1. On your technician computer, create an .iso file with Oscdimg. At a command prompt, type:

    oscdimg -n -m -o -bc:\winpe_x86\etfsboot.com c:\winpe_x86\mount c:\winpe_x86\winpe_x86.iso
    

    For IA-64 architecture, replace Etfsboot.com with Efisys.bin.

  2. Burn the image (Winpe_x86.iso) onto a CD-ROM.

See Also

Concepts

Walkthrough: Boot Windows PE from Hard Disk
Oscdimg Command-Line Options