Tool
Install ZENworks Image Engine on USB using UNetBootin
Quick tool to install the bootcd.iso (ZENworks 11.1), using Unetbootin, onto a USB Pen Drive.
UNetbootin is an excellent tool to create bootable USB Pen Drives. In this guide I use UNetbootin to put the bootcd.iso file onto a USB Pen Drive and then use this instead of using a CD.
Out of the box this installation script will create a bootable USB, with UNetbootin launching the ZENworks Imaging engine. From this you can pull images from a Proxy Server, launch a preboot script and pull images from the local USB Pen Drive.
Read the settings.txt and PrebootscriptUSB.s files (attached) to see more.
This only takes about 5-10 minutes, all depending on how much you want to do from the USB Pen Drive. Reading this will probably take longer than the execution :)
Things you need:
The files attached (USBIMAGE.zip)
Bootcd.iso: from your own environment or get the latest Imaging Driver Update from http://download.novell.com
(the Bootcd.iso attached to this, is from the ZCM11.1 sept. driver update. So if you are on this version, no need to replace it)
A Windows PC with PowerShell 2.0
Software used: UNetbootin: free download from http://unetbootin.sourceforge.net
Inspiration found at: http://www.novell.com/coolsolutions/tools/18294.html
Novell ZENworks 7/11 documentation.
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 in this guide are located in C:\USBIMAGE\
Step one
Extract the attached files to "C:\" (Very important the path is "C:\USBIMAGE\")
Step two
If needed, paste your own bootcd.iso file to "C:\USBIMAGE\"
(tested with iso files from 10.3.3, 11.1a, 11.2)
If you want to edit the settings.txt file, use the file (template) from "C:\USBIMAGE\setting\". I've edited this, so it works with local imaging from the USB Device.
You can then manually add it to the bootcd.iso, using eg. MagicISO. Or just leave it in the setting folder, the file, from "C:\USBIMAGE\setting\", will automatically be copied to the USB during installation.
Step three
Add, if any, your own images and/or prebootscripts.
If you want to pull images from the USB, you can use the "PrebootScriptUSB.s" script file as your template. If you want to pull images from a PROXY, just active the PROXY part.
Place your images (.zmg files) in the folder "C:\USBIMAGE\IMAGES\IMG\"
If you use addon-images, you could place them in the addon folder. All depending on how you want the structure. I place mine in this folder, as you can se in the attached example of a preboot script.
Place your preboot-script (.s file) in the folder "C:\USBIMAGE\Scripts\PreBoot\"
Feel free to use my example and modify it so it fits your demands.
Step four
Connect the USB Pen Drive to your PC.
Warning! You must only connect one USB device to the PC. All content on it will be erased.
Step five
Run the installation.
YOU NEED TO BE LOCAL ADMINISTRATOR TO RUN THIS WITH SUCCESS
Execute the file: C:\USBIMAGE\RunScript.bat
This will run a PowerShell script. This formats the drive, runs UNetbooting and copies the edited and needed files.
Just follow the few instructions on the screen :)
The windows should look like this:
When the window is closed your done.
Now your USB Pen Drive is ready.
Enjoy!
Note: if you experience any problems with the detection of the USB Pen Drive during boot, you should look into the syslinux.cfg file and change this part so it fits your device:
install=hd:/dev/sdb1 root=/dev/sdb1
(Could instead be "install=hd:/dev/sdb root=/dev/sdb")
Any ideas of enhancement regarding this tool is welcome.
| Attachment | Size |
|---|---|
| usbimage.zip | 65.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
- How to start the ZENworks 11.1 imaging from a USB drive instead of using PXE or the boot CD
- ZENworks 11.1 imaging on a USB drive, with an additional partition for large image files
- Create a Linux Bootable USB Drive
- Creating a bootable USB thumbdrive with the PlateSpin Migrate take control ISO
- ZENworks Imaging using a USB Pen Drive
User Comments
Perfect ...
Submitted by bj05 on 2 February 2012 - 3:34am.
Great work!
Just download, unzip, edit settings.txt and launch the bat - thats all and it works perfectly!
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
Good...
Submitted by nop1983 on 2 February 2012 - 12:26pm.
... to hear. I did hope it could ease the workflow using this, so glad to know you had success doing so.
Thanks :)
- Be the first to comment! To leave a comment you need to Login or Register
File Size
Submitted by eroemer on 29 March 2012 - 7:45am.
Is it possible to modify this so that it creates a FAT32 BOOT partition and also an EXT4 IMAGE partition on the same USB drive? My image files are >4GB so they won't work when I try to place them in the IMG directory when using FAT32.
As an alternative, could I create a USB drive using this process, then use GParted to resize the FAT32 BOOT partition and add an EXT4 IMAGE partition? If so, what would I need to modify to get it to recognize/mount the EXT4 IMAGE partition on boot-up?
- Be the first to comment! To leave a comment you need to Login or Register
Tried this...?
Submitted by nop1983 on 29 March 2012 - 3:17pm.
Hi eroemer
Have you tried this solution:
http://www.novell.com/communities/node/13605/zenwo...
I know it's not as automatic as this one, but it makes you use your large image files.
- Be the first to comment! To leave a comment you need to Login or Register
Tried this..
Submitted by eroemer on 2 April 2012 - 12:35pm.
I tried that method a few times, but for some reason never have been able to get a bootable disk. Your automated method is the only method I have had any success with.
I was going to try and use the automated method on an 80 GB USB HD, but can't get it to run with a HD, only with a flash drive. I then wanted to use a 32GB USB flash drive. I was thinking I could use the automated method on the 32GB flash drive, then use Gparted to resize the FAT32 partition and add an EXT4 partition for the images. I would then likely have to modify some boot file so it would mount the EXT4 partition. Any suggestions?
- Be the first to comment! To leave a comment you need to Login or Register
Spoilers (you're right eroemer)
Submitted by ethanspoelstra on 10 May 2013 - 12:02pm.
eroemer, you are exactly on the right track with your thinking. I actually accomplished this using the Suse Linux Enterprise Desktop default install and the Partitioner tool available through Yast. I simply shrunk the fat32 partition down to 1GB (could go smaller but I might put other tools in here), and then created an ext3 partition to fill the rest of the disk.
In settings.txt I changed this portion to create another folder and mount the second partition.
# Mount your USB Pen Drive, so your script and images can be located. Don't mind the errors at the linux promt on imaging.
mkdir /usbhd
mount /dev/sdb1 /usbhd
mkdir /usbhd2
mount /dev/sdb2 /usbhd2
In the PrebootScriptUSB.s I made the following changes.
#Because we reimage existing computers to upgrade to Windows 7
WSNAME=`zisview ComputerName`
WSNAME=$WSNAME
#Because we have all DELL laptops and desktops
### Add-on Image ###
MODEL=`hwinfo --bios | grep Product`
case $MODEL in
*E4200*)
ADDON=Win7-Addon-E6x00-Px4xx-x64.zmg
;;
*E4300*)
ADDON=Win7-Addon-E6x00-Px4xx-x64.zmg
;;
*M6700*)
ADDON=Win7-Addon-P67xx-x64.zmg
;;
*990*)
ADDON=Win7-Addon-Optiplex-390-790-990-x64.zmg
;;
*)
echo "Unknown model ($MODEL) aborting..."
reboot
exit 1
;;
esac
#Portion for local imaging
# I use the shortened commands with a dash "-" because they are the only ones that have worked for me consistently when typing or scripting commands. Depending how you install Windows (XP or 7) you may not need the -size=100 or -pc2 commands, those create the System boot partition that Windows 7 uses by default.
#Deletes all existing partitions
img -pd-all
#Creates a boot partition of 100MB
img -pc1 -type=ntfs -size=100
#Makes the boot partition active aka bootable
img -pa1
#Creates a Windows partition on the rest of the disk (size is overridden by what's in your image)
img -pc2 -type=ntfs
#Applies all the partitions from a Windows image to the newly created partitions
img -rl /usbhd2/Win7-Base-Clean-MAK.ZMG
#Applies the model specific addon file containing drivers etc.
img -rl /usbhd2/$ADDON
#Applies an unattend.xml addon for sysprep customization.
img -rl /usbhd2/Win7-Addon-SOS-unattend-sr0.xml.ZMG
#Applies an addon that contains the Zenworks Adaptive Agent
img -rl /usbhd2/Win7-Addon-ZenworksAdaptiveAgent-x64.zmg
One thing I've noticed is I feel like this whole Unetbootin process may not be using the Tuxera enhanced NTFS driver, even though I specified to use the tntfs_bootcd.iso for the script and it appears to have put the tntfs.ko in the addin folder. This might require an extra module loaded that doesn't get called, but I haven't had time to dig into it yet.
- Be the first to comment! To leave a comment you need to Login or Register
Follow-up ?
Submitted by eroemer on 2 April 2012 - 12:45pm.
I am not real familiar with various file systems for boot devices---is there a reason the boot partition on the USB device is formatted using FAT32 and not NTFS or EXT4? Can a USB device be bootable if it is NTFS or EXT4?
- Be the first to comment! To leave a comment you need to Login or Register
Does not run on NTFS or EXT...
Submitted by nop1983 on 10 April 2012 - 1:39am.
Hi eroemer
It would be nice if it could run on one of these file systems... but since that's not the case, we are limited by the file size FAT16/32 supports.
- Be the first to comment! To leave a comment you need to Login or Register
Great project, certainly could automate the process but...
Submitted by nlandas on 30 March 2012 - 7:49am.
Great project and thank you for doing this for the community.
Is there any way to convince you to modify the script to allow one to specify the drive letter to use? I have multiple external USB 3.0 hard drives on my management system and can't unhook them to create a bootable USB. I looked at the PowerShell code but I'm not familiar with it.
It looks like I might be able to change
$wmi = Get-WmiObject -Class win32_volume -Filter "driveletter = '$diskdrive'"
to
$wmi = "g:"
But I'm a little nervous to experiment on a live system
- Be the first to comment! To leave a comment you need to Login or Register
You're right...
Submitted by nop1983 on 30 March 2012 - 2:32pm.
Hi
Now haven't tested it yet, but it should work. If you change the variable "$diskdrive" to the right driveletter, it would go through the hole script. It's the $diskdrive that's used when the files are copied etc. The format should be "X:".
If you can wait, I'll be happy test on monday ;-)
- Be the first to comment! To leave a comment you need to Login or Register
I think the modification could benefit a lot of us...
Submitted by nlandas on 2 April 2012 - 6:54am.
Thank you for the help. I ended up playing around and putting another keyboard pause in before anything would be formatted or written. I was able to hard code it to do my memory key without over-writing my hard drivers.
It would be wonderful if the script simply prompted you to type in the drive letter. The Powershell script could still display what drives were available and then just prompt for input of the drive letter.
As a side note, I'm forgetting something on the "bootcd" configuration, the USB key keeps prompting to create the zen partition and it can't be bypassed to get to a shell prompt and run img commands. I commented out the partition size in the settings.txt file, I guess I've forgotten my zenfu over the years. Our bootcds don't require us to create zen partitions but just go to a manual prompt, any suggestions?
Thanks again,
-Nyle
- Be the first to comment! To leave a comment you need to Login or Register
Could work...
Submitted by nop1983 on 10 April 2012 - 1:31am.
Sure it would proparbly works just fine... the reason why I did not create a "grep" function is that I wanted to make a fully automatically method. If you want, I'll see to make a new version and make it a little more changeable ;)
The last part, I've not seen before... Does it crash before getting to the prompt part?
Thanks.
- Be the first to comment! To leave a comment you need to Login or Register
Digital signing error
Submitted by PruittJ on 29 June 2012 - 11:29am.
I get a digital signature error from CreateUSB.ps1 and the process then fails.
- 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




14