今日のチャレンジ

ThanksgivingSoftの日記(2007-03-05)を参考にする。

前書き

Windows AIKをインストールした
Windows PE2.0を作成したので、いろいろ残っている。「c:\winpe_x86」を削除する

1:[Windows PE Tools コマンド プロンプト]の実行

[スタート]→[すべてのプログラム]→[Microsoft Windows AIK]→[Windows PE Tools コマンド プロンプト]

管理者として実行してみる

2:アーキテクチャの指定

C:\>copype.cmd x86 c:\winpe_x86

===================================================
Creating Windows PE customization working directory

    c:\winpe_x86
===================================================

        1 個のファイルをコピーしました。
        1 個のファイルをコピーしました。
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\bcd
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\boot.sdi
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\bootfix.bin
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\etfsboot.com
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\fonts\chs_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\fonts\cht_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\fonts\jpn_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\fonts\kor_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\fonts\wgl4_boot.ttf
9 個のファイルをコピーしました
C:\Program Files\Windows AIK\Tools\PETools\x86\EFI\microsoft\boot\bcd
C:\Program Files\Windows AIK\Tools\PETools\x86\EFI\microsoft\boot\fonts\chs_boot
.ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\EFI\microsoft\boot\fonts\cht_boot
.ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\EFI\microsoft\boot\fonts\jpn_boot
.ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\EFI\microsoft\boot\fonts\kor_boot
.ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\EFI\microsoft\boot\fonts\wgl4_boo
t.ttf
6 個のファイルをコピーしました
        1 個のファイルをコピーしました。
        1 個のファイルをコピーしました。

Success

Updating path to include peimg, oscdimg, imagex

   C:\Program Files\Windows AIK\Tools\PETools\
   C:\Program Files\Windows AIK\Tools\PETools\..\x86


c:\winpe_x86>

無事に終わったらしい

3:イメージの展開

c:\winpe_x86>imagex /apply c:\winpe_x86\winpe.wim 1 c:\winpe_x86\mount

ImageX Tool for Windows
Copyright (C) Microsoft Corp. 1981-2005. All rights reserved.



Progress: 100%

Successfully applied image.



c:\winpe_x86>

2−3分ぐらいかな?

4−1:必要なツールなどのコピー

Imagexのコピー
c:\winpe_x86>copy "c:\Program Files\Windows AIK\Tools\x86\imagex.exe" "c:\winpe_
x86\mount\Windows\System32"
        1 個のファイルをコピーしました。

c:\winpe_x86>

すぐに終わった。

winscript.iniの編集

※Imagexでの例外設定
メモ帳などを開き、以下を貼り付ける。

[ExclusionList]
ntfs.log
hiberfil.sys
pagefile.sys
"System Volume Information"
RECYCLER
Windows\CSC

[CompressionExclusionList]
 *.mp3
 *.zip
 *.cab
 *.lzh
\WINDOWS\inf\*.pnf

ファイル名winscript.iniでパスC:\winpe_x86\mount\Windows\System32に保存する。
※imagex.exeと同一フォルダ内に保存する。

メモ帳では直接保存できなくて、ドキュメントを推奨されてしまった。ドキュメントに保存してからコピペする。

4−2:ネットワークドライブの割り当て

特定のサーバでイメージの保存、展開をするならば、毎回コマンドを打たなくてもすむようにする。

サーバを使ったイメージ展開は考えていないのでパスする。

4−3:ディスクパーティション

ディスクパーティションを作成する予定がある場合は
ディスクパーティションの作成(Windows PE用)を参照してバッチファイルを作成する。

いじると何か怖いので止めておく。

5:イメージの作成準備

[続行しますか?]と表示されるので[ yes ]を入力する。

c:\winpe_x86>peimg /prep c:\winpe_x86\mount\windows
Windows 用プレインストール環境イメージ セットアップ ツール
Copyright (C) Microsoft Corporation. All rights reserved.

/prep コマンドを使用すると、Windows PE イメージが完全に変更されるため、サービス
を提供できなくなります。つまり次のような操作は、用意されたイメージ上で実行できな

くなります。

   - オプション機能のインストールまたはアンインストール
   - 修正プログラムまたは他のサービス パッケージの適用
   - 言語パックのインストール



続行するには、「yes」を入力します。その他の入力を行うと、プログラムが終了します
。

続行しますか? yes
[==========================100.0%==========================]
PEIMG は、操作を正常に完了しました。

c:\winpe_x86>

パーセントの部分が変化していくのが楽しい。

6:ブータブルCD用のboot.wimの作成

c:\winpe_x86>imagex /capture c:\winpe_x86\mount c:\winpe_x86\ISO\sources\boot.wi
m "ImageFile" /boot /compress max

ImageX Tool for Windows
Copyright (C) Microsoft Corp. 1981-2005. All rights reserved.


Files/folders excluded from image capture by default:

 \WINDOWS\CSC
 \RECYCLER
 \System Volume Information
 \pagefile.sys
 \hiberfil.sys
 \$ntfs.log


Progress: 100%

Successfully imaged c:\winpe_x86\mount



c:\winpe_x86>

2分ぐらいで終わった。

7:ISOイメージの作成

c:\winpe_x86>oscdimg -n -bc:\winpe_x86\etfsboot.com c:\winpe_x86\iso c:\winpe_x8
6\ImageFile.iso

OSCDIMG 2.45 CD-ROM and DVD-ROM Premastering Utility
Copyright (C) Microsoft, 1993-2000.  All rights reserved.
For Microsoft internal use only.


Scanning source tree complete (17 files in 8 directories)

Computing directory information complete

Image file is 131188736 bytes

Writing 17 files in 8 directories to c:\winpe_x86\ImageFile.iso

100% complete

Final image file is 131188736 bytes

Done.

c:\winpe_x86>

早かった。
でも、出来上がったISOイメージは135MBとなっている。ちっちゃくないかい?

早合点していた。CDブートするためのディスクを作成していただけだったんだ。

8:ブータブルCDの作成[WinPE CD]

CDのライティングソフトを使用してISOイメージ(ImageFile.iso)を焼く。

一連の作業を行なっているPCにはISOを焼けるソフトを入れていないので、外付けHDDにISOイメージをコピーして、別のPCでCD-RWに焼くことにする。

9:ディスクイメージの作成

ここからはRDTでの作業は無理になる・・・

9−1:CDブート

イメージを取得する対象のPC(sysprep済み)に[WinPE CD]を入れてCDブートさせる。

DELL君は[F12]でBoot Menuになった。

※Press any key・・・を見過ごした

9−2:ネットワークドライブの割り当て

X:\>mount.bat
※mount.batを使用して共有フォルダに接続する。ここではI:\imageとする。

ネットワークドライブを使わないのでパスする。代わりに外付けHDDを利用する。

※あらかじめ接続しておいて、ドライブレターを確認しておく。

9−3:イメージの取得

X:\>imagex /capture C:\ I:\image\image.wim "Win" /check /verify

ネットワークドライブを使わないのでちょっと異なる。