Загрузка WinPE 2.0 с удаленного PXE-сервера

Добро пожаловать!

В этой статье описывается настройка стороннего PXE-сервера (Jounin Tftpd32) для загрузки Windows PE 2.0

Выполните все шаги на компьютере Vista (файлы / папки могут быть впоследствии перенесены на сервер Windows 2003 SP1)

Руководство охватывает следующие этапы

  • Настроить и установить WAIK
  • Создание образа x86 Windows PE 2.0
  • Подготовка структуры папок PXE Server
  • Создание нового хранилища BCD
  • Установка и настройка PXE-сервера (Tftpd)
  • Создание образа Windows PE 2.0 x64
  • Создание хранилища BCD с несколькими вариантами выбора

Шаг 1. Создание структуры сервера.

Загрузите и установите WAIK в папку по умолчанию
Запустите командную строку с повышенными правами (Запуск от имени администратора) и введите следующие команды

 

cd /d “C:\Program Files\Windows AIK\Tools\PETools”
copype x86 c:\winpe_x86
ren winpe.wim winpe_x86.wim
imagex /mount c:\winpe_x86\winpe_x86.wim 1 c:\winpe_x86\mount
md C:\PXEServer\TFTPRoot\Boot\Fonts
copy c:\winpe_x86\mount\Windows\Boot\PXE\pxeboot.n12  C:\PXEServer\TFTPRoot\boot /y
copy c:\winpe_x86\ISO\boot\fonts\*.* c:\PXEServer\TFTPRoot\Boot\Fonts /y
copy c:\winpe_x86\mount\Windows\Boot\PXE\bootmgr.exe C:\PXEServer\TFTPRoot /y
imagex /unmount c:\winpe_x86\mount
copy C:\winpe_x86\ISO\boot\boot.sdi C:\PXEServer\TFTPRoot\boot /y
copy c:\winpe_x86\winpe_x86.wim C:\PXEServer\TFTPRoot\boot /y

Примечание . Каждая строка, начинающаяся с imagex или copy, представляет собой отдельную строку

Шаг 2. Создайте новый BCD.

В папке C: \ PXEServer создайте пакетный файл с именем CreateBCD.cmd со следующим содержимым:

 

Rem Creates BCD (boot configuration data) for Windows PE 2.0
set BCD-File=c:\PXEServer\Tftproot\Boot\BCD
del %BCD-File%
Bcdedit /createstore %BCD-File%
Bcdedit /store %BCD-File% /create {ramdiskoptions}
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdidevice  boot
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdipath  \boot\boot.sdi
for /f “tokens=1-3” %%a in (‘Bcdedit /store %BCD-File% /create /d “WinPE x86” /application osloader’) do set guid1=%%c
Bcdedit /store %BCD-File% /set %guid1% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid1% detecthal Yes
Bcdedit /store %BCD-File% /set %guid1% winpe Yes
Bcdedit /store %BCD-File% /set %guid1% osdevice ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid1% device ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /create {bootmgr} /d “Windows Vista BootManager”
Bcdedit /store %BCD-File% /set {bootmgr} timeout 30
Bcdedit /store %BCD-File% /set {bootmgr} displayorder %guid1%
Bcdedit /store %BCD-File% /enum all

Примечание . Каждая строка, начинающаяся с bcdedit или for, представляет собой отдельную строку (возможно, завернутую)
В командной строке запустите командный файл CreateBCD.cmd.

Шаг 3. Настройка PXE-сервера

Загрузите Tftpd32 v3.03 с http://www.jounin.net/tftpd32_download.html и извлеките файлы tftpd32.exe и tftpd.hlp на C: \ PXEServer.
Запустите Tftpd32 (разблокировать для брандмауэра Vista) и настройте следующие параметры сервера TFTP:

– Base Directory: C:\PXEServer\TFTPRoot
– Allow “\” As virtual root
– TFTP Security: Read Only
– Use anticipation windows of: 8192

Примечание. Использование окон ожидания может значительно улучшить скорость передачи, но поскольку это запрещено спецификацией TFTP, специальное предупреждение отображается, когда этот флажок установлен.
Параметры DHCP-сервера, измените, чтобы отразить вашу среду.

– IP pool starting address: 192.168.1.100
– Size of pool: 99
– Boot File: /boot/pxeboot.n12
– Default Router: 192.168.1.1
– Mask: 255.255.255.0
– Domain name: tslab.net

Optional – Add a x64 Image

Создание образа x64 Windows PE 2.0

