Applies To
ENGL Imaging Toolkit 10.0.3 (and newer)
Issue
Imaging Toolkit 10.0.3 introduces the ability to create a USB disk for imaging using the "Create WinPE boot media" wizard.
When configuring the media to operate in "disconnected" mode some changes may be required to ensure that "Zim" works as expected.
Solution
Update the zim.cfg
file.
|
Done | Task | ||
---|---|---|---|
| |||
| |||
| |||
|
Identify if Device has booted from USB media
It is useful to know when Zim has been launched from ENGL PE USB disconnected media. By detecting this and setting the
USBBoot
variable it can be used at various loctions within the script to control the process based on the media in use.NOTE: The _ImageVolume variable is only set when there is an images folder on the disconnected media images partition.
To enable this update the following lines (in green) in the standard ENGL WinPE zim.cfg file.; Display log file for debugging If:File,Exist,"%_ZimDir%zim.log" File:Run,"cmd /c start Ztrace /trace:%_ZimDir%zim.log /zorder:bottom",verbose End: ; Identify if device has booted using ENGL WinPE USB disconnected media If:Var,_ImageVolume,"NE","" ; _ImageVolume variable is only set on ENGL WinPE disconnected media Set:USBBOOT,"YES" End: Set:_BgColor,"blue,black"
Update Images_Path
The standard ENGL PE
zim.cfg
file uses a UNC path for the the Images_Path variable. This path is required when booting using PXE or USB "connected" boot media.
For "disconnected" media the path needs to be updated to point to the path on the USB device. The changes are marked in green in the following script sample.Set:_HelpTitle,"Help" Set:_Help,"Help unavailable." Set:_ZisdVersion,"12" **ZENworks imaging only ; Identify if device has booted using ENGL PE USB disconnected media If:Var,USBBOOT,"EQ","YES" ; Set the disconnected image path Set:Images_Path,"%_ImageVolume%\images" Else: Set:Images_Path,"server\images" End: Set:Images_Share_Username,"engllab\administrator" Set:Images_Share_Password,"P@ssw0rd" Set:_Wim_LogPaths,"false" Set:_Wim_ShowCancel,"true"
The
SysInfo:MoveDriveLetters
function lets Zim reassign drive letters prior to imaging. This ensures that images are restored onto the local disk and not onto USB media.
As a result theImages_Path
variable needs to be reset. The changes are marked in green in the following script sample.; Re-assign drive letters SysInfo:MoveDriveLetters ; Identify if device has booted using ENGL PE USB disconnected media If:Var,USBBOOT,"EQ","YES" ; Set the disconnected image path Set:Images_Path,"%_ImageVolume%\images" End: File:Run,"net use "%Images_Path%" /user:%Images_Share_Username% %Images_Share_Password%",silent ; Delete diskpart script if found If:File,Exist,"%_ZimDir%ZimDiskpartScript.txt" File:Delete,"%_ZimDir%ZimDiskpartScript.txt" End:
Update INI files
There are two INI files used by
Zim
to identify which files to restore (projects.ini) and which drivers image to restore (drivers.ini).
When configuring disconnected imaging on a USB disk it is normal for a subset of the normal image files to be copied onto the disk. If theprojects.ini
anddrivers.ini
files are not reviewed then it may be possible to partly build a machine that should not be built.
To ensure this does not happen it is worth reviewing and updating the INI files to reflect the projects and driver images found on the disk.Scenario
4 projects and 6 machines are configured on the imaging server.
2 projects are required for disconnected imaging on 3 hardware types.
Theprojects.ini
file contains:; ; ENGL Zim projects.ini lookup file ; [projects] project1 = win81-pro-x64-zcm1741 project2 = win81-pro-x86-zcm1741 project3 = win10-edu-x64-zcm20 project4 = win10-edu-x86-zcm20 [win10-edu-x64-zcm20] Description = win10-edu-x64-zcm20 project_image_path = win10-edu-x64-zcm20 project_os = win10-edu-x64 partition_count = 2 partition1_size = 200 partition2_size = 60000 driver_os = win10-x64 base_image = win10-edu-x64-18363-postsp ztoolkit = ztoolkit efi_boot_image = win10-edu-x64-18363-uefi-boot ... ...
Thedrivers.ini
contains:[Dell Inc.] Latitude E4300="drivers-dell-latitude-e4300|Desktop|win8-x86,win8-x64,win10-x86,win10-x64" Latitude 3550="drivers-dell-latitude-3550|laptop|win10-x86,win10-x64,win8-x86,win8-x64" Latitude E7270="drivers-dell-latitude-e7270|laptop|win8-x86,win8-x64" [Lenovo] ThinkPad T61p="drivers-lenovo-thinkpad-t61p|Desktop|win8-x64,win8-x86" [Hewlett-Packard] HP Z400 Workstation="drivers-hp-hp-z400-workstation|desktop|win8-x64,win8-x86" HP Z640 Workstation="drivers-hp-hp-z640-workstation|desktop|win10-x86,win10-x64" ... ...
The disconnected imaging environment will be for Windows 10 only.
If theprojects.ini
file is not edited then the Windows 8.1 projects will still be listed in the menu but as the images are not available selecting these projects will fail.
Equally, if thedrivers.ini
file is not edited then It will be possible to restore a project to a machine when the drivers image has not been set up on the disconnected images location.
Edit the INI files and either add a semi-colon (;) in front of each line that is no longer required or simply delete the entire line.
The [Projects] list in theprojects.ini
needs to be renumbered.
Changes are shown in green in the following example:; ; ENGL Zim projects.ini lookup file ; [projects] ;project1 = win81-pro-x64-zcm1741 ;project2 = win81-pro-x86-zcm1741 project
The31 = win10-edu-x64-zcm20 project42 = win10-edu-x86-zcm20 [win10-edu-x64-zcm20] Description = win10-edu-x64-zcm20 project_image_path = win10-edu-x64-zcm20 project_os = win10-edu-x64 partition_count = 2 partition1_size = 200 partition2_size = 60000 driver_os = win10-x64 base_image = win10-edu-x64-18363-postsp ztoolkit = ztoolkit efi_boot_image = win10-edu-x64-18363-uefi-boot ... ...drivers.ini
contains:[Dell Inc.] Latitude E4300="drivers-dell-latitude-e4300|Desktop|win8-x86,win8-x64,win10-x86,win10-x64" Latitude 3550="drivers-dell-latitude-3550|laptop|win10-x86,win10-x64,win8-x86,win8-x64" ;Latitude E7270="drivers-dell-latitude-e7270|laptop|win8-x86,win8-x64" [Lenovo] ;ThinkPad T61p="drivers-lenovo-thinkpad-t61p|Desktop|win8-x64,win8-x86" [Hewlett-Packard] ;HP Z400 Workstation="drivers-hp-hp-z400-workstation|desktop|win8-x64,win8-x86" HP Z640 Workstation="drivers-hp-hp-z640-workstation|desktop|win10-x86,win10-x64" ... ...
Prompt to disconnect USB device (post-imaging)
It is prudent to disconnect the USB device from the machine that has been imaged prior to it restarting.
This will:- Stop the machine USB booting straight back to Zim
- Stop the USB device being formatted or otherwise modified as part of the build process (depending on build process configuration)
- Reduce the chance of UEFI boot issues
- Remove other random USB boot issues
- Stop the machine USB booting straight back to Zim
- It is possible to display a dialog prompting to remove the USB device prior to the reboot. The changes required are shown in green in the script example below:
; ------------------------------------------------------ ; Reboot ; ------------------------------------------------------ Label:Reboot ; Identify if device has booted using ENGL PE USB disconnected media If:Var,USBBOOT,"EQ","YES" ; Prompt to remove USB device Dialog:Ask,"Disconnect USB Boot devices","Reminder: Disconnect the USB Boot Device prior rebooting",_Ok END: Dialog:Popup,"Restarting, please wait..." Pause:2 File:Run,"wpeutil reboot", silent Goto:TheEnd
If you have any problems or questions about the steps in this TID please contact the ENGL support team