Version 6 (modified by on Mar 11, 2021 at 6:57:48 PM) ( diff ) | ,
---|
WinPE
Used to install Windows >= 7 with OPSI.
Gernal Information about WinPE at http://en.wikipedia.org/wiki/Windows_Preinstallation_Environment
Preparing WinPE from Linux
The (excellent) OPSI documentation describes at length, how to prepare a full OS Windows installation (see https://download.uib.de/opsi4.1/documentation/html/en/opsi-getting-started-v4.1/opsi-getting-started-v4.1.html#opsi-getting-started-firststeps-osinstall-fill-base-packages-nt6).
This can be archived quicker, especially, the preparing WinPE can be done directly on the Linux OPSI server, instead of using Windows and the need to install WAIK (or ADK):
Have your Windows installation ISO available. We assume, it is named /tmp/Win10_x64.iso
.
# # Variables. Adapt them to your needs. # WINDOWS_ISO=/tmp/Win10_x64.iso PROD=win10-x64 # # install required software # apt install wimtools syslinux p7zip-full # CentOS/SUSE: yum install wimtools syslinux p7zip p7zip-plugins # # Install required OPSI product # opsi-package-updater install ${PROD} cd /var/lib/opsi/depot/${PROD} # # Copy ISO content to installfiles # 7z x ${WINDOWS_ISO} installfiles # # Create winpe # mkdir -p winpe-overlay/Windows/System32 printf "%s\r\n" "c:\opsi\startnet.cmd" > winpe-overlay/Windows/System32/startnet.cmd mkwinpeimg --windows-dir=installfiles --overlay=winpe-overlay winpe.img 7z x winpe.img -owinpe/ # # Adapt produkts # opsi-admin -d method updateWIMConfig ${PROD}
Using 7z x ${SRC} -o${DEST
} is a shortcut to avoid mounting the ISO or disk image files.
If you prefer, you can use this:
TMP=$(mktemp -d) sudo mount ${SRC} ${TMP} cp -a ${TMP}/. ${DEST]/. sudo umount ${TMP}
Outdated approaches
WinPE 4.0
Modify WinPE for OPSI
Install Windows ADK, see "Windows Deployment with the Windows ADK" at http://technet.microsoft.com/en-us/library/hh824947.aspx
Perform the following commands:
c: rem Set Environment variables cd C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment Tools DandIsetenv rem Create Initial winpe directory cd C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment copype amd64 c:\winpe rem Mount and modify WinPE boot image cd c:\winpe dism /Get-WIMInfo /WimFile:C:\winpe\media\sources\boot.wim dism /cleanup-wim dism /Mount-Wim /WimFile:C:\winpe\media\sources\boot.wim /index:1 /MountDir:C:\winpe\mount type C:\winpe\mount\Windows\System32\startnet.cmd echo c:\opsi\startnet.cmd > C:\winpe\mount\Windows\System32\startnet.cmd dism /unmount-Wim /MountDir:C:\winpe\mount /Commit
Copy media subdirectory as winpe Directory to OPSI server:
cp media/. /var/lib/opsi/depot/win*\winpe/.
WinPE 3.x
Since Windows 7.
Alternatively use following commands:
Install Windows WAIK
c: rem Create Initial winpe directory c:\Program Files\Windows AIK\Tools\PETools\copype.cmd amd64 c:\winpe64 copy c:\winpe64\winpe.wim c:\winpe64\ISO\sources\boot.wim # set variables set wim=c:\winpe64\ISO\sources\boot.wim set md=c:\winpe64\mount rem Mount and modify WinPE boot image cd c:\winpe64 dism /Get-WIMInfo /WimFile:%wim% dism /cleanup-wim dism /Mount-Wim /WimFile:%wim% /index:1 /MountDir:%md% type C:\winpe64\mount\Windows\System32\startnet.cmd echo c:\opsi\startnet.cmd > %md%\Windows\System32\startnet.cmd dism /unmount-Wim /MountDir:%md% /Commit
More customazations are explained at wiki:opsi/dism
Copy ISO subdirectory as winpe Directory to OPSI server:
cp ISO/. /var/lib/opsi/depot/win*\winpe/.
Hint: The boot.wim file is also accessable by the 7z archiving programm (at least for WinPE versions <4.0)
Other
- wiki:opsi/dism
- some other hints concerning OPSI WinPE Images
- Building a Windows PE Image with Optional Components