Cool Solutions

How to start the ZENworks 11.1 imaging from a USB drive instead of using PXE or the boot CD



January 18, 2012 11:25 am






This is my guide to create a ZENworks 11.1 imaging boot USB Pen Drive. Not a lot of things are needed before you can use a USB Pen Drive instead of the original boot CD. You can then image as you normally do, run a script from the USB Pen Drive or even pull down an image from it.

If you need to be able to use large images, try this solution:
ZENworks 11.1 imaging on a USB drive, with an additional partition for large image files


To get where I ended, I went through this great solution and made my own modifications: ZENworks 7 SP1 Imaging on USB

The items needed from this tool are the files located in the “Data” folder, I’ll show this later.

And the ZENworks 7/11.1 docs.

Now let’s get started.

What is needed?

First of all, this is what you need to get the job done:

Got all the files? Then we’re ready.

Warning, I can’t guarantee this works on all USB pen drives. And do remember that under this process the drive will be cleaned, so backup any data you may have on it before starting.

All the files (on the Windows laptop) in this guide, are located in C:\USBIMAGE\

If you don’t want to make it all by yourself, you can use the files attached:
You still need to go through Step One, and then copy the files to your USB Pen Drive.

Step one

Format and make the USB pen drive bootable.

  1. Connect the USB to your computer
  2. Open a command prompt and execute:



    Your USB pen drive is shown, note the ID’s.

  3. On the command prompt run this:

    C:\USBIMAGE\zen71usb\utils\HPUSBF.exe HD2 -FS:FAT -Q


    Now your USB pen drive is ready

    Note: If you want to put large image files on your USB Pen Drive and restore it, you should format it with FAT32. If you don’t want to use the HPUSBF.exe utility, you can also right click the USB Pen Drive and select “Format” and choose FAT32.

  4. On the command prompt run this:

    C:\USBIMAGE\zen71usb\utils\syslinux.exe F:


    If you check the pen drive there should be a file called ldlinux.sys (you need to be able to see hidden files)

    Your USB pen drive is now ready and bootable.

Step two

Copy the needed files to the USB pen drive.

  1. First I’ve copied the bootcd.iso (from the driver update or my own PXE server) and extracted the files to C:\USBIMAGE\bootcd (using winrar)
  2. Now, create a new folder on the US pen drive, named ZDM7
  3. Copy the file, initrd, from C:\USBIMAGE\zen71usb\data\ to the new folder (ZDM7)
  4. Copy all the files from C:\USBIMAGE\zen71usb\data\ to the root of your USB pen drive.


    This is now the content of your USB drive

  5. Copy the files, root and root.fonts from C:\USBIMAGE\bootcd\boot\i386 to F:\boot\i386
  6. Copy the files, initrd and Linux from C:\USBIMAGE\bootcd\boot\i386\loader to the root of the USB pen drive. Overwrite the two existing files.
  7. OPTIONAL, edit the syslinux.cfg (I use winvi). In some cases it’s needed to change the syslinux.cfg file, so the USB pen drive is found during boot. I’ve used this at the end of every menu option:

    install=hd:/dev/sdb1 root=/dev/sdb1

Step three

Copy the needed files on to the Linux machine for further editing.

Switch to your Linux machine.

  1. Log in as root
  2. Go to the Home folder of root
  3. Create a folder named “Work”
  4. In the Work folder create 2 folders, one called ZDM7 and one called ZCM11

    If you’ll like you can use these commands to create the folders:

    cd /root/ (make sure you’re in the home folder of root)

    mkdir work

    cd /root/work/

    mkdir ZDM7

    mkdir ZCM11
  5. In each of the two folders create a folder named “temp”, just as shown above
  6. Copy the file, initrd, from the USB pen drive you just created, to the ZCM11 folder
  7. Copy the file, initrd (the original), from the ZDM7 folder on the USB pen drive, to the ZDM7 folder

    The files you need are now on the Linux machine.

Step four

Extract the original initrd file, from ZDM7.

We need the USBMOUNT.s file from this.

