Cool Solutions

ZENworks 7 Imaging from USB drives using EXT2 partitions



By:

October 26, 2007 3:37 pm

Reads:7,951

Comments:1

Score:5

By Rich Bryant

How to use a large external USB drive for ZENworks 7 Disconnected Imaging using EXT2 partitions

This is an expansion on the tip for disconnected imaging with a USB hard drive. I added in how to create an EXT2 partition on the USB drive so you can image to the USB drive, and not just from it. This tip can also be modified to create a hidden EXT2 partition on the local drive of the PC to store a local copy of an image if needed.

I have come up with steps to facilitate using a large external USB Hard drive for ZENworks 7 Disconnected Imaging. It utilizes the ZENworks CD software modified to run on USB storage devices and sets up a data volume formatted with EXT2 to allow imaging to and from the USB hard drive.

Requirements for the process:

  • ZEN71USB Cool Tool
  • External USB hard drive
  • PC with Windows XP
  • EXT2FSD – available at http://ext2fsd.sourceforge.net/
  • Computer that will boot from USB to image

Now, the fun stuff:

I can’t guarantee this will work on every external USB hard drive, but should work on most. You may get the best results if you use a USB hard drive that doesn’t require any drivers or software to access it.

WARNING: this process will wipe out any data you currently hold on your USB hard drive. You will be formatting drives which will erase all data on them, so if you don’t want to lose it, back it up before proceeding or get another drive. Additionally, I take no responsibility if these directions are used on the wrong drive by mistake!

NOTE:

When imaging, if your USB hard drive is on anything other than sda1, you will need to modify the syslinux.cfg on your USB boot volume. Change the info in each section at install=hd:/dev/sda1 root=/dev/sda1 to reflect the location of your USB hard drive.

Also when you mount the EXT2 drive for imaging, you will need to modify the mount command at step 13 to reflect the device location. Quickest way to find out what device the USB is on is to boot with the CD to Manual, insert the USB storage device and at the bash# use the command IMG DUMP.

ADDITIONAL NOTE:

You can use this method as well to put on a EXT2 partition on the hard drive of the computer you are imaging, so you can store an image on the computer and access it for local imaging. If running Windows, the computer will never see the EXT2 partition. It will only be available when running the imaging process.

For this, we will set up a 50 MB FAT volume that will act as our boot volume, and a 20 GB EXT2 volume that will hold our images. I use FAT for the first volume so that we can use SYSLINUX to make the volume bootable to the ZENworks imaging environment. I use EXT2 for the DATA volume to support the large volume size as wall as imaging to the USB hard drive. After installing EXT2FSD, I can copy the images from the XP workstation to the USB hard drive, and the ZENworks imaging environment can read and write to EXT2 volumes so we can work with the images from there without being limited by size.

