Advanced Imaging

When the workstation boots the Linux partition and you request to enter manual mode, you have the following commands available. The following describes the minimal keystrokes to get the command functional.

Remember that you are running on top of the Linux operating system and that any normal Linux command is valid on the command line. This enables you the freedom to use any command to help in the setup and configuration of the workstation. For example, you can see a listing of files (ls -FC) or mount a drive (mount /dev/hdc /mnt/cdrom). Any Linux utility can be run on the workstation.

Accessing the Imaging Engine Command Menu

You can access operations available in the imaging engine from the command menu. To access the command menu, use the img command with no parameters; a menu appears where you select the operation you want to perform.

Information Commands

The following general-purpose commands display information about the system.

  • img help [mode] This displays a help screen to remind you about some of the commands. It does not display an exhaustive list of available commands. The optional mode parameters are m to display information on the make mode, and p to display information on the partition mode.

    Example:

    img help p
  • img info [zisd] This displays the detected hardware information. This is useful to determine the values for the rules in the policies. The engine sends this information to the imaging server. The optional zisd parameter lists the data currently stored in the image-safe area on the computer and the last base image that was put down to the workstation.

    Example:

    img info zisd

Automation Commands

Automatic mode images the computer automatically based on any applicable NDS or eDirectory policies and settings. In this mode, the imaging engine queries the imaging specified in the PROXYADDR environment variable for any work to do. The imaging server checks the relevant NDS or eDirectory policies and settings to determine which imaging tasks should be performed. The following command causes the imaging engine to connect to the imaging server and perform any actions that are specified in NDS or eDirectory:

img auto

This command sends a request to the imaging server to determine whether any work needs to be performed. If work must be performed, the imaging server immediately performs the work. The following codes are returned to the Linux shell upon completion: 0 no work to perform; 0 successful imaging task completed, no change to the hard drive; 1 successfully received one or more images, the hard drive has been altered; n other error codes. Here's an example:

img auto

Partition Commands

The following commands deal with manipulation of the partitions on the workstation.

  • img dump Displays the partition information of the hard disk. This command is important because the partition numbers displayed from this command are used as parameters to other advanced imaging commands.

    Example:

    img dump
  • img dump geo Displays the partition information of the hard disk and the geometry of the disk. This command is important because the partition numbers displayed from this command are used as parameters to other advanced imaging commands.

    Example:

    img dump geo
  • img pa<partition number> Makes the specified partition the active partition. The partition number is the partition number returned from the img dump command.

    Examples:

    img pa2img pa1
  • img pc<partition number> <partition type> [partition size] [cluster=<cluster size>] Creates a partition in an empty slot. The partition number is the partition number returned from the img d command. The command fails if the partition specified is not empty. The partition type must be one of the following: fat12, fat16, fat32, or ntfs. The partition size parameter is optional and represents the number of megabytes requested. If the size is not given, the largest partition size possible for the specified type is created. The cluster size is only supported for NTFS partition types; for the FAT partitions the cluster size is determined automatically by the size of the partition.

    When a partition is created, the ZENworks imaging engine performs some low-level pre-formatting. This pre-formatting process is dependent upon the actual file system being created. It is usually a subset of the formatting process performed on new partitions by the various operating systems, but it is not enough to be recognized as a valid partition by those operating systems. It is only formatted enough to enable the imaging engine to start inserting files into the partition. At least one base image must be applied to the partition before it is recognized by the operating system.

    Examples:

    img pc2 ntfs 500 c8img pc3 fat32img pc4 NTFS 2000 cluster=1
  • img pd<partition number> Deletes the specified partition from the hard drive.

    Example:

    img pd3

Creating Image Commands

