ZEN Boot Maker

0 Likes
ZENworks Imaging Boot Maker, an automated tool for re-authoring the ZENworks Imaging boot CDs and creating ZENworks Imaging bootable USB drives.

This tool was developed for the ZENworks 11.x Boot CD.
Other configurations may not work.

Use Notepad to view and edit text files so as to preserve the UNIX line feed characters or it may not work.

To use this tool, first drop the iso image that you've downloaded into the same directory that the CMD script resides.

The .ISO file-name does not matter as the script will locate the file itself, if there are multiple .ISO files then the script will use the first one it finds, so put just one to avoid confusion.

Then run the CMD script "ZenBootMaker.cmd".

The script will use 7z.exe to extract the contents of the .ISO a "working" directory.

At this point the script will pause, so that you can make the needed modifications to files in the "working" directory.

The "working" directory becomes the file structure that will be used to create the new .ISO image or the boot USB.

Once complete, return to the Command Prompt window, select the desired operation.

Select CD to create the new .ISO image. Use this image to burn a CD/DVD ROM.

Select USB to create the bootable USB drive. The script assumes the drive is properly partitioned and formatted. The script will attempt to set the volume label to "ZENWORKS", because the drive is accessed via this label while the USB is booting. (Thanks sgardiner for posting that, brilliant!)

Use caution not to specify your C: drive or you might render it useless.

I have tested this on several different USB devices and mostly newer PC's without failure but likely there are some configurations that may not work.

I prefer using USB hard drives as you can to lay multiple partitions on them and Windows will have no trouble mounting them, unlike multiple partitions on most USB sticks where you can only mount the first partition (BOOTIT did not work on my flash drive).

A scenario that I have used on a 750Gig USB HD is to create a 100 MB FAT32 partition and an NTFS partition on the remaining space. Make the FAT32 bootable, then from the booted ZENworks partition, mount the NTFS partition for reading an writing images.

If you set the volume name to something like, say 'DATA', then you can utilize the device "/dev/disk/by-label/DATA" to perform the mount.

I like to add exported functions and alias' to the SETTINGS.TXT file so I can perform these type of actions with a simple command. See the file "Sample Commands . . ."

The script if run again, will prompt you if you wish, to re-use the 'working' directory, otherwise it is deleted and begins anew. The newly created .ISO image is also deleted without prompting if is exists. If you wish to retain them, then rename or move them.

The following files are required for this script to function and should be copied to the "bin" sub-directory:

(Download and install the latest 7zip, then locate the file under "Program Files")
7z.exe


(The next two located here -> http://smithii.com/files/cdrtools-latest.zip)cygwin1.dll
mkisofs.exe


(The next three here -> https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-5.01.zip)
libutil.c32
menu.c32
syslinux.exe


Cheers!

Comments/Improvements welcome.

Ed Radke

edskirad@hotmail.com

Tags:

Labels:

How To-Best Practice
Comment List
Parents
  • If you run the script "as administrator" it fails to find the correct BIN directory as the command prompt's working directory gets changed as administrator. I added the following line to fix this issue: cd "%~dp0"

    BEFORE fix:
    REM Check for required files
    if not exist ".\bin\7z.exe" goto :ERROR
    if not exist ".\bin\mkisofs.exe" goto :ERROR
    if not exist ".\bin\cygwin1.dll" goto :ERROR
    if not exist ".\bin\libutil.c32" goto :ERROR
    if not exist ".\bin\menu.c32" goto :ERROR
    if not exist ".\bin\syslinux.exe" goto :ERROR

    AFTER fix:
    REM Check for required files
    cd "%~dp0"
    if not exist ".\bin\7z.exe" goto :ERROR
    if not exist ".\bin\mkisofs.exe" goto :ERROR
    if not exist ".\bin\cygwin1.dll" goto :ERROR
    if not exist ".\bin\libutil.c32" goto :ERROR
    if not exist ".\bin\menu.c32" goto :ERROR
    if not exist ".\bin\syslinux.exe" goto :ERROR
Comment
  • If you run the script "as administrator" it fails to find the correct BIN directory as the command prompt's working directory gets changed as administrator. I added the following line to fix this issue: cd "%~dp0"

    BEFORE fix:
    REM Check for required files
    if not exist ".\bin\7z.exe" goto :ERROR
    if not exist ".\bin\mkisofs.exe" goto :ERROR
    if not exist ".\bin\cygwin1.dll" goto :ERROR
    if not exist ".\bin\libutil.c32" goto :ERROR
    if not exist ".\bin\menu.c32" goto :ERROR
    if not exist ".\bin\syslinux.exe" goto :ERROR

    AFTER fix:
    REM Check for required files
    cd "%~dp0"
    if not exist ".\bin\7z.exe" goto :ERROR
    if not exist ".\bin\mkisofs.exe" goto :ERROR
    if not exist ".\bin\cygwin1.dll" goto :ERROR
    if not exist ".\bin\libutil.c32" goto :ERROR
    if not exist ".\bin\menu.c32" goto :ERROR
    if not exist ".\bin\syslinux.exe" goto :ERROR
Children
No Data
Related
Recommended