|
|||
|
Windows-PE des WAIK für Windows 7 via PXELinux aus dem NetzWindows-PE (Preinstallation Environment) ist kein Betriebssystem zur normalen Nutzung durch den Endanwender. Es wird zur Installation des eigentlichen Windows-Betriebssystems benutzt, darüber hinaus aber auch für Reparatur und Imaging-Zwecke. Es ist Bestandteil des WAIK (Windows Automated Installation Kit) von Microsoft für Windows Vista und neuer. Man kann es von verschiedensten Medien booten, u.A. aus dem Netz via PXE. Auf PXE an sich oder Windows-PE wird hier nicht weiter eingeganen. Hier liegt der Fokus auf das Booten von Windows-PE von einem unter Linux laufenden Server, das Boot inkl. Boot-Menü erfolgt zunächst via PXELinux (Bestandteil des SYSLinux-Paketes). Für unseren Ausbildungsraum (PC-Pool) haben wir bisher das Windows-PE von Windows-Vista per PXE von einem Linux-Server via PXELinux gebootet. Dazu gibt es eine gute und ausführliche Anleitung des RZ der Uni-Erlangen. Nun haben wir diese Umgebung für Windows-7-Tests aktualisiert. Dabei booten wir mit einem PXELinux-Booteintrag in einen Windows-Bootmanager, der die Auswahl für ein 32- und ein 64-Bit-System anbietet (nach einem Timeout wird standardmäßig die 32-Bit-Variante gewählt). Die wesentlichen (Informations-) Quellen bei der Einrichtung sind:
Datei aus dem WAIKMan muss mithilfe des WAIK Dateien zusammenstellen (hierbei folgt man grob dem o.g. Walkthrough-Guide von Microsoft), die man auf ein anzulegendes tftp-Unterverzeichnis Boot auf den Linux-Server kopiert. Bis auf die eigentliche Windows-PE-Image-Datei (Endung .wim) stellten sich die Boot-Dateien nicht als 32-/64-Bit-abhängig heraus.
BCD-Erstellung mit bcdedit auf einem Vista-PCGrob ist das in der o.g. Technet-Anleitung beschrieben. Da wir aber sowohl 32- als auch 64-Bit Windows-PE haben wollen, mussten wir es modifizieren. Zudem haben wir die Befehle in eine Batch-Datei gesteckt (^ am Zeilenende bedeutet nur Zeilenumbruch innerhalb eines einzelnen Kommandos, ähnlich zu \ unter Unix): rem BCD-Erstellung fuer PXE-Boot von WAIK-Windows-7 rem vgl. http://www.rrzn.uni-hannover.de/anl-waikpxe.html rem 20100716-HH del BCD c:\windows\system32\bcdedit -createstore BCD c:\windows\system32\bcdedit -store BCD -create {ramdiskoptions} c:\windows\system32\bcdedit -store BCD -set {ramdiskoptions} ramdisksdidevice boot c:\windows\system32\bcdedit -store BCD -set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi for /f " usebackq delims={} tokens=2" %%i IN ^ (`c:\windows\system32\bcdedit -store BCD -create /d "WinPE-x86 Boot Image" /application osloader`) ^ do set GUIDx86=%%i for /f " usebackq delims={} tokens=2" %%i IN ^ (`c:\windows\system32\bcdedit -store BCD -create /d "WinPE-x64 Boot Image" /application osloader`) ^ do set GUIDx64=%%i echo GUID x86: %GUIDx86% echo GUID x64: %GUIDx64% echo GUIDs gemaess bcdedit: c:\windows\system32\bcdedit -store BCD -enum c:\windows\system32\bcdedit -store BCD -set {%GUIDx86%} systemroot \Windows c:\windows\system32\bcdedit -store BCD -set {%GUIDx86%} detecthal Yes c:\windows\system32\bcdedit -store BCD -set {%GUIDx86%} winpe Yes c:\windows\system32\bcdedit -store BCD -set {%GUIDx86%} osdevice ramdisk=[boot]\Boot\winpex86.wim c:\windows\system32\bcdedit -store BCD -set {%GUIDx86%} device ramdisk=[boot]\Boot\winpex86.wim,{ramdiskoptions} c:\windows\system32\bcdedit -store BCD -set {%GUIDx64%} systemroot \Windows c:\windows\system32\bcdedit -store BCD -set {%GUIDx64%} detecthal Yes c:\windows\system32\bcdedit -store BCD -set {%GUIDx64%} winpe Yes c:\windows\system32\bcdedit -store BCD -set {%GUIDx64%} osdevice ramdisk=[boot]\Boot\winpex64.wim c:\windows\system32\bcdedit -store BCD -set {%GUIDx64%} device ramdisk=[boot]\Boot\winpex64.wim,{ramdiskoptions} c:\windows\system32\bcdedit -store BCD -create {bootmgr} /d "WinPE BootManager" c:\windows\system32\bcdedit -store BCD -timeout 30 c:\windows\system32\bcdedit -store BCD -default {%GUIDx86%} c:\windows\system32\bcdedit -store BCD -displayorder {%GUIDx86%} {%GUIDx64%} Die resultierende Datei BCD muss in das tftp-Unterverzeichnis Boot auf dem Linux-Server kopiert werden. Nacharbeiten auf dem Linux-ServerDas einfache Reinkopieren des Unterverzeichnisses Boot in das tftp-Verzeichnis reicht noch nicht aus. Man muss noch zwei Links setzen:
Zudem gibt es ein generells Problem mit Pfaden, der Trenner für Pfadangaben ist unter Windows der Backslash (\) und unter Unix der normale Schrägstrich (/). Da das bootende WAIK vom tftp-Server Dateien in Windows-Notation abfragt, muss der tftp-Server das in Unix-Angaben umsetzen. Unter Debian haben wir dafür den HPA-tftpd benutzt (aptitude install tftpd-hpa) und wie folgt konfiguriert:
Inhalt des tftp-Verzeichnis auf dem Linux-ServerGelistet sind im Folgenden nur die neu durch Windows-PE hinzugekommenen Dateien und Verzeichnisse, nicht z.B. pxelinux.0. tftp-Wurzelverzeichnis (bei uns /srv/tftpboot/)drwxr-xr-x 25 root root 4096 2009-08-28 14:41 Boot lrwxrwxrwx 1 root root 16 2009-07-29 12:01 bootmgr.exe -> Boot/bootmgr.exe Windows-PE-Verzeichnis Boot/ (bei uns /srv/tftpboot/Boot/)-rw-r--r-- 1 root root 79 2009-06-10 23:44 abortpxe.com -rw-r--r-- 1 root root 16384 2009-07-29 13:31 BCD -rw-r--r-- 1 root root 523328 2009-07-14 03:26 bootmgr.exe -rw-r--r-- 1 root root 3170304 2009-06-10 14:44 boot.sdi drwxr-xr-x 2 root root 4096 2009-08-26 16:50 cs-CZ drwxr-xr-x 2 root root 4096 2009-08-26 16:50 da-DK drwxr-xr-x 2 root root 4096 2009-08-26 16:50 de-DE drwxr-xr-x 2 root root 4096 2009-08-26 16:50 el-GR drwxr-xr-x 2 root root 4096 2009-08-26 16:50 en-US drwxr-xr-x 2 root root 4096 2009-08-26 16:50 es-ES drwxr-xr-x 2 root root 4096 2009-08-26 16:50 fi-FI drwxr-xr-x 2 root root 4096 2009-08-26 16:50 fr-FR -rw-r--r-- 1 root root 26076 2009-06-10 23:15 hdlscom1.com -rw-r--r-- 1 root root 26060 2009-06-10 23:15 hdlscom1.n12 -rw-r--r-- 1 root root 26076 2009-06-10 23:15 hdlscom2.com -rw-r--r-- 1 root root 26060 2009-06-10 23:15 hdlscom2.n12 drwxr-xr-x 2 root root 4096 2009-08-26 16:50 hu-HU drwxr-xr-x 2 root root 4096 2009-08-26 16:50 it-IT drwxr-xr-x 2 root root 4096 2009-08-26 16:50 ja-JP drwxr-xr-x 2 root root 4096 2009-08-26 16:50 ko-KR drwxr-xr-x 2 root root 4096 2009-08-26 16:50 nb-NO drwxr-xr-x 2 root root 4096 2009-08-26 16:50 nl-NL drwxr-xr-x 2 root root 4096 2009-08-26 16:50 pl-PL drwxr-xr-x 2 root root 4096 2009-08-26 16:50 pt-BR drwxr-xr-x 2 root root 4096 2009-08-26 16:50 pt-PT lrwxrwxrwx 1 root root 11 2009-08-28 15:00 pxeboot.0 -> pxeboot.n12 -rw-r--r-- 1 root root 25772 2009-06-10 23:15 pxeboot.com -rw-r--r-- 1 root root 25772 2009-06-10 23:15 pxeboot.n12 drwxr-xr-x 2 root root 4096 2009-08-26 16:50 ru-RU drwxr-xr-x 2 root root 4096 2009-08-26 16:50 sv-SE drwxr-xr-x 2 root root 4096 2009-08-26 16:50 tr-TR -rw-r--r-- 1 root root 1347 2009-06-10 23:06 WdsConfig.inf -rw-r--r-- 1 root root 527360 2009-07-14 01:30 wdsmgfw.efi -rw-r--r-- 1 root root 31124 2009-06-10 23:44 wdsnbp.com -rw-r--r-- 1 root root 135712770 2009-07-13 22:19 winpex64.wim -rw-r--r-- 1 root root 114676416 2009-07-13 21:03 winpex86.wim drwxr-xr-x 2 root root 4096 2009-08-26 16:50 zh-CN drwxr-xr-x 2 root root 4096 2009-08-26 16:50 zh-HK drwxr-xr-x 2 root root 4096 2009-08-26 16:50 zh-TW Die Unterverzeichnisse mit den Fonts und Sprach-Dateien listen wir hier nicht auf, man kann sie auch komplett weglassen (Windows-PE versucht zwar, Fonts etc. zu laden, funktioniert aber auch ohne). Bootmenü-Eintrag für PXELinuxIn die PXELinux-Konfiguration pxelinux.cfg/default (o.Ä.) trägt man zusätzlich Boot/pxeboot.0 als Kernel ein: ... LABEL winpe7 MENU LABEL Windows PE WAIK-Win7 (Vers. 1.0) 32&64-Bit KERNEL Boot/pxeboot.0 ... 32- oder 64-Bit WAIK?Ist das WAIK-Booten eingerichtet, stellt sich natürlich die Frage, wann man denn bei der Benutzung die 32- oder die 64-Bit-Variante wählen soll. Unsere Tests ergaben:
Generell richtet sich das zu wählende WAIK natürlich nach den Anforderungen des Installationsprogramm und nicht nach der Version des zu installierenden Betriebssystems. Eine Überprüfung des Executables mit dem Unix-Programm file bringt im Zweifelsfall Klarheit. Die Meldungen sind aber nicht unbedingt direkt verständlich, in den oben genannten Fällen hatten wir je nach Programmversion von file:
|