The following commands deal with the creation of workstation images:

  • img makel[partition number] <path> [comp=<comp level>] [x<partition number>] Makes an image of the disk and places it in the local file system. The optional partition number represents the partition where you want to store the image. This specified partition is not included in the image. If no partition is specified, all partitions (except the Linux boot partition) are imaged and the image is stored on the Linux partition. The path must resolve to a valid path on the system no directories are automatically created, and any existing file with the same name is overwritten.

    By specifying the partition number used to store the image, you can use an attached Jaz drive, which shows up as a partition and then stores the image of the hard drive on your removable media. The comp parameter specifies the amount of compression used when storing the image. Valid compression levels are from 0-9, where 0 is no compression for optimized speed and 9 indicates full compression optimized for space. Use 6 to balance between space and speed. The x<partition number> option excludes the partition specified from the image. You can exclude as many partitions as you need to reduce the imaging size and time.

    Examples:

    img makell2 imgdump.zmgimg makel fulldumpimg makel /images/wsdump.zmg comp=6 x2 x3
  • img makep <imaging server address> <UNCpath> [comp=<comp level>] [x<partition number] Takes an image of the workstation and sends that image to the specified imaging server. This imaging server address is the actual IP address (not the DNS name) of the imaging server. The UNC path is where the image is stored on that imaging server. The path must resolve to a valid path on the system no directories are automatically created, and any existing file with the same name is overwritten. The UNC must have the format of //server name/dir/dir.../filename (make sure you use the forward slashes). If the suffix .ZMG is not specified, it is automatically appended to the filename. The server name is really ignored because the image is sent and stored on the imaging server specified by the IP address. The comp parameter specifies the amount of compression used when storing the image. Valid compression levels are from 0-9, where 0 is no compression for optimized speed and 9 means full compression optimized for space. Use 6 to balance between space and speed. The x<partition number> option excludes the partition specified from the image. You can exclude as many partitions as you need to reduce the imaging size and time. The server name might be used at some future release.

    Examples:

    img makep 137.65.203.1 //zen1/vol1/images/dellb.zmgimg makep 137.65.203.254 //zen2/vol2/ibmlaptopimg makep 137.65.79.123 //zen2/vol2/ntws.zmg comp=9 x2

Restoring Image Commands

The following commands deal with restoring images onto the workstation. These commands might destroy previous data on the workstation.

  • img restorel[partition number] path [s<set number>] Restores an image from the partition and path specified onto the disk. All partitions on the hard disk, other than the Linux partition, are removed prior to the image being placed on the workstation. The optional partition number specifies the partition (as displayed in the img d command) where the image is stored. The path must resolve to a valid image file on the system. If you are restoring from a removable media drive, the partition number is the partition for the Jaz or CD-ROM drive. The path must be valid and must represent an image file on the specified partition. The optional set number enables you to specify which set of files to include from the image. The sets can be specified in the ZENworks Image Editor program. If the set number is not specified, it is assumed that it is set 1.

    Examples:

    img restorel2 myimageimg restorel theimage.zmg s2
  • img restorep <proxy IP address> <UNCpath> [s<set number>] Takes an image from the imaging server and puts it on the workstation. The proxy IP address must be the address of the imaging server where the image is stored. You cannot use a DNS name in this field. The UNC path must be a valid path that represents the image file. The path must be the format //server name/share/dir/dir.../filename or //server name/volume/dir/dir.../filename. The optional set number enables you to specify which set of files to include from the image. The sets can be specified in the ZENworks Image Editor program. If the set number is not specified it is assumed that it is set 1.

    Examples:

    img restorep 137.65.200.1 //zen9/image/delllaptop.zmgimg restorep 137.65.200.1 //any/image/delllaptop.zmg s2
Advanced Restoring Image Commands

These advanced image restore commands enable you to specify that the partitions on the disk should not be destroyed and how to map the partitions in the image to the partitions on the disk. Additionally, when images are restored the partitions are automatically resized to fit the archived partition. In these commands, the physical partition can remain larger than the archived partition.

  • img restorel[partition number] path [s<set number>] a<archive partition>:p<physical partition> Restores an image from the partition and path specified onto the specified partition on disk. This does not destroy the partition, but instead takes the archived partition and places its files into the specified partition. Any files already existing on the partition remain; files with the same name are overwritten. The optional partition number specifies the partition (as displayed in the img d command) where the image is stored. The path must resolve to a valid image file on the system. If you are restoring from a removable media drive, the partition number is the partition for the Jaz or CD-ROM drive. The path must be valid and must represent an image file on the specified partition. The optional set number enables you to specify which set of files to include from the image. The sets can be specified in the ZENworks Image Editor program. If the set number is not specified it is assumed that it is set 1.

    The a<archive partition>:p<physical partition> option enables you to create a mapping between the two drive spaces. You can take archived partition 1 and place it on physical partition 2, for example. You must specify at least one partition mapping to keep from having the default, wipe all partitions, behavior. You can specify as many mappings as are needed and you can map multiple archive partitions onto a single physical partition. An archive partition cannot be mapped to more than one physical partition.

    Examples:

    img restorel2 myimage a1:p2img restorel3 theimage.zmg s2 a1:p2 a2:p2
  • img restorep <proxy IP address> <UNCpath> [s<set number>] a<archive partition>:p<physical partition> Takes an image from the imaging server and puts it on the workstation into the specified partition. The proxy IP address must be the address of the imaging server where the image is stored. You cannot use a DNS name in this field. The UNC path must be a valid path that represents the image file. The path must be the format //server name/share/dir/dir.../filename or //server name/volume/dir/dir.../filename. The optional set number enables you to specify which set of files to include from the image. The sets can be specified in the ZENworks Image Editor program. If the set number is not specified it is assumed that it is set 1.

    The a<archive partition>:p<physical partition> option enables you to create a mapping between the two drive spaces. You can take archived partition 1 and place it on physical partition 2, for example. You must specify at least one partition mapping to keep from having the default, wipe all partitions, behavior. You can specify as many mappings as are needed and you can map multiple archive partitions onto a single physical partition. An archive partition cannot be mapped to more than one physical partition.

    Examples:

    img restorep 137.65.200.1 //zen9/image/delllaptop.zmg a2:p1img restorep 137.65.200.1 //any/image/dtop.zmg s2 a2:p2 a3:p2

