2.3 Setting Up the Preboot Services Methods for ZENworks Imaging

The Novell ZENworks Imaging Engine that performs the actual imaging of a device is a Linux application. Unless you use automated Preboot Services with PXE-enabled devices, you need to prepare a boot medium that has the Linux kernel, ZENworks Imaging Engine, and network drivers installed.

The following sections contain additional information:

2.3.1 Using Preboot Services (PXE)

Preboot Execution Environment (PXE) is an Intel specification that allows a device to boot from the network, instead of its hard drive or other local media. ZENworks can use PXE to launch Preboot Services.

Preboot Services uses PXE to find out if there is imaging work specified for a device and to provide the device with the files necessary to boot to the ZENworks imaging environment.

Before you can use Preboot Services with automated Preboot bundles, you need to do the following:

  1. Install ZENworks on your Imaging Server.

  2. Enable PXE on the device.

  3. Have a standard DHCP server, either on your Imaging Server or on another network server.

Automated Preboot Services functions can also be performed using a ZENworks partition. For more information, see Creating a ZENworks Partition.

Manual Preboot Services functions can be performed using CDs or DVDs, or bootable USB. For more information, see Section 2.3.2, Preparing Imaging Boot CDs, DVDs or bootable USB.

2.3.2 Preparing Imaging Boot CDs, DVDs or bootable USB

If you have software for burning CDs, DVDs or bootable USBs, you can create an imaging boot CD, DVD or bootable USB for imaging operations.

For information on how to use the CD, DVD or bootable USB to perform disconnected imaging operations, see Section 3.1.3, Setting Up Disconnected Imaging Operations.

Creating a Boot CD, DVD or bootable USB with Additional Files

This section describes how to create an imaging CD, DVD or bootable USB that contains more than the files provided in the bootcd.iso image.

This method allows you to include the settings.txt file on the boot CD, DVD or bootable USB to provide the required imaging parameters. For more information on the settings.txt file, see Section D.7, Imaging Configuration Parameters (settings.txt).

This method also allows you to add other files and drivers that you need to do the imaging.

To create an imaging boot CD, DVD or bootable USB that includes settings.txt and other files:

  1. Copy the bootcd.iso file to a temporary location.

    On the Imaging Server where ZENworks is installed, the bootcd.iso file is located in:

    Windows: %ZENWORKS_HOME%\bin\preboot\

    Linux: /opt/novell/zenworks/preboot/bin/winutils/

  2. In an ISO editor, open the temporary copy of the bootcd.iso file.

    If you experience ISO corruption after adding files into the ISO, such as a checksum error, use a more reliable ISO editor. Also, some ISO editors do not work very well with DVDs.

  3. Using the temporary bootcd.iso file, copy the settings.txt file to the root of the bootcd.iso image.

    On the Imaging Server where ZENworks is installed, the settings.txt file is located in:

    Windows: %ZENWORKS_HOME%\bin\preboot\

    Linux: /opt/novell/zenworks/preboot/bin/winutils/

  4. Copy any other files or drivers that you want included on the CD, DVD or bootable USB to the addfiles directory in the temporary bootcd.iso image.

    Any files or subdirectories that you add under the /addfiles directory are placed at the root of the client when booting the CD, DVD or bootable USB.

    IMPORTANT:When booting from the CD, DVD or bootable USB, the imaging engine is read into RAM. Because the imaging engine uses some of the RAM that exists on the client device, the combined size of any files that you add under the addfiles directory cannot exceed the amount of remaining RAM.

  5. Save the updated bootcd.iso image file to its temporary location.

  6. Use your software for burning CDs or DVDs to burn the updated bootcd.iso image onto the CD, DVD or bootable USB.

  7. Boot the device to be imaged from your newly created imaging boot CD, DVD or bootable USB.

    Booting from a SCSI CD-ROM device is currently not supported.