Here is the step by step:

  1. Plug in your external USB hard drive that you will use for the imaging process into a Windows XP computer that has the ZEN71USB tool loaded on it.
  2. Open up the Computer Management found in START/SETTINGS/CONTROL PANEL/ADMINISTRATIVE TOOLS, or Right click on My Computer and select MANAGE.
  3. Select the Disk Management under Computer Management (Local)/Storage
  4. Find the USB drive. Here it is listed as DISK 2.

    bryant1_0.gif

    (Click to enlarge)

  5. Right-click on the partition and select New Partition.
    1. Click Next at the wizard.
    2. Accept the default of Primary Partion, and click Next.
    3. Change the partition size to 50 MB.
    4. Assign a drive letter. For this example I will use U. Click Next.
    5. Format the partition as FAT, Default allocation unit size, and change the Volume Label to read ZENworks, click Next.
    6. Click Finish to create the volume.
    7. Leave the Computer Management console open for step 8.
  6. Sys the newly created drive with syslinux.
    1. Open a DOS Prompt
    2. Run the command to sys the drive U created in Step 5:
      c:\ZEN71USB\UTILS\SYSLINUX.EXE ?f U:
      NOTE: You may get an error when running the command. If so, click IGNORE and the command should complete successfully despite the error.
  7. Copy over the contents of the \ZEN71USB\DATA directory to the U: drive. Edit the Settings.txt as needed.
  8. Go back to the Computer Management Console and set the U: as Active
    1. Right click on the ZENworks U: partition and select Mark Partition as Active.
  9. Create the EXT2 data partition on your USB drive to hold your images.
  10. On a computer, attach and boot to the USB hard drive and select MANUAL.
  11. At the bash# run the command IMG DUMP and make note of the partitions. SDA1 may not be listed as it is the boot partition and may already be mounted. For this example the USB hard drive is at SDA and we will use the partition SDA2 at position 5 for our EXT2 partition.
  12. Exit out of the imaging screen.
  13. Create the 20 GB EXT2 partition from the bash#
    # img pc5 ext2 20000
  14. Format the partition with EXT2
    # mkfs ?t ext2 ?m 0 /dev/sda2
  15. The usb drive now has the EXT2 partition on it and you can image to and from it.
  16. Install EXT2FSD as per their instructions on your Windows PC to allow access to the EXT2 partition from a Windows PC. Make sure the EXT2FSD service is started.
    1. Attach the USB hard drive to the Windows PC and run EXT2MGR
    2. Right click on the EXT2 partition and select CHANGE Drive Letter and click ADD to assign a drive letter, I’ll use T:
    3. You can now work with the images on the EXT2 partition from a Windows PC.
      NOTE: if you were running Linux, you wouldn’t have to go through this. Linux works with EXT2 volumes just fine with no additional software to install.
  17. bryant2_0.gif

    (Click to enlarge)

  18. Connect the USB drive to the machine that will be imaged and boot it.
    NOTE: make sure that your computer supports booting to the USB device and is set to do so in the BIOS.
  19. At the boot menu, select MANUAL.
  20. At the BASH # type in:
    mount /dev/sda2 ?t ext2 /mnt/harddisk
    NOTE: the /dev/sda2 is your second EXT2 volume. If it’s something other than sda2, you will need to change the command to reflect this.

    IMPORTANT NOTE ABOUT IMAGING: Yes, this is important!
    Because of the nature of the imaging process, if you use the command line incorrectly, the automatic process or through the GUI to do your imaging, it can wipe off the boot partition from the USB drive or other unmounted drives in this process. It will not touch the EXT2 volume because it is mounted at the time of imaging. If you image your computer and do not take the following steps, you will add more work for yourself. Worst case is you have to repeat steps 1-8 to get your boot partition back and or re-create any other partitions on other drives. Here are some tips that you can do to prevent this from happening:

    1. Write protect the USB hard drive when imaging from the USB hard drive. Un-protect the USB drive any time you want to make changes to the ZENworks partition or add/remove images from the EXT2 partition.
    2. If you can’t write protect the drive because you will be imaging to the EXT2 partition, use the IMG command to select what partitions get wiped and imaged.
      Ex: img rl /mnt/harddisk/myimage.zmg a1:p1
    3. If you need to be more thorough you can:
      1. Delete the first partition: Img pd1
      2. Create the first partition: Img pc1 NTFS
      3. Set the first partition active: Img pa1
      4. Put the image on the partition: Img rl /mnt/harddisk/myimage.zmg a1:p1
  21. To image your computer from the GUI, if your USB hard drive is write protected.
    1. Type in IMG at the bash# and hit enter.
    2. Select Imaging and Restore Image.
    3. Select local.
    4. Type in the path to your image. (ex: /mnt/harddisk/myimage.zmg)
      NOTE: If you browse to the file, it may not be listed, so type in the path to the image.
    5. Begin imaging.
  22. Image to the USB hard disk
    1. Type in IMG at the bash# and hit enter.
    2. Select Imaging and Make Image
    3. Select local
    4. Type in the path to save your image. (ex: /mnt/harddisk/myimage.zmg)

    You can also perform this at the command line:
    Ex: img ml /mnt/harddisk/myimage.zmg x2

You can create a script to facilitate the mounting and automatically pushing out of the image (steps 13 & 14) if you so feel. You can put them in the /addfiles/bin folder and they’re accessible to the imaging environment.

1 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 5 (1 votes, average: 5.00 out of 5)
You need to be a registered member to rate this post.
Loading ... Loading ...

Tags:
Categories: Uncategorized

Disclaimer: This content is not supported by Novell. 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 Comment

  1. By:di6parn

    It would be nice if someone could update this with instructions/files for ZCM 10/11 imaging engine. I tried to simply replace the files, but that didn’t work.

Comment

RSS