ZENPartition Commands

You can use the ZENPartition mode to enable, disable, or remove the installed ZENworks for Desktops imaging partition from the workstation. This allows you to control the behavior of ZENworks imaging on the workstation.

The following are the commands available for the ZEN partition mode:

  • zenPartition enable Enables the ZENworks imaging partition.

  • zenPartition disable Disables the ZENworks imaging partition to stop imaging on the workstation.

  • zenPartition remove Removes the ZENworks imaging partition from the workstation to permanently stop imaging on it.

    Example:

    img zenPartition enable

Multicast Commands

You can also set up the ZENworks Imaging system to perform image multicasting. You can set up a single workstation to act as the master and send its hard drive contents to all the participating slave workstations.

You start the multicast session by entering the following on all workstations that are participating on the session:

img session <session name> [option]

The following options are available for the img session name:

  • name Specifies the name of the multicast session that each computer joining the session will use.

  • master|client Specifies whether this client will be the session master or just a client. If you do not use this parameter, the system will wait until a master is found.

  • clients=<count> Specifies the number of computers that must be registered with the master before imaging will begin. Once imaging has begun, computers attempting to register with the session are denied.

  • t=<minutes> Specifies the number of minutes the master computer will wait for the next participant to register before starting the imaging process without reaching the number of computers specified by the clients option.

The session name must be a unique string to identify this multicast session. The session name string used must be identically entered on all workstations (both master and slave) that are going to participate in the session. This string is used to hash a multicast address, so a small chance exists that two different strings can result in the same multicast address. Multicast addresses are class D IP addresses. In order to ease wire sniffing, troubleshooting, and LAN traffic analysis, the imaging engine always uses 231 as the first octet in its address.

Start this process by using the img session <name> command. Each workstation waits until the user determines which station will act as the master. The master workstation should be the source workstation; all slave workstations are destination workstations.

To designate the master workstation, go to the workstation that contains the source drive. The workstation should be running the session command and should be waiting just like all of the other workstations. Press the m key on the master workstation. This designates that workstation as the master. At this point, all of the other workstations attempt to register with the master and receive a unique session identifier. If, for some reason, a slave station is rebooted before the session starts, it always receives the same identifier.

When the desired number of stations has registered with the master, the master displays a running count of the number of registered slaves, and then starts the session by pressing g on the master workstation. Any station attempting to join the session after the session has started is denied access. Contents of the master are now transferred to all of the slave workstations.

Once the session is over, the master workstation displays a list of the stations that did not successfully complete the image.

NOTE

The multicast operations are dependent on the multicast features configured in your network equipment. Possible problems might include the routing of multicast packets not being allowed, stations outside of the defined scope of multicast on switches not receiving the packets, and so on.


Script Commands

The following commands perform some type of operation that would normally be activated only when the imaging engine is initially booted in manual mode. These are simple shell scripts that have been created for your convenience by the imaging system. Other script files exist, but these are the most useful to you.

  • /bin/cdrom.s Mounts the CD-ROM drive to /mnt/cdrom.

  • /bin/config.s Enables you to configure the SETTINGS.TXT file for the Linux partition.

  • /bin/imaging.s Runs the imaging engine in auto mode, just like the img a command.

  • /bin/install.s Creates the Linux partition and installs it onto the hard disk. It removes all partitions unless the Linux partition already exists; then it just updates the files.

  • /bin/lilo.s Installs the ZENworks Imaging boot manager system, making sure that this system is booted first on the drive.



Novell's ZENworks for Desktops 4. Administrator's Handbook
Novell ZENworks for Desktops 4 Administrators Handbook
ISBN: 0789729857
EAN: 2147483647
Year: 2003
Pages: 198
Authors: Brad Dayley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net