To create an imaging boot CD, DVD or bootable USB by changing the default menu option in the /boot/i386/loader/isolinux.cfg file.

  1. Copy the bootcd.iso file to a temporary location.

    On the Imaging Server where ZENworks is installed, the bootcd.iso file is located in:

    Windows: %ZENWORKS_HOME%\bin\preboot\

    Linux: /opt/novell/zenworks/preboot/bin/winutils/

  2. In an ISO editor, open the temporary copy of the bootcd.iso file.

    If you experience ISO corruption after adding files into the ISO, such as a checksum error, use a more reliable ISO editor. Also, some ISO editors do not work very well with DVDs.

  3. In the temporary bootcd.iso file, open the isolinux.cfg file located in the /boot/i386/loader directory.

  4. Edit the isolinux.cfg file to change the following line

    default linux

    to

    default manual

  5. Save the updated bootcd.iso image file to its temporary location.

  6. Use your software for burning CDs or DVDs to burn the updated bootcd.iso image onto the CD, DVD or bootable USB.

  7. Boot the device to be imaged from your newly created imaging boot CD, DVD or bootable USB.

    Booting from a SCSI CD-ROM device is currently not supported.

The zmgbootcd imaging utility is a part of the following MSI/RPM files:

https://primary_server_IP_address:port/zenworks-downloads/msi/novell-zenworks-zmgbootcd-xxxxx.msi
https://primary_server_IP_address:port/zenworks-downloads/rpm/novell-zenworks-zmgbootcd-xxxxx.i586.rpm

Alternate procedure for creating a Boot CD, DVD or bootable USB with Additional Files

You can create an Imaging boot CD, DVD or bootable USB by changing the default menu option in the /boot/i386/loader/isolinux.cfg file.

To create a boot CD, DVD or bootable USB:

  1. Unzip the bootcd.zip file to the following locations:

    Windows: %ZENWORKS_HOME%\bin\preboot\ . For example, C:\Program Files (x86)\Novell\ZENworks\bin\preboot

    Linux: /opt/novell/zenworks/preboot/bin/winutils/

  2. Take backup of the settings.txt and other files.

  3. Modify the settings.txt or add files to bootcd. The settings.txt is located at files/settings.txt. Insert other files or copy the files to the files/addfiles folder.

  4. Create a new bootcd.zip file from modified folder files.

    Windows: Use any Windows tool to create bootcd.zip file

    Linux: #zip bootcd.zip -r files

    #chown zenworks:zenworks bootcd.zip

  5. Delete the extracted files directory.

  6. To create bootcd_tntfs.iso:

    For Windows:

    1. Open the command prompt as an administrator.

    2. Type the cd C:\Program Files (x86)\Novell\ZENworks\bin\preboot command.

    3. Execute the bootcd-editor.bat script with the required parameter.

      bootcd-editor.bat <path to Tuxera driver folder> <output directory>

      For example, C:\Program Files (x86)\Novell\ZENworks\bin\preboot>bootcd-editor.bat "C:\Program Files (x86)\Novell\ZENworks\share\tftp\11.3

      You can see the following message on the console:

      C:\Program Files (x86)\Novell\ZENworks\bin\prebootprocessing....... Done.. Injected bootcd => C:\\bootcd_tntfs.iso 
      Bootcd iso file is created at the output directory as bootcd_tntfs.iso

    For Linux:

    1. Execute the bootcd-editor.sh script with the required parameter for creating the bootcd.

      bootcd-editor.sh <path to tuxera driver folder> <output directory>

      For example, ./bootcd-editor.sh /srv/tftp/11.3/ /tmp

      The Bootcd ISO file is created at the output directory as bootcd_tntfs.iso.

      NOTE:The bootcd_tntfs.iso file creation fails on RHEL Servers having the tntfs.zip file. For more information, see ZENworks Readme.

Creating a Boot CD or DVD without Additional Files

If you do not want to include the settings.txt file or any other files or drivers in the imaging boot CD or DVD, you can simply create the imaging boot CD or DVD from the bootcd.iso image provided with ZENworks.

However, you need to provide the settings.txt file to provide the required imaging parameters. For more information on the settings.txt file, see Section D.7, Imaging Configuration Parameters (settings.txt).

To create an imaging boot CD or DVD that contains only the bootcd.iso image:

  1. Copy the settings.txt file containing the settings you want for the imaging boot process onto a floppy diskette.

    On the Imaging Server where ZENworks is installed, the settings.txt file is located in:

    Windows: %ZENWORKS_HOME%\bin\preboot\

    Linux: /opt/novell/zenworks/preboot/bin/winutils/

  2. Use your software for burning CDs or DVDs to burn the bootcd.iso image onto the CD or DVD.

    On the Imaging Server where ZENworks is installed, the bootcd.iso file is located in:

    Windows: %ZENWORKS_HOME%\bin\preboot\

    Linux: /opt/novell/zenworks/preboot/bin/winutils/

  3. Boot the device to be imaged from your newly created imaging boot CD or DVD.

    You will be prompted for the diskette that contains the settings.txt file.

    Booting from a SCSI CD-ROM device is currently not supported.