The other configuration changes I’ve copied from these files: zenworks.s and linuxrc.config.

  1. Open a terminal
  2. Make sure you are in the /root/work/ZDM7/ folder

    cd /root/work/ZDM7/

  3. Rename initrd to initrd.gz

    mv initrd initrd.gz

  4. Unzip the initrd.gz file

    gunzip initrd.gz

  5. Extract the files inside initrd to the temp folder

    cd /root/work/ZDM7/temp/

    cpio –idumv < /root/work/ZDM7/initrd >/dev/null 2>%1

    Now do the same with the new initrd file, from the ZCM11 folder.

    The files are now extracted and we can make the needed changes in the files.

Step Five

Now we copy the USBMOUNT.s file and edit the Zenworks.s and linuxrc.config.

  1. From the /root/work/ZDM7/temp/bin folder, copy the usbmount.s file and place it in the /ZCM11/temp/bin/ folder

    If you want to use the terminal:

    cp –r /root/work/ZDM7/temp/bin/usbmount.s /root/work/ZCM11/bin

  2. Edit the zenworks.s file, so it has the usb boot settings. Open this file from both the ZDM7/bin/ and ZCM11/bin/ folders

    gedit /root/work/(ZDM7/ZCM11)/bin/zenworks.s

    From the ZDM7/bin/zenworks.s files copy all from
    “if [ $USBBOOT”a” = “YESa” ] ; then”
    “#run before settings.txt” (this line shall not be included)

    Insert the text in the ZCM11/bin/zenworks.s file, and replace from
    “if [ $CDBOOT”cd” = “YEScd” ] ; then”
    “#run before settings.txt” (this line shall not be replaced)

    Close and save the file

  3. Edit the linuxrc.config file from /root/work/ZCM11/temp/

    gedit /root/work/ZCM11/temp/linuxrc.config

    Edit it so these lines are as listed here:


    Close and save the file

    Now all the files are edited and added.

Step six

Re-pack, zip and recreate the initrd file

  1. Open a terminal
  2. Go to the /root/work/ZCM11/temp folder

    cd /root/work/ZCM11/temp/

  3. Re-pack the file

    find . | cpio –quiet –o –H newc > /root/work/ZCM11/initrd

  4. Zip the new initrd file

    gzip –v9c initrd > initrd.gz

  5. Rename the file

    mv initrd.gz initrd

  6. Copy the new initrd file to the root of your USB Pen drive. (replace the old one)
  7. Delete the ZDM7 folder on the USB pen drive

    All you need to do now is to check if it boots as wanted.

    You can then edit the settings.txt as wanted, just as if it was a boot from the CD.


Additional settings

Changes I’ve made to the settings.txt file, that allows me to get a image from the USB Pen Drive.

First I’ve created a folder in the root of the USB Pen Drive, called “IMG”.

Then I copied the image file to this folder. Here it’s the file named “IMG-WIN7-D.zmg”.

Open the settings.txt file from the USB Pen Drive and put this command to the end of the file.

export IMGCMD=”img -restorel /mnt/usbhd/img/IMG-WIN7-D.zmg”

This will put the image on your device.

If you want to use a script, place your script in the “/addfiles/bin/” folder on the USB Pen Drive. My script is called “Prebootscript.s”.

Open the settings.txt file from the USB Pen Drive and put this command to the end of the file.

export IMGCMD=”/bin/Prebootscript.s”

This will start your preboot script.

3 votes, average: 5.00 out of 53 votes, average: 5.00 out of 53 votes, average: 5.00 out of 53 votes, average: 5.00 out of 53 votes, average: 5.00 out of 5 (3 votes, average: 5.00 out of 5)
You need to be a registered member to rate this post.

Categories: Technical, ZENworks, ZENworks Configuration Management


