Issue:
If you are having problems during imaging you will often be asked to upload a copy of the zim.log file to our website to help us resolve the problem, however getting the log from the imaging environment is not always straightforward.
Solution:
From Imaging Toolkit 9.0.2 and Deployment Monitor 1.0.4 onwards the zim and ztoolkit logs are automatically collected, and are available via the Deployment Monitor web console. If you have chosen not to use Deployment Monitor this document will take you through several methods of extracting the zim.log file from the imaging environment.
Requirements:
- For ZENworks imaging:- Media to extract the zim.logfile to: USB device, FTP Server, TFTP server or CIFS share
- An understanding of basic Linux commands
 
- Media to extract the 
- For WinPE imaging:- Media or network share to copy the zim.logfile to
 
- Media or network share to copy the 
Procedure:
| 
 | 
Select the imaging environment in use to see the appropriate procedures:
| 
 | ||
| 
 | 
- ZENworks Linux/zmg imaging- For ZENworks Linux/zmg imaging the following tasks must be completed in order to extract a debug zim.log file - Done - Task - 1. - Enable debug logging - 2. - Extract log file - Enable debug logging- To enable debug logging run Zim with the command line - ./zim -lic:/zimbin/engl.lic -s:/zimbin/zim.cfg -log -z - This can be achieved by modifying the - zimrun.sfile in the zimfiles directory on your TFTP server.
 Zim will run as normal but will also create a log file,- /zimbin/zim.log, and does not block the ability to press "Control + C" to break out of Zim to the bash prompt.- Create the log file as follows; - Follow the steps you normally take for the error to appear but ensure that Restart after imaging is not enabled. 
 
 NOTE: DO NOT REBOOT the machine as the log file is written to the imaging environment's RAM disk 
- Select [Maintenance Menu] -> [Exit to prompt] or press [Control] + [c] to break to the bash prompt 
 
- Follow the steps you normally take for the error to appear but ensure that Restart after imaging is not enabled. 
- There should now be a - zim.logfile in the /zimbin folder. To view this file type- less zim.log - NOTE: - To exit from the "less" command - press [q] 
- Extract the zim.log file- There are several ways to copy the - zim.logto more accessible media. Below are some of the most common options, select the one which is most appropriate to your environment:- Done - Task - 1. - USB Device - 2. - FTP Server - 3. - TFTP Server - 4. - CIFS share - USB Device- Identify the USB device. 
 
 - At the bash prompt type cat /proc/partitions 
- Make a note of the devices listed 
- Insert a USB pendrive/disk into the machine with the zim.logfile
- At the bash prompt type cat /proc/partitions There should now be an extra device loaded which is likely to be/dev/sda1if the main harddisk is an IDE hard drive or/dev/sdb1if the main harddisk is a SCSI or SATA drive
 
- At the bash prompt type 
- Mount the USB drive by typing mount /dev/<mount point> /mnt Where <mount point> is sda1 or sdb2 as noted above. This will make the USB Device accessible
- Copy the log file onto the USB Device cp /zimbin/zim.log /mnt 
- un-mount the USB Device from the Linux environment umount /mnt 
- Remove the USB Device and attach the zim.logfile to your support ticket
 
- Identify the USB device. 
- FTP Server- To launch the FTP client type the following at the bash prompt 
 ftp 
- Connect to the appropriate FTP server by typing open <server ip address or dnsname> 
- If prompted enter your username and password 
- Once connected type put /zimbin/zim.log /<path>/zim.log Where <path> is the path to upload the file to - check with your FTP server administrator
- Exit from the FTP client by typing quit 
- The zim.logfile from the workstation should now be on the FTP server and can be attached to your support ticket
 
- To launch the FTP client type the following at the bash prompt 
- TFTP Server- The ZENworks TFTP server is used to boot to the Linux imaging environment. By default (and for security reasons) the TFTP server is configured to block TFTP uploads, so in order to upload the zim.logfile it is necessary to enable uploads to the TFTP server.
 
 See Deploying and Managing Preboot Services for instructions on configuring the TFTP server with ZENworks 11
- Once the TFTP upload has been configured and the TFTP service has been restarted, at the bash prompt type tftp $PROXYADDR put /zimbin/zim.log /log/zim.log quit 
- The zim.logfile should now be on your imaging server and can be attached to your support ticket
 
- The ZENworks TFTP server is used to boot to the Linux imaging environment. By default (and for security reasons) the TFTP server is configured to block TFTP uploads, so in order to upload the 
- CIFS share- The ZENworks imaging environment can mount a CIFS share to a local mount point. This can be used to copy the - zim.logfile off of the machine.- Identify the share that you wish to connect to and make a note of suitable credentials 
 
 For example:server share username Password labsrv.engllab.local logs engllab\builduser-ad P@ssw0rd 
- At the bash prompt create a suitable mount point: mkdir /mnt/logs 
- Mount the CIFS share to the newly created mount point mount.cifs //labsrv.engllab.local/logs /mnt/logs -o username=engllab\builduser-ad,password=P@ssw0rd 
- Copy the log file onto the CIFS share cp /zimbin/zim.log /mnt/logs/ 
- Un-mount the CIFS share from the imaging environment umount /mnt/logs 
- Attach the zim.logfile to a support ticket update
 
- Identify the share that you wish to connect to and make a note of suitable credentials 
 
 
- WinPE/wim imaging- To enable debug logging run Zim with the command line - zim.exe /log /z - This can be achieved by modifying the - zimpeget.cmdfile in the zimfiles directory on your TFTP server.
 Zim will run as normal but will also create a log file,- zim.log, and does not block the ability to press "Control + C" to break out of Zim to the bash prompt.- Create the log file as follows; - Follow the steps you normally take for the error to appear but ensure that Restart after imaging is not enabled. 
 
 NOTE: DO NOT REBOOT the machine as the log file is written to the imaging environment's RAM disk 
- Select [Maintenance Menu] -> [Exit to prompt] or press [Control] + [c] to break to the bash prompt 
 
- Follow the steps you normally take for the error to appear but ensure that Restart after imaging is not enabled. 
- There should now be a - zim.logfile in the current directory. Copy the file to a suitable location, for example to a USB device, or to a Windows share (by issuing a net use command).
 
 Attach the- zim.logfile to a support ticket update
If you have any problems or questions about the steps in this TID please contact the ENGL support team