Modifying Kernel Boot Parameters for ZENworks Imaging

Modify the Boot parameters using any of the following options:

Adding the boot parameter using the imaging bootcd

Add a boot parameter of your choice while selecting the boot mode (Automatic or Manual) from the ZENworks Preboot Options screen.

Adding the boot parameter using PXE Options

  1. Go to Configuration>Device Management>Preboot Services>PXE > Options.

  2. In the PXE Kernel Boot Parameters field add the boot parameter.

Adding the boot parameters in the respective configuration files

This procedure should be followed to set the vga= parameter in place of the vga=0x314 parameter which is set by default.The configuration files end with extension *.cfg (for BIOS) or *.conf (for UEFI) For example, z_auto.cfg, and z_maint.conf. The path to configuration files in the server is as follows:

  • BIOS: $TFTP_ROOT/

  • UEFI: $TFTP_ROOT/efi/x86_64/

Creating a Tuxera Boot CD

Tuxera Boot CD, or the bootcd_tntfs.iso file is generated whenever you import the Tuxera driver. You can create a Tuxera bootcd ISO file from the bootcd-editor script.

  1. On the ZENworks server, browse to the winutils folder.

  2. Run the following command to create the bootcd_tntfs.iso file:

    Windows: bootcd-editor.bat <location of the downloaded tuxera driver folder> <destination to the save the ISO file>

    Linux: ./bootcd-editor.sh <location of the downloaded tuxera driver folder> <destination to the save the ISO file>

2.3.3 Creating Bootable USB Drives for Imaging

You can create a bootable USB flash drive for booting either BIOS or UEFI firmware to perform Imaging operations.

  1. Boot a system by using the Imaging boot CD.

  2. At the # prompt, run the ZENUsbcreator <kernel_parameters> command.

    Where ZENUsbcreator <kernel_parameters> is an optional field, which can be specified based on requirements. Multiple kernel parameters can be specified by separating with a space.

    Example: ZENUsbcreator nomodeset reboot=efi

    You can see the following menu options at the prompt:

    1. Create bootable USB for 32-bit BIOS machines
    2. Create bootable USB for 64-bit BIOS machines
    3. Create bootable USB for 64-bit UEFI machines
    4. Upgrade bootable USB
    5. Clear all the partitions on the USB device
  3. Use the following options to create a USB drive to boot systems:

    • Create bootable USB for 32-bit BIOS machines: Enter 1

    • Create bootable USB for 64-bit BIOS machines: Enter 2

    • Create bootable USB for 64-bit UEFI machines: Enter 3

    • Upgrade bootable USB: Enter 4

    • Clear all the partitions on the USB device: Enter 5

    To upgrade a bootable ZEN USB: Enter 3.

    You can see a list of detected USB drives. In the following example, there are two detected USB devices. Enter 1 to select a Transcend device and enter 2 to select a SanDisk.

    Detected USB device(s):
    ***********************************************************************
    
                  Device    Vendor    Model          Size(Bytes)
                1. /dev/sdb JetFlash Transcend_16GB   1621937356bB
                2. /dev/sdc SanDisk  CruzerBlade_16GB 1621937356bB
    
    ***********************************************************************
  4. Select Yes or No, when you are prompted to continue or exit. The selected device will be formatted and partitioned.

    The command execution completes processing the USB drive with 160 MB boot partition and the rest of the disk space can be used for second partition to store images or data.

NOTE:On a Windows device you can access the second NTFS partition only if you are using a USB hard drive. You cannot access the second NTFS partition on a flash drive because a Windows device cannot recognize more than one partition on a USB flash drive.

To access the second NTFS partition on a flash drive, use a Linux device that supports NTFS file access.

2.3.4 Managing ZENworks Partitions

A ZENworks partition is used by a device when booting for automated Preboot Services work when the device does not have PXE available. The following sections explain how to manage ZENworks partitions:

Creating a ZENworks Partition

