Understanding Device Boot Processes in a ZENworks Imaging Environment

The following provides a high-level overview of a Linux boot process and how ZENworks 6.5 SP2 imaging affects it:

  1. A boot loader program loads the Linux kernel and initrd (initial RAM drive) into memory.

    The SLES-based imaging distribution uses isolinux as the boot loader for imaging CDs, or linld.com when using PXE or a single diskette with the CD. If you have a ZENworks partition installed, it uses the lilo program to boot alternately between the ZENworks partition and the installed operating system.

    The following provides the current paths and filenames and a historical comparison:

    Files ZENworks 6.5 SP1 and Earlier ZENworks 6.5 SP2

    Preboot loader

    Does the following for all methods:

    • Loads DOS
    • Uses loadlin

    Uses isolinux when booting from a CD; otherwise, uses linld.com.

    Linux kernel name

    Uses kernel when booting from a CD.

    Uses linux.1 when booting from PXE.

    Uses kernel.zen when booting from a diskette.

    For CD, uses \boot\loader\linux.

    For PXE, uses \tftp\boot\linux.

    initrd filename

    For CD, uses initrd.gz.

    For PXE, uses linux.2.

    For diskettes, uses initrd on the second boot diskette.

    For CD, uses \boot\loader\initrd.

    For PXE, uses \tftp\boot\initrd.

  2. The Linux kernel starts running, does some device driver setup, then mounts the initrd file system.

    Regardless of which boot loader method is used, the main purpose is to set up the initrd file as a RAM drive, load the Linux kernel into memory, then turn control over to it with an indication to the Linux kernel of where to find initrd.

  3. The Linux kernel turns control over to linuxrc for performing initial hardware detection. When finished, control is returned to the Linux kernel.

    Historical Note: ZENworks 6.5 SP1 and earlier imaging contains a linuxrc script file that performs some initial setup, but not the hardware detection.

  4. The Linux kernel starts a background process (/sbin/init).

    After control is passed to the /linuxrc program, control is never returned to the Linux kernel or passed on to the init process.

    Historical Note: ZENworks 6.5 SP1 and earlier use the init process to perform the imaging. All ZENworks imaging processing is performed within the linuxrc process. For this reason, some of the standard processes you are familiar with do not work or exist in ZENworks imaging beginning with SP2.

    For example, the halt and reboot commands are different. In a fully-installed Linux system, reboot actually performs an init 6 call. Because init is not running during the SP2 imaging process, an init 6 call cannot be made. Therfore, reboot has been aliased to reboot -r, which forces a reboot without trying to call init.

    Most other commands do run from the bash prompt, because bash is running.

For more information on linuxrc and zenworks.s, review the following sections:


linuxrc

When control is turned over to linuxrc, there are several processes it performs to get the system ready for the imaging process. Linuxrc is initially configured from the /linuxrc.config file, which is located in the initrd file system. Additional configuration information for linuxrc can be placed in the /info file (located in the initrd file system), but ZENworks does not normally use this information.

Linuxrc also loads a root file system, which is combined with the initrd file system that is set up by the boot loader. The root file system is located on an imaging CD as the file \boot\root. For PXE booting, the root file system is stored on the ZENworks imaging server as \tftp\boot\root.

Linuxrc attempts to locate and load the settings.txt file, either on the root of the imaging CD, or on the ZENworks imaging server in the \tftp directory. From settings.txt, linuxrc reads and processes any parameters that pertain to itself, then copies settings.txt to the root (/) of the file system.


zenworks.s

A normal SUSE installation for SUSE Linux or SLES boots to a small distribution to perform a YaST installation. ZENworks Imaging boots with the same installation system, but instead of starting a YaST installation, it starts the ZENworks Imaging process. Control is turned over to the ZENworks script /bin/zenworks.s, which is the main script file for ZENworks imaging processing. The script performs a certain number of setup tasks, then gives control to the appropriate script for the selected imaging process. For more information on the imaging process, see Understanding Desktop Management Preboot Services.

One of the setup tasks is to apply any update files. When booting from a CD, zenworks.s copies the /addfiles directory structure to the Linux file system. For more information, see Adding Files to an Imaging Boot CD.