copype amd64 c:\winpe_x64
ren winpe.wim winpe_x64.wim
copy c:\winpe_x64\winpe_x64.wim C:\PXEServer\TFTPRoot\boot /y
В папке C: \ PXEServer создайте пакетный файл с именем CreateBCD2.cmd со следующим содержимым.

Rem Creates BCD (boot configuration data) for two Windows PE 2.0 images
set BCD-File=c:\PXEServer\Tftproot\Boot\BCD
del %BCD-File%
Bcdedit /createstore %BCD-File%
Bcdedit /store %BCD-File% /create {ramdiskoptions}
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdidevice  boot
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdipath  \boot\boot.sdi

for /f “tokens=1-3” %%a in (‘Bcdedit /store %BCD-File% /create /d “WinPE x86” /application osloader’) do set guid1=%%c
Bcdedit /store %BCD-File% /set %guid1% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid1% detecthal Yes
Bcdedit /store %BCD-File% /set %guid1% winpe Yes
Bcdedit /store %BCD-File% /set %guid1% osdevice ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid1% device ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}

for /f “tokens=1-3” %%a in (‘Bcdedit /store %BCD-File% /create /d “WinPE x64” /application osloader’) do set guid2=%%c
Bcdedit /store %BCD-File% /set %guid2% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid2% detecthal Yes
Bcdedit /store %BCD-File% /set %guid2% winpe Yes
Bcdedit /store %BCD-File% /set %guid2% osdevice ramdisk=[boot]\Boot\winpe_x64.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid2% device ramdisk=[boot]\Boot\winpe_x64.wim,{ramdiskoptions}

Bcdedit /store %BCD-File% /create {bootmgr} /d “Windows VISTA BootManager”
Bcdedit /store %BCD-File% /set {bootmgr} timeout 30
Bcdedit /store %BCD-File% /set {bootmgr} displayorder %guid1% %guid2%
Bcdedit /store %BCD-File% /enum all

Примечание. Каждая строка, начинающаяся с bcdedit или for, представляет собой отдельную строку

 

Дополнительно – BCD с несколькими записями.

В папке C: \ PXEServer создайте пакетный файл с именем CreateBCD3.cmd со следующим содержимым.

Rem Creates BCD (boot configuration data) for three Windows PE 2.0 images
set BCD-File=c:\PXEServer\Tftproot\Boot\BCD
del %BCD-File%
Bcdedit /createstore %BCD-File%
Bcdedit /store %BCD-File% /create {ramdiskoptions}
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdidevice  boot
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdipath  \boot\boot.sdi

for /f “tokens=1-3” %%a in (‘Bcdedit /store %BCD-File% /create /d “WinPE x86” /application osloader’) do set guid1=%%c
Bcdedit /store %BCD-File% /set %guid1% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid1% detecthal Yes
Bcdedit /store %BCD-File% /set %guid1% winpe Yes
Bcdedit /store %BCD-File% /set %guid1% osdevice ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid1% device ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}

for /f “tokens=1-3” %%a in (‘Bcdedit /store %BCD-File% /create /d “WinPE x86 2” /application osloader’) do set guid2=%%c
Bcdedit /store %BCD-File% /set %guid2% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid2% detecthal Yes
Bcdedit /store %BCD-File% /set %guid2% winpe Yes
Bcdedit /store %BCD-File% /set %guid2% osdevice ramdisk=[boot]\Boot\winpe_x86_2.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid2% device ramdisk=[boot]\Boot\winpe_x86_2.wim,{ramdiskoptions}

for /f “tokens=1-3” %%a in (‘Bcdedit /store %BCD-File% /create /d “WinPE x64” /application osloader’) do set guid3=%%c
Bcdedit /store %BCD-File% /set %guid3% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid3% detecthal Yes
Bcdedit /store %BCD-File% /set %guid3% winpe Yes
Bcdedit /store %BCD-File% /set %guid3% osdevice ramdisk=[boot]\Boot\winpe_x64.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid3% device ramdisk=[boot]\Boot\winpe_x64.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /create {bootmgr} /d “Windows VISTA BootManager” Bcdedit /store %BCD-File% /set {bootmgr} timeout 30
Bcdedit /store %BCD-File% /set {bootmgr} displayorder %guid1% %guid2% %guid3%
Bcdedit /store %BCD-File% /enum all

Примечание . Каждая строка, начинающаяся с bcdedit или for, представляет собой отдельную строку

взято с http://www.deployvista.com/Blog/tabid/70/EntryID/27/Default.aspx

Поделиться:

285 просмотров