If you want to set up a device for unattended imaging operations and are unable to use Preboot Services (PXE), you can create a ZENworks partition on the hard disk. If you make the partition large enough, you can even store an image of the device’s hard disk, which can be useful if the device becomes misconfigured or corrupted when the network connection is lost.

WARNING:Installing the ZENworks partition destroys all data on that hard drive. Use this only on devices where you plan to reinstall the operating system and software programs.

  1. Boot the device with the imaging CD, DVD or bootable USB, then select Install/Update ZEN partition from the menu.

    This starts the process of creating the ZENworks partition in the first partition slot. It destroys all existing partitions, except an existing ZENworks partition or the Dell or Compaq configuration partitions. By default, the ZENworks partition size is 150 MB.

    If the ZENworks partition already exists, it is upgraded, and your existing partitions are left intact.

    NOTE:You can also update an existing ZENworks partition by running the following commands:

    #img -a

    #. /bin/update.s

    #. /bin/grub.s

    #reboot

  2. After the ZENworks partition is installed or updated, remove the CD, DVD or bootable USB and press any key to continue.

  3. After removing the CD, DVD or bootable USB and reboot the device, install the operating system on the device.

    IMPORTANT:During installation of the operating system, you must install the boot loader where the root (/) partition is being installed. In other words, the active partition must be the root partition. You can use fdisk to verify that the active partition is root.

  4. To take an image of the device using the ZENworks partition, see Using the Imaging Maintenance Mode Prompt to Create an Image.

  5. When the imaging maintenance mode prompt is displayed, reboot the device.

    The device should boot to Linux.

Disabling a ZENworks Partition

If you decide to enable PXE on a device, but have previously installed a ZENworks partition on it, you can disable or delete the partition, because it is no longer necessary. For information on deleting the partition, see Removing a ZENworks Partition.

When you boot to Linux using any imaging boot device or method other than booting from the ZENworks partition, you can disable (or enable) the ZENworks partition. Just select the menu option to do so when the Novell Preboot Services Menu is presented.

Removing a ZENworks Partition

Because you should not delete the ZENworks partition if you booted using the partition, you should boot the device from an imaging boot method other than the ZENworks partition.

WARNING:After you have deleted the ZENworks partition, you need to make sure that the image you place on the device was made on a device without a ZENworks partition. Otherwise, the wrong MBR (Master Boot Record) is restored, and the device fails to boot. You should only remove the ZENworks partition if you are going to restore an image that does not have the partition to the device.

The following are ways you can remove a ZENworks partition from a device:

Using an Imaging CD, DVD or bootable USB

If you cannot perform a full restoration of the ZENworks partition at this time, you should consider removing it.

To remove a ZENworks partition:

  1. Boot the device using the ZENworks imaging CD, DVD or bootable USB.

  2. Select the Manual mode option.

  3. At the imaging maintenance mode prompt, enter:

    img -zenpart -remove
  4. After the removal is complete, eject the CD, DVD or bootable USB (if you are not going to use it to reimage the device).

  5. If you want to restore an image before rebooting, enter the following at the prompt:

    unset ZENDEVICE

    Otherwise, reboot the device when ready.

  6. Restore an image or install an operating system.

    When the device boots, its ZENworks partition is removed, then the device can be imaged from the CD, DVD or bootable USB without a ZENworks partition.

    If the device is assigned to a Preboot bundle, it is imaged according to that bundle.

Using Linux Imaging Script Bundle

If you are using Preboot Services, but formerly booted from the ZENworks partition on the device, you can delete the ZENworks partition at the same time you restore an image. However, the new image should not contain a ZENworks partition.

For example, you can do the following:

  1. In ZENworks Control Center, create a Imaging Script bundle.

  2. In the Script text field in the Create New Bundle Wizard, enter:

    img -zenpart -remove
  3. In the Script text field (after the above command), enter the other commands necessary for the imaging work you want for the device.

    For more information, see Section E.0, ZENworks Imaging Engine Commands.

  4. On the Summary page of the wizard, click Finish (not Next).

  5. Reboot the device.

Using Fdisk

You can remove a ZENworks partition by simply using fdisk to reconfigure the device’s hard drive. Then, you can either image the device using a ZENworks imaging CD, DVD or bootable USB, or enable PXE on the device and assign a Preboot bundle to it, then reboot it to use that bundle.