05.02.2013 Views

opsi manual opsi version 4.0.2 - opsi Download - uib

opsi manual opsi version 4.0.2 - opsi Download - uib

opsi manual opsi version 4.0.2 - opsi Download - uib

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>opsi</strong> <strong>manual</strong> <strong>opsi</strong> <strong>version</strong> <strong>4.0.2</strong><br />

83 / 193<br />

It also holds the information on how to partition the hard disk, what file system to use and which operating system<br />

to install. Also it provides the encrypted password to connect the file share.<br />

These information will be combined with some information taken from the dhcp response and then be passed to the<br />

installation script for further processing.<br />

Then the password for the user pcpatch will be decrypted with the transferred key to mount the installation share<br />

and then call the installation script from the mounted share to start the installation of the operating system. What<br />

specific operations the script performs depends on the operating system which is to be installed. Below the steps of a<br />

Windows XP installation will be described.<br />

Prepare the disc: On the hard disk the bootimage creates a new partition (of size 6 GB), formats it and installs a<br />

bootable ntloader kernel.<br />

Copy the installation file: The files required for OS installation and the setup files for the <strong>opsi</strong>client-agent<br />

(which is the <strong>opsi</strong> software distribution pack) will be copied from the server file share (e.g.<br />

/opt/pcbin/install/winxppro/i386) to the local hard disk.<br />

Maintain the configuration informations: Some of the configuration and control files contain replacement characters,<br />

which will be patched before starting the actual installation. With a specified script (patcha-script) the<br />

placeholders will be replaced with parameters taken from the information packet, which is built from configuration<br />

files and the dhcp-response. For example the file unattend.txt, which is the control file for unattended OS Installation,<br />

will be patched with specific information like host IP, client IP, client name, workgroup, default gateway etc..<br />

Prepare Reboot: Bootrecords will be installed which will start the Windows setup program at the next reboot. The<br />

patched unattend.txt is passed to the setup as the control file for unattended installation.<br />

Reboot: During the previous boot, the named pipe (which is indicating a request for installation) has been removed<br />

by reading it once. So the next PXE boot will load the default netboot response, which executes the command hdboot.<br />

The local boot loader will be started and the setup for operating system installation starts.<br />

These steps are controlled by an OS specific python script.<br />

9.2.7 Installation of OS and <strong>opsi</strong>-client-agent<br />

The OS installation is based on the Microsoft unattended setup. Part of this is the standard hardware detection. In<br />

addition to the possibilities given during an installation from non-OEM or slipstreamed installation media, drivers and<br />

patches (i.e. service packs) can be installed during the initial installation, making the separate installation of drivers<br />

obsolete.<br />

One feature of the unattended installation is the possibility to initiate additional installations after the main installation<br />

is finished. This mechanism is used to install the <strong>opsi</strong>-client-agent, which implements the automatized software<br />

distribution system. An entry in the registry marks the machine as being still in the reinstallation-mode.<br />

The final reboot leads to starting the <strong>opsi</strong>-client-agent service for software distribution prior to the first user login.<br />

Based on the value of the aforementioned registry key the <strong>opsi</strong>-client-agent switches into reinstallation-mode. Therefore,<br />

regarding the configuration status of each software packet, each packet which is marked as action status ”setup”<br />

or installation status ”installed” within the configuration of that client will be installed. After all the designated<br />

client software has been installed, the reinstallation process is finished and the internal status is switched back from<br />

reinstallation-mode to standard-mode. In standard-mode only software packages that are marked as action status<br />

”setup” will be installed.<br />

9.2.8 How the patcha program works<br />

As mentioned above the information collected from dhcp and <strong>opsi</strong>-webservice will be used to patch some configuration<br />

files as e.g. unattend.txt. The program used for patching is the script /user/local/bin/patcha.<br />

This script replaces patterns like @flagname() in a file with values taken as flagname=value from a control file (default<br />

input is /proc/cmdline). In the files that have to be patched, the search and replace pattern must start with @, might<br />

have an optional after the flagname and must have one or more trailing .<br />

So by calling patcha the file will be patched with information taken from /proc/cmdline.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!