Disclaimer: This content is not supported by Micro Focus. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.


  1. By:rmeijll

    Very clear instructions! Thanks!

  2. By:marcelvandenberg

    This solution works very well. We tried it with the attached 11.01 files and on a Suse 11.2 Desktop with our own 10.3.4 files.
    We added a script which places all the add-on images on the workstations using hardware detection with the BIOS Productname.

    Additional information:
    We have one thing to solve yet. Ziswin.exe is not able to write anything to the ZISD using this USB stick. Therefore we are not able to use
    Workstation naming as we would like. We use the following commands for this at the end of the script:
    zisview -s >/tmp/
    source /tmp/
    zisedit ComputerName=${SMBIOS_BIOS_ASSET_TAG} DNSHostName=${SMBIOS_BIOS_ASSET_TAG} JustImaged=True

    Many thanks and kind regards. Keep up the good work!

    • By:nop1983

      I appreciate the kind words.
      I’ve looked a little closer to the problem you mention and yes it is good enough. Compared to when you boot from CD, you can not write to ZISD. However this is possible with the ZDM7 Usb boot, so it’s something I’ll give a closer look. But if you find a solution, I’ll would love to hear it 🙂

    • By:marcelvandenberg

      After some testing we found that when booting from the USB stick, ZISWIN.EXE is trying to write to the USB stick and fails. If i remove the USB stick ZISWIN.EXE works as expected. For now, we made the following workaround in our script:

      # Prompt for reboot after placing all the add-on images
      read -p “Imaging is ready. Please remove the USB stick and press [Enter] to restart…”

      # Checking if the USB stick is indeed removed
      while [ -e /mnt/usbhd/syslinux.cfg ]; do
      echo “Please remove the USB stick. The PC wiil automatically reboot afterwards.”
      sleep 5

      # Run ZISEDIT.EXE for Workstation naming AFTER the USB stick is removed
      zisview -s >/tmp/
      source /tmp/
      zisedit ComputerName=${SMBIOS_BIOS_ASSET_TAG} DNSHostName=${SMBIOS_BIOS_ASSET_TAG} JustImaged=True

      • By:nop1983

        Thanks, this is good news. And good you found a work around the problem. Next step; how to get it working as it normally does. This is a great start, thanks.

  3. By:lilodessa

    i’ve been trying a few things to get our zen7 image platform on a large external usb drive -not thinking this article relates to that. Is that possible or just booting up to a thumb drive instead of a cd? I’m trying to boot to my external drive to be able to pull images from it as well.

    • By:marcelvandenberg

      Hi lilodessa,

      In the past we had booting from 8 GB USB Zenworks 7 sticks working and used this as an alternative for PXE Boot on locations with low bandwidth. We were able with bash scripting to push multiple .ZMG files from this stick.
      In time, when new desktops came out we encountered problems with the required SATA and NIC drivers in this Zenworks 7 bootstick and at the end we could only support older desktops.
      With this new Cool Solution Post we are able to boot the latest HP Desktops again, so it definitely works with ZCM10 and 11.

      So you should be able to get booting from USB sticks this to work under Zenworks 7, but you might encounter the same driver problems as we had.
      An idea:
      The author has included all the necessary files for ZCM 11.01. Perhaps you could try and build an USB stick with these files and see if you can get it to work with you current .ZMG files. If you do it right the stick should boot and you do not need the server at all. We can use the USB stick to put .ZMG files on a workstation even without a network connection. Mind you, you might have to try a couple of different sticks, i found out that not all USB sticks work.

      • By:nop1983

        Hi marcelvandenberg

        Did you try to get it working from a larger USB Hard Drive? Perhaps a external Hard Drive connected by USB?
        Sadly I’ve only got a USB Pen Drive on 8GB to test with, so hard for me (right now) to test this 🙁
        But I’m looking for one with more space and an external Hard Drive. I do believe that booting from a external Hard Drive is a bit harder than booting fron a normal USB Pen Drive, since it still is a normal Hard Drive just in an enclosure. 🙂

    • By:nop1983

      Could you specify a little more info on this? Do you want to boot from the large external usb drive? Or do you just wanna mount this after boot from CD or USB? Both is possiple, so let me know what it is you need and I’ll try to describe this for you.

  4. By:lilodessa

    Thanks for the replies -well preferably from the usb external drive -its a 500g drive and I have tried various approaches for instance like making a small bootable partition and another partition for the images and placing config files in the boot partition but no luck so far. All of our systems are ASUS boards and the newest models are the p5kpl boards- We have been pulling our images from a server but have to place Intel nics in for the newer boards to work with our current version. I just want to be able to load images from this new usb external drive for our systems at remote location sites.

    • By:marcelvandenberg

      if i can find the time (some issues with Windows 7/ZCM 10.34 at the moment) i will try to test the same for you what we have achieved on the 8 GB USB stick on a larger 80 GB external USB drive. Just to see if it is possible at all. As mentioned before, it does not work on all USB sticks, so your problem might just be hardware related.
      Using one large FAT32 partition on the USB drive ii see no direct reason (other then specific hardware issues) why this should not work. I will post my results after trying.

      • By:nop1983

        Hi macelvandenberg

        Yes, I do believe it’s an hardware issue… I did though try another version of syslinux on a USB drive that would not boot and it fixed it. So perhaps there could be a difference or maby I was just lucky 🙂
        So I now have this up and running on a 250gb USB Hard drive with a boot partition and a image partition. I’ll upload a new article that shows how it’s done, hopefully this can be usefull to some.

    • By:nop1983

      Hi lilodessa

      I just got this working on a external USB Hard Drive (250GB). I’ve been told to create a new article on the use of the extra partition and in there I’ll inform on the large disks also, hope this will help you to get what you want? 🙂

      • By:marcelvandenberg

        A quick note to inform you guys. I tried it on a Freecom buspowered 80 GB USB external drive (a bit older drive, but the only one i have available at this moment), I managed to get it bootable with one 80 GB FAT32 partition with a few problems though.

        Booting from a HP 5850 SFF workstation the drive boots the complete kernel but stops at the very end when attempting to mount it to /mnt/usdhd. A quick check with ctrl-alt-F4 shows the following message appearing every 2 seconds or so:
        “usb 6-1 reset full speed USB device using obci_hcd and address2”.
        I tried booting it on another type HP workstaton (HP6005 SFF) and had the same problem. The error this time was:
        “usb 6-1 reset full speed USB device using ebci_hcd and address2”.

        I suppose i could use modprobe -r ohci_hcd or modprobe -r ehci_hcd in settings.txt, but then i think i would lose the USB 2.0 performance and imaging would be really slow. So i tried it again with this time “modprobe -r ehci_hcd” in settings.txt and then it boots fine. The disk does however does not get mounted at /mnt/usbhd.
        fdisk -l shows that the workstation see this drive as /dev/sdc1 instead of the /dev/sdb1 entry i had with the 8 GB USB stick. And as i expected. mounting it manually and then starting imaging is really, really, really slow.

        I have no other USB external disk to try so my personal view is that you should be able to get this to work, but definitely not with all hardware. I think that you need the right combination of a specific workstation(s) and externa USB drive, so in the end it looks like a case of try and error.

        This more or less is confirmed by the last post of nop1983, with the exception that he has it working and i still have some problems. I remember reading in the past something about a difference between a bus powered USB drive and a self powered USB drive (with its own power adapter). Perhaps that this might also be an issue? Anyway, i am looking forward to nop1983’s new article :-). Hope you can use this information. Kind regards.

      • By:nop1983

        Hi marcelvandenberg

        Thanks for all the informations you provide, I’ve noted them all and I’ll try to see if I can create these issues myself. The devices I used use power from the USB bus, but if I can find one with it’s own power supply I’ll test at once.
        I have 16 different machines to test the boot on, so in that part I should be covered 😉

        I’m also going to look further into the problem with writing to the Image Safe Data.

        I’ll of course keep you posted, on how it goes.

        Glad to hear, I hope the new article can be usefull.

      • By:lilodessa

        kool -i’m still going through your zenworks usb article steps and looking forward to your newest art.

      • By:nop1983

        …if you run into any problems 🙂

        Thanks, I’m also looking forward, to see if it’s useable to some 🙂

  5. By:hsdoctor

    If you want to use the terminal:

    cp –r /root/work/ZDM7/temp/bin/usbmount.s /root/work/ZCM11/bin
    Edit the zenworks.s file, so it has the usb boot settings. Open this file from both the ZDM7/bin/ and ZCM11/bin/ folders

    gedit /root/work/(ZDM7/ZCM11)/bin/zenworks.s

    Was the /temp/ left out of these paths on purpose? Just wondering because something is missing then…..

  6. By:mark7508

    a two step process instead is to download unetbootin and boot cd iso. I’ll make a couple screenshots later. only one file to change while in windows.