1.2. Firstboot Configuration

The YaST firstboot utility (YaST Initial System Configuration), which runs after the installation is completed, lets you configure the 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. YaST firstboot does not run by default and has to be configured to run by the user or the system administrator. It is useful for image deployments where the system in the image is completely configured. However, some final steps such as root password and user logins have to be created to personalize the system.

The default workflow for the interface is as follows:

  1. The Welcome screen

  2. The License Agreement

  3. Date & Time

  4. Network

  5. Root Password

  6. User Account

  7. Hardware

  8. Finish

During firstboot, two additional dialogs are shown for writing the data and running SuSEconfig which require no user interaction.

1.2.1. Enabling Firstboot

Firstboot is disabled by default. The yast2-firstboot package is not part of any software selection and has to be installed individually. During the Installation, click Software in the Installation Settings screen, then select the yast2-firstboot package in the Rest selection list.

  1. Install the product on a master box, making sure that you install the firstboot package. Configure whole system including system services, hardware components,...

  2. Create the empty file /var/lib/YaST2/reconfig_system. This file will be deleted when firstboot configuration is completed. This can be done by issuing the command: touch /var/lib/YaST2/reconfig_system

After getting the system installed and prepared, shut it down and clone the hard disk to hard disk to all of the machines.

When the system comes up after a shutdown and cloning, the firstboot configuration utility will be started and the user will be presented with the configuration screens.

There are different ways the firstboot configuration utility can be used, one of them for creating installation images. The following step by step description shows how an image can be created after firstboot has been enabled.

  1. Boot the master box using the rescue boot option.

  2. Configure network in the rescue system.

  3. Mount an NFS exported directory to /mnt.

  4. Run dd if=/dev/hda of=/mnt/image.bin count=4000000 to store the master box's hard disk image onto the NFS server.

And to install the image you have just created:

  1. Boot a user's machine using the rescue boot option.

  2. Configure network in the rescue system.

  3. Mount the NFS exported directory to /mnt.

  4. Run dd if=/mnt/image.bin of=/dev/hda count=4000000.

  5. Remove the boot media and boot the user's machine.

  6. After firstboot comes up, configure the date and time, root password, and user account and any other additional settings.

The Post Configuration Utility (firstboot) expects the X server to be configured. If no X server is configured, it will automatically start in text mode.

1.2.2. Customizing YaST Firstboot Customizing Messages

The utility has standard and translated texts in the default setup. If you want to change those texts, use the firstboot configuration file,/etc/sysconfig/firstboot.

This file lets you change the text of the following dialogs:

  • Welcome screen

  • License Agreement

  • Finish dialog

To do this, change the values of the respective variables (FIRSTBOOT_WELCOME_DIR, FIRSTBOOT_WELCOME_PATTERNS, FIRSTBOOT_LICENSE_DIR, FIRSTBOOT_NOVELL_LICENSE_DIR, and FIRSTBOOT_FINISH_FILE). This will give you dialogs with customized text. If the references files are in plain text, they will be shown as such automatically. If they contain any markup language, they will be formatted as rich text.

Variable FIRSTBOOT_WELCOME_DIR is path to the directory from which is the welcome message read, FIRSTBOOT_WELCOME_PATTERNS is a list of patterns or filenames which contains the message.

The license is read from file 'license.txt' or from 'license_<locale>.txt'. The license texts of the Novell base product are by default installed to the directory /etc/YaST2/licenses/base/, set different value to FIRSTBOOT_NOVELL_LICENSE_DIR if they are elsewhere. Use FIRSTBOOT_LICENSE_DIR to indicate a path to directory containing vendor licence texts; it is preferred to put these license texts into another subdirectory of /etc/YaST2/licenses/.

If you want to use FIRSTBOOT_FINISH_FILE, you need to update the firstboot workflow so that it calls firstboot_finish instead of inst_finish. The recommended way of customizing the congratulate text is specifying it in the firstboot.xml control file. License Action

The variable LICENSE_REFUSAL_ACTION sets the action to be executed if the user does not accept the license. The following options are available:

  • halt: system is halted (shut down)

  • continue: continue with configuration

  • abort: Abort firstboot configuration utility and continue with the boot process. Release Notes

Use the configuration option FIRSTBOOT_RELEASE_NOTES_PATH to show release notes in the target language. The value of the option should be a path to a directory with files using language dependent naming (RELEASE-NOTES.{language}.rtf). For english, the following file will be needed: RELEASE-NOTES.{language}.rtf.

The original release notes for the installed product availabe in /usr/share/doc/release-notes can be used as an example. Customizing Workflow Components

The default firstboot workflow can be controled using one single file which is a subset of the control.xml file used to control the complete installation. The firstboot control file consists of workflow and proposal configurations and can be used to add or remove configuration screens depending on the end configuration of the system. The file firstboot.xml is installed with the yast2-firstboot package and can be found at the following location: /etc/YaST2/firstboot.xml.

This file can be modified to match the post installation requirements of the product in question. In addition to the default and pre-installed components, custom screens can be added to enable maximal flexiblity during post installation.

Instead of modifying the default /etc/YaST2/firstboot.xml file, it is possible to put the customized one to different location and specify path to it by altering the value of FIRSTBOOT_CONTROL_FILE variable in /etc/sysconfig/firstboot. Using Automatic Configuration

Since openSUSE11.0, installer does most part of the system configuration automatically, without user interaction. This feature is also available in firstboot stage. If you have the system installed and only partially configured (e.g. because of different hardware on your computers), enable inst_automatic_configuration step in the firstboot workflow. In the "globals" section of your workflow description file (firstboot.xml), define the steps that should be part of the Automatic Configuration process.

For detailed information, see "Automatic Configuration" section of /usr/share/doc/packages/yast2-installation/control-doc/index.html file, part of yast2-installation-devel-doc package.

1.2.3. Scripting

You can add scripts to be executed at the end of the firstboot configuration to customize the system depending on user input or the environment of the machine. Scripts should be placed in /usr/share/firstboot/scripts or in a custom location that can be set using the /etc/sysconfig/firstboot configuration file.

1.2.4. Firstboot and AutoYaST

It is possible to configure the firstboot process as a part of autoinstallation, so the system can be installed with most of the default values set via AutoYaST profile, leaving the rest to the end user during the firstboot sequence.

As a part of autoinstallation configuration, you need to provide all the changes mentioned above:

  • Customize /etc/sysconfig/firstboot: it can be done e.g. via Sysconfig Editor in System section of AutoYaST configuration module.

  • Provide customized firstboot.xml file and point to its location in FIRSTBOOT_CONTROL_FILE value of /etc/sysconfig/firstboot.

  • Enable Firstboot: do it via GUI in Misc/Firstboot section of AutoYaST configuration module or manually by adding the section

        <firstboot_enabled config:type="boolean">true</firstboot_enabled>

    to your AutoYaST profile.