This section on automated installation comprises several different types of installation that enable you to roll out highly customized installations to a great number of machines. Not all of the scenarios are completely hands-off (not requiring any physical access to the machines), but all of them involve customization of the machine's configuration, software selection, or even the installation procedure itself.
IMPORTANT:Before considering mass deployment of NLD using any of the following techniques (imaging, firstboot, or control.xml), make sure the roll-out is done to machines of a similar or even identical type and setup. Make sure the amount of disk space and RAM is identical and that the same type of disk is used on all target machines. Otherwise you might end up with unusable installations.
Imaging is the process of installing a default configuration on a workstation, taking a “snapshot” of that workstation, and then duplicating the configuration on other workstations.
Before you start, consider the following issues:
Simple imaging just clones the system's basic configuration. If you are aiming for customized cloning of the desktop environment, consider the Customizing Novell Linux Desktop.
You need the following items to be able to do imaging:
Make sure the target’s hard disk is at least of the same size as the master machine’s disk. Otherwise, the image would be incomplete, vital functionality could be missing, and the system would be unusable.
Simple imaging is used to just clone the basic system configuration of the master to any target machine you want.
Boot the master machine from the original installation media (NLD CD1 or DVD).
Select the
option to boot into the rescue mode of NLD.Type root to log in.
A password isn't required at this point.
Select the language settings to be used in the rescue system.
Configure the network in the rescue system to be able to connect to the NFS server.
Configure the IP address and netmask, then activate the interface by entering
ifconfig eth0 ip_address netmask some_netmask up
Replace ip_address and some_netmask with values that fit your network setup.
Configure routing (if necessary) by entering
route add default gw ip_address_gateway
Replace ip_address_gateway with a gateway address that matches your requirements.
Mount an NFS exported directory from the NFS server to the /mnt directory on the master machine to hold the disk image by entering
mount ip_nfs_server:exported_dir /mnt
Replace ip_nfs_server and exported_dir with the actual values in your setup.
Create an image of your hard disk and store it on the NFS mounted directory by entering
dd if=/dev/hda of=/mnt/image.bin bs=16k
In the above command, the first (E)IDE disk is imaged. Adjust the command to the requirements of your machine's setup. If you need to image a SCSI disk, use /dev/sda instead.
Boot the target machine from the original installation media (NLD CD1 or DVD).
Select the
option to boot into the rescue mode of NLD.Type root to log in.
A password isn't required at this point.
Select the language settings to be used in the rescue system.
Configure the network in the rescue system to be able to connect to the NFS server.
Configure the IP address and netmask, then activate the interface by entering
ifconfig eth0 ip_address netmask some_netmask up
Replace ip_address and some_netmask with values that fit your network setup.
Configure routing (if necessary) by entering
route add default gw ip_address_gateway
Replace ip_address_gateway with a gateway address that matches your requirements.
Mount an NFS exported directory from the NFS server to the /mnt directory on the target machine by entering
mount ip_nfs_server:exported_dir /mnt
Replace ip_nfs_server and exported_dir with the actual values in your setup.
To avoid swapping while transferring the image onto the target’s hard disk, identify the swap device currently in use and disable swapping for this device by entering
swapon -s swappoff /dev/output_of_swapon
Enter the following to transfer the disk image from the NFS mounted partition in the rescue system to the disk of the target system:
dd if=/mnt/image.bin of=/dev/hda bs=16k
Make sure you adjust the disk type used to the disk setup in the target machine (see Step 7).
Remove the boot (installation) media from the CD-ROM drive, then reboot the target machine.
For more advanced imaging features, use a third-party, commercial package such as Symantec* Ghost*.
NLD offers several methods for customizing the NLD installation you roll out to the target machines. You can customize NLD with regard to the following aspects:
Most of the default system settings (like hardware configuration, partitioning and device setup) can be done using YaST. For more information, see Section A.0, Using YaST to Configure the Novell Linux Desktop.
WARNING:Make sure both the master and target machine share the same hardware setup. Exporting partitioning schemes, graphics settings, or other hardware configurations to machines that don't match the setup or the master machine might break the installation and render the systems unusable.
When the home directory for a new user is created, it is initialized with files from the /etc/skel directory. As system administrator, you can create files in /etc/skel that provide a default environment for users. For example, you might create a /etc/skel/.profile file that sets the EDITOR environment variable to a text editor that is easy for new users to use.
However, it is usually best to keep /etc/skel as small as possible, because it is difficult to update existing users’ files. For example, if the name of the friendly editor changes, all existing users would have to edit their .profile file. You could try to do it automatically, with a script, but that is almost certainly going to break someone’s file.
Whenever possible, it is best to put global configuration into global files, such as /etc/profile. This way, it is possible to update without breaking users’ personal settings.
The GNOME desktop configuration is done via a centralized repository that can be edited using the gconf editor tool that comes with the GNOME desktop. gconf allows you to customize the following aspects of your desktop:
For more information, see Section E.0, GNOME Configuration for Administrators.
The kiosk framework of KDE allows you to customize almost any aspect of your desktop. The KDE desktop comes with the kiosk configuration tool offering a graphical interface to all the different configuration tasks. It allows you to customize the following aspects of your desktop:
For more information, see Section F.0, KDE Configuration for Administrators.
The YaST firstboot utility (YaST Initial System Configuration), which runs after the installation is completed, lets you configure NLD before creation of the install image so that on the first boot after configuration, users are guided through a series of steps that allow for easier configuration of their desktops.
IMPORTANT:Because this scenario involves imaging, the concerns and constraints of this technique mentioned in Imaging also apply to this approach.
Consider using firstboot if you want to
Before using firstboot, make sure the following items are provided and taken care of:
A typical firstboot process can be split into three subtasks:
The master machine needs to be installed and configured before you can enable firstboot and start the imaging process.
Install NLD on a master machine, making sure that you install the firstboot package.
Firstboot is disabled by default. The YaST firstboot package is not part of any software selection and has to be installed individually. During the NLD installation, on the Installation Settings screen, click
, and then search for and install the yast2-firstboot package.As root, create a file called /etc/reconfig_system by entering
touch /etc/reconfig_system
Enable the firstboot service either by using the YaST runlevel editor or by entering the following at the command line as root:
insserv firstboot
To export the master machine's configuration, you need to image its hard disk and export this image to the targets.
Boot the master machine from the original installation media (NLD CD1 or DVD).
Select the
option to boot into the rescue mode of NLD.Enter root to log in.
A password isn't required at this point.
Select the language settings to be used in the rescue system.
Configure the network in the rescue system to be able to connect to the NFS server.
Configure the IP address and netmask, then and activate the interface by entering
ifconfig eth0 ip_address netmask some_netmask up
Replace ip_address and some_netmask with values that fit your network setup.
Configure routing (if necessary) by entering
route add default gw ip_address_gateway
Replace ip_address_gateway with a gateway address that matches your requirements.
Mount an NFS exported directory from the NFS server to the /mnt directory on the master machine to hold the disk image by entering
mount ip_nfs_server:exported_dir /mnt
Replace ip_nfs_server and exported_dir with the actual values in your setup.
Create an image of your hard disk and store it on the NFS mounted directory by entering
dd if=/dev/hda of=/mnt/image.bin bs=16k
In the above command, the first (E)IDE disk is imaged. Adjust this command to the requirements of your machine's setup. If you need to image a SCSI disk, use /dev/sda instead.
Boot the target machine from the original installation media (NLD CD1 or DVD).
Select the
option to boot into the rescue mode of NLD.Enter root to log in.
A password isn't required at this point.
Select the language settings to be used in the rescue system.
Configure the network in the rescue system to be able to connect to the NFS server.
Configure the IP address and netmask, then activate the interface by entering
ifconfig eth0 ip_address netmask some_netmask up
Replace ip_address and some_netmask with values that fit your network setup.
Configure routing (if necessary) by entering
route add default gw ip_address_gateway
Replace ip_address_gateway with a gateway address that matches your requirements.
Mount an NFS exported directory from the NFS server to the /mnt directory on the target machine by entering
mount ip_nfs_server:exported_dir /mnt
Replace ip_nfs_server and exported_dir with values matching your actual setup.
To avoid swapping while transferring the image onto the target’s hard disk, identify the swap device currently in use and disable swapping for this device by entering
swapon -s swappoff /dev/output_of_swapon
Enter the following to transfer the disk image from the NFS-mounted partition in the rescue system to the disk of the target system:
dd if=/mnt/image.bin of=/dev/hda bs=16k
Make sure you adjust the disk type used to the disk setup in the target machine (see Step 7).
Remove the boot (installation) media from the CD-ROM drive, then reboot the target machine.
After the master machine's configuration has been cloned to the target's hard disk and the target is booted for the first time, firstboot starts and then the user or system administrator needs to complete some final configuration steps.
NOTE:The Post Configuration Utility (firstboot) expects the X Window System to be configured. If it isn’t, firstboot automatically starts in text mode.
Acknowledge the License Agreement.
Set the date and time to match with your setup.
Set the machine's root password.
Create user logins.
Finish the configuration and exit firstboot.
During firstboot, two additional dialogs are displayed (for writing the data and running SuSEconfig) which require no user interaction. For more information on SuSEconfig, see “Section 11.6, SuSEconfig and /etc/sysconfig” in the SUSE LINUX Enterprise Server 9 Administration and Installation Guide.
The user's experience of YaST and YaST firstboot can be customized to a certain extent. You can set certain actions to be taken in certain situations, add scripts to be executed to further adjust the target machine's configuration, and customize the messages passed on to the user.
The configuration file for firstboot is located in /etc/sysconfig/firstboot. The following variables can be used to further customize the firstboot process.
Table 2-5 Firstboot Configuration File Variables
The product configuration file (control.xml) lets you customize the installation by making it possible to enable and disable features of the final installed product during installation. It controls the workflow a user sees during installation.
Besides workflow configuration, other system variables are configurable and can be predefined by the system administrator, including software selection and environment settings such as language, time zone, and keyboard. Any configuration here overrides default variables provided with Novell Linux Desktop.
The idea of having a predefined installation workflow and predefined system settings is the middle ground between manual installation and automated installation.
Before you start using the control.xml file as a tool to install your clients, consider the following:
Using AutoYaST, multiple systems sharing the same environment and similar (but not necessarily identical) hardware performing similar tasks can easily be installed in parallel and in a short time.
The product configuration file is provided in text on the installation media and defines the following settings needed during installation:
Table 2-6 Supported Configuration Options
Option |
Description |
---|---|
Workflow |
Replaces the static workflow list with a configurable list using the product configuration file. Entire sections of the workflow can be skipped. For example, if the IT department wants to force French installations in Quebec, Canada, you can set the language variable in the configuration file so that the Language dialog is skipped during the installation. If the IT department wants to recommend settings but still give the users the ability to change the default settings, the Language dialog could still be shown but with French preselected. If none of the above options is used, the default settings are shown. For more information, see Workflows. |
Proposals |
Are also configurable. For example, certain products would skip some proposals. On the proposal screen, the preconfigured settings can be shown with the possibility of changing them or with inactive links if the configuration is to be forced. For more information, see Proposals. |
System Variables |
Lets the users define system variables such as language, keyboard, time zone, window manager, and display manager. The defined variables are used as defaults in the respective dialogs. For more information, see Installation and Product Variables. |
Package Selections and Additional Individual Packages |
Defines what base package selection and add-on selections should be used for the installation. Also provides the possibility of defining a list of additional packages. All packages and selections can be selected, depending on the architecture, using a special architecture attribute in the configuration file. For more information, see Software. |
Partitioning |
Integrates flexible partitioning into the configuration file instead of the separate file currently used. For more information, see Partitioning. |
Scripting and Hooks |
Defines hooks and special slots where the user can execute scripts. For example, scripts can be executed at the very beginning of the installation (after processing the configuration file), in the installation system before the initial boot, in the chroot-ed environment after initial boot, and before/after every step in the workflow. The scripting languages supported during installation are Shell and Perl. For more information, see Hooks. |
The control file is implemented in simple, structured XML syntax, which so far has been used for automated installation. The XML structure used can be mapped easily to YaST data structures, and all data types available in YaST are supported for easy data access and manipulation.
The primary use of the control file is to configure the workflow of the installation. It lets you predefine a certain setup, but it also defines product installation features and other product-related variables.
NOTE:The control file is not an optional tool to help customize installation. It is required during installation, and installation can fail or lead to unexpected results without the file. YaST provides a general default control file which is always available in the system. The general and product-independent control files are installed by the YaST-installation package in /usr/share/YaST/control/control.xml.
During installation, linuxrc searches for the a file named control.xml on the installation medium (for example, CD, NFS, or FTP), copies the file to the installation system, and makes the file available to YaST. YaST then starts and looks for the control file in the following three locations before starting with the installation workflow:
Table 2-7 Control File Locations
One of the main reasons for using the control file is to let non-YaST developers change the installation behavior and customize various settings without the need to change YaST packages.
This section contains information on the following:
Using the control file, you can define multiple workflows for different modes and installation stages. The element workflows in the control file evaluates to a list of workflows.
Beside defining which YaST clients should be executed during installation, the workflow configuration also lets you specify the wizard steps and how they should appear during a graphical installation.
A workflow list element is a map with the following elements:
Table 2-8 Workflow List Elements
The following is a typical installation workflow:
<workflows config:type=”list”> <workflow> <!-- ’label’ is what the user will see --> <label>Base Installation</label> <!-- default settings for all modules --> <defaults> <!-- arguments for the clients --> <arguments>false,false</arguments> <!-- allowed architectures “all”, “i386”, “i386,ia64,x86_64” --> <archs>all</archs> </defaults> <stage>initial</stage> <mode>installation,update</mode> <modules config:type=”list”> <module> <name>info</name> <arguments>false,true</arguments> </module> <module> <name>proposal</name> <arguments>true,true,`ini</arguments> <label>Installation Settings</label> </module> <module> <name>do_resize</name> <update config:type=”boolean”>false</update> <archs>i386,x86_64,ia64</archs> <label>Perform Installation</label> </module> <module> <name>prepdisk</name> <!-- Multiple modules with the same ’label’ will be collapsed to one single user-visible step. The step is considered finished when the last module with the same ’label’ is finished. --> <label>Perform Installation</label> </module> <module> <name>kickoff</name> <label>Perform Installation</label> </module> <module> <name>rpmcopy</name> <label>Perform Installation</label> </module> <module> <name>finish</name> <label>Perform Installation</label> </module> </modules> </workflow>
Part of the installation workflows are proposal screens, which consist of groups of related configuration settings (for example, Network, Hardware, and the initial Installation proposal).
You can add or modify a proposal, which we do not recommended because of configuration dependencies, by using the control file:
<proposal> <type>network</type> <stage>continue,normal</stage> <proposal_modules config:type=”list”> <proposal_module>lan</proposal_module> <proposal_module>dsl</proposal_module> <proposal_module>isdn</proposal_module> <proposal_module>modem</proposal_module> <proposal_module>proxy</proposal_module> <proposal_module>remote</proposal_module> </proposal_modules> </proposal>
The proposal in the above example is displayed in the so-called continue mode, which is the second phase of the installation. The proposal consists of different configuration options which are controlled using a special API.
NOTE:Proposal names and captions are fixed and cannot be changed. It is not possible to create a special proposal screen. Instead, you should use the available screens: network and hardware.
In the workflow, the proposals are called as any workflow step with an additional argument identifying the proposal screen to be started (`net for network, and `hw for hardware proposals). The following example shows how the network proposal is called as a workflow step:
<module> <label>Network</label> <name>proposal</name> <arguments>true,true,`net</arguments> </module>
It is possible to define some installation variables and force them in the proposal. The user can still change them, however.
The following variables can be set:
Auto Login is not recommended for multiuser environments and server installations.
The following example shows all options listed above:
<globals> <enable_autologin config:type=”boolean”>true<enable_autologin> <language>de_DE</language> <timezone>Canada/Eastern</timezone> </globals>
Use this section in the control file to change the software proposal during installation.
An example software section could look like the following:
<software> <delete_old_packages config:type=”boolean”>false</delete_old_packages> <selection_type config:type=”auto”>auto</selection_type> </software>
By default, the software proposal is generated depending on the available space in the system. If enough space is available, a fairly large number of packages and add-on package groups are automatically selected. This behavior is controlled by the selection_type element in the control file.
The default value for selection_type is auto. To force a selection (which a user cannot change), use the fixed value.
If you want a fixed software selection, the fixed selection name must be specified in the control file. This selection must be a base selection. To specify the name of the base selection to be forced, use the base_selection element.
The list of base selections can be found on the first CD of the product in the suse/setup/descr directory or by using the following command over the NLD-9 repository of your network installation source:
for i in `grep -l baseconf CD1/suse/setup/descr/* `; do basename $i .sel; done
The above command generates the following output:
Gnome Kde
which matches the base selections in NLD.
Additionally, you can configure package updates using the following options:
You can also use the software_proposal element to switch from desktop-based proposals to the normal behavior of software proposals in YaST. Setting the value to desktop makes YaST show a dialog with desktops to select from (KDE or GNOME). If this element is not defined, default behavior is assumed.
You can also add additional software by creating custom software selections according to the procedure described in Software and pulling them in via the software proposal described in Software.
To add a custom selection to your installation scope, proceed as follows:
Prepare an add-on selection containing the additional software you want to include in the installation of NLD according to the procedure outlined in Custom Package Selections.
Add the selection to the control file.
The software section of your control file should now read as follows.:
<software>
<selection_type config:type=”symbol”>fixed</selection_type>
<addons config:type=”list”>
<addon>mysel</addon>
</addons>
<base>Minimal</base>
...
</software>
The addons property encloses any additional selections you want to add. Just list any selection here, again enclosed by addon, and replace mysel with the actual name of your custom selection. The standard NLD selections you want to make are enclosed by the base element. A list of packages is added by the following code:
<software> <selection_type config:type=”symbol”>fixed</selection_type> ... <packages config:type=”list”> <package>package1</package> <package>package2</package> ... </packages> </software>
Replace package1 and package2 with package names matching your needs.
If present, the partition proposal is based on the data provided in the control file.
Space allocation on a disk happens in the following order:
If more than one of the available disks are eligible to hold a certain partition set, the disk is selected as follows:
If there are multiple partition groups:
The following elements are global to all disks and partitions:
Table 2-9 Configuration Elements
In the example below, if the machine has three disks, each of the partition groups is put on a separate disk. So one disk holds /var; another disk holds /home; and another disk holds /, /usr, and /opt.
<partitions config:type=”list”> <partition> <disk config:type=”integer”>3</disk> <mount>/var</mount> <percent config:type=”integer”>100</percent> </partition> <partition> <disk config:type=”integer”>2</disk> <mount>/</mount> <size>1G</size> </partition> <partition> <disk config:type=”integer”>2</disk> <mount>/usr</mount> <size>2G</size> </partition> <partition> <disk config:type=”integer”>2</disk> <mount>/opt</mount> <size>2G</size> </partition> <partition> <disk config:type=”integer”>1</disk> <mount>/home</mount> <percent config:type=”integer”>100</percent> </partition> </partitions>
If the machine has only two disks, then /home is on a separate disk (because it has lower priority than the other partition groups) and /, /usr, /opt, and /var share the other disk. If there is only one disk in the system, all partitions are on that disk.
A more complete example with other options is shown below:
<partitioning> <partitions config:type=”list”> <partition> <disk config:type=”integer”>2</disk> <mount>swap</mount> <size>auto</size> </partition> <partition> <disk config:type=”integer”>1</disk> <fstopt>defaults</fstopt> <fsys>reiser</fsys> <increasable config:type=”boolean”>true</increasable> <mount>/</mount> <size>2gb</size> </partition> <partition> <disk config:type=”integer”>2</disk> <fstopt>defaults,data=writeback,noatime</fstopt> <fsys>reiser</fsys> <increasable config:type=”boolean”>true</increasable> <mount>/var</mount> <pct config:type=”integer”>100</pct> <size>2gb</size> </partition> </partitions> <prefer_remove config:type=”boolean”>true</prefer_remove> <remove_special_partitions config:type=”boolean”>false </remove_special_partitions> </partitioning>
It is possible to add hooks before and after any workflow step for further customization of the installed system and to perform nonstandard tasks during installation.
Two additional elements define custom script hooks:
Both script types accept two elements: the interpreter used (Shell or Perl) and the source of the scripts (which is embedded in the XML file using CDATA sections to avoid confusion with the XML syntax). The following example shows how scripts can be embedded in the control file:
<module> <name>info</name> <arguments>false,true</arguments> <prescript> <interpreter>shell</interpreter> <source> <![CDATA[#!/bin/sh touch /tmp/tux echo anas > /tmp/anas ]]> </source> </prescript> </module>
The following example should outline the basic procedure to install one or multiple targets with a predefined installation scope using a control.xml file.
The example assumes the following items are present in your environment and correctly set up:
To proceed with the installation, do the following:
Boot the target machines either using a physical boot medium or via the network.
If using boot media, make sure the location of the network installation source is passed on to the installation routines. See Using Custom Boot Options.
YaST starts up and pulls in the control.xml file from the installation server, then the installation proceeds as outlined in the control.xml file.
Make the settings the custom workflow requires you to, then complete the installation.
HINT:Because this procedure closely resembles a standard network installation, any of the techniques mentioned in Remote Installation can be used to remotely control the installation procedure.