Article
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:
http://www.novell.com/communities/node/13605/zenwo...
Inspiration
To get where I ended, I went through this great solution and made my own modifications: http://www.novell.com/coolsolutions/tools/18294.html
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:
- Zen71usb = from here http://www.novell.com/coolsolutions/tools/18294.html (the download link is found here)
- HPUSBF = Free from: ftp://ftp.hp.com/pub/products/servers/supportsoftware/ZIP/HPUSBF.exe but also included in the Zen71usb download.
- Syslinux = Free from: http://www.kernel.org/pub/linux/utils/boot/syslinux/ but also included in the Zen71usb download.
- ZENworks preboot files from your own environment or get the latest Imaging Driver Update from http://download.novell.com
- A PC installed with Windows XP /7.
And/or
A Linux machine
(In my example I'm using laptops with Windows 7 and OpenSUSE 12.1.)
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.
- Connect the USB to your computer
- Open a command prompt and execute:
C:\USBIMAGE\zen71usb\utils\HPUSBF.exeYour USB pen drive is shown, note the ID's.
- On the command prompt run this:
C:\USBIMAGE\zen71usb\utils\HPUSBF.exe HD2 -FS:FAT -QNow 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.
- 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.
- 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)
- Now, create a new folder on the US pen drive, named ZDM7
- Copy the file, initrd, from C:\USBIMAGE\zen71usb\data\ to the new folder (ZDM7)
- 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
- Copy the files, root and root.fonts from C:\USBIMAGE\bootcd\boot\i386 to F:\boot\i386
- 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.
- 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.
- Log in as root
- Go to the Home folder of root
- Create a folder named "Work"
- 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 - In each of the two folders create a folder named "temp", just as shown above
- Copy the file, initrd, from the USB pen drive you just created, to the ZCM11 folder
- 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.
- Open a terminal
- Make sure you are in the /root/work/ZDM7/ folder
cd /root/work/ZDM7/
- Rename initrd to initrd.gz
mv initrd initrd.gz
- Unzip the initrd.gz file
gunzip initrd.gz
- 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.
- 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 - 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"
To
"#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"
To
"#run before settings.txt" (this line shall not be replaced)Close and save the file
- 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:
NetSetup=dhcp,all
ScsiBeforeUsb=0
insecure=1Close and save the file
Now all the files are edited and added.
Step six
Re-pack, zip and recreate the initrd file
- Open a terminal
- Go to the /root/work/ZCM11/temp folder
cd /root/work/ZCM11/temp/
- Re-pack the file
find . | cpio –quiet –o –H newc > /root/work/ZCM11/initrd
- Zip the new initrd file
gzip –v9c initrd > initrd.gz
- Rename the file
mv initrd.gz initrd
- Copy the new initrd file to the root of your USB Pen drive. (replace the old one)
- 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.
Enjoy.
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.
| Attachment | Size |
|---|---|
| zcm111usbboot.zip | 60.82 MB |
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
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, test, test before you do anything drastic with it.
Related Articles
User Comments
- Be the first to comment! To leave a comment you need to Login or Register
No problem
Submitted by nop1983 on 23 January 2012 - 11:03am.
You're welcome, just glad if someone can use it.
- Be the first to comment! To leave a comment you need to Login or Register
Very nice
Submitted by marcelvandenberg on 27 January 2012 - 8:35am.
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/zisviewinfo.sh
source /tmp/zisviewinfo.sh
zisedit ComputerName=${SMBIOS_BIOS_ASSET_TAG} DNSHostName=${SMBIOS_BIOS_ASSET_TAG} JustImaged=True
Many thanks and kind regards. Keep up the good work!
- Be the first to comment! To leave a comment you need to Login or Register
Thanks
Submitted by nop1983 on 30 January 2012 - 3:36am.
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 :)
- Be the first to comment! To leave a comment you need to Login or Register
Additional info
Submitted by marcelvandenberg on 30 January 2012 - 8:30am.
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
done
# Run ZISEDIT.EXE for Workstation naming AFTER the USB stick is removed
zisview -s >/tmp/zisviewinfo.sh
source /tmp/zisviewinfo.sh
zisedit ComputerName=${SMBIOS_BIOS_ASSET_TAG} DNSHostName=${SMBIOS_BIOS_ASSET_TAG} JustImaged=True
- Be the first to comment! To leave a comment you need to Login or Register
Good info
Submitted by nop1983 on 30 January 2012 - 11:11am.
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.
- Be the first to comment! To leave a comment you need to Login or Register
usb image
Submitted by lilodessa on 9 February 2012 - 6:05pm.
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.
- Be the first to comment! To leave a comment you need to Login or Register
Booting from Zenworks 7
Submitted by marcelvandenberg on 13 February 2012 - 1:17am.
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.
- Be the first to comment! To leave a comment you need to Login or Register
Large USB Hard Drives
Submitted by nop1983 on 14 February 2012 - 1:27am.
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. :)
- Be the first to comment! To leave a comment you need to Login or Register
More info?
Submitted by nop1983 on 13 February 2012 - 5:29am.
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.
- Be the first to comment! To leave a comment you need to Login or Register
usb image
Submitted by lilodessa on 13 February 2012 - 12:27pm.
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.
- Be the first to comment! To leave a comment you need to Login or Register
re: usb image
Submitted by marcelvandenberg on 14 February 2012 - 3:09am.
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.
- Be the first to comment! To leave a comment you need to Login or Register
Syslinux etc.
Submitted by nop1983 on 14 February 2012 - 1:34pm.
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.
- Be the first to comment! To leave a comment you need to Login or Register
- Be the first to comment! To leave a comment you need to Login or Register
re: Success with large Hard Drive
Submitted by marcelvandenberg on 15 February 2012 - 1:44am.
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.
- Be the first to comment! To leave a comment you need to Login or Register
Noted :)
Submitted by nop1983 on 15 February 2012 - 3:30pm.
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.
- Be the first to comment! To leave a comment you need to Login or Register
New article ready
Submitted by nop1983 on 22 February 2012 - 3:08pm.
Just got published:
http://www.novell.com/communities/node/13605/zenwo...
- Be the first to comment! To leave a comment you need to Login or Register
success with large hard drive
Submitted by lilodessa on 15 February 2012 - 7:18am.
kool -i'm still going through your zenworks usb article steps and looking forward to your newest art.
- Be the first to comment! To leave a comment you need to Login or Register
Please tell...
Submitted by nop1983 on 15 February 2012 - 3:33pm.
...if you run into any problems :)
Thanks, I'm also looking forward, to see if it's useable to some :)
- Be the first to comment! To leave a comment you need to Login or Register






19