Customizing the Firstboot Installation

Customizing the firstboot installation may involve several different components. Customizing them is optional. If you do not make any changes, firstboot performs the installation using the default settings. The following options are available:

To customize any of these components, adjust the following configuration files:

/etc/sysconfig/firstboot

Configure various aspects of firstboot, such as release notes, scripts, and license actions.

/etc/YaST2/firstboot.xml

Configure the installation workflow by enabling or disabling components or adding custom ones.

Customizing YaST Messages

By default, an installation of SUSE Linux Enterprise contains several default messages that are localized and displayed at certain stages of the installation process. These include a welcome message, a license message, and a congratulatory message at the end of installation. You can replace any of these with your own versions and include localized versions of them in the installation. To include your own welcome message, proceed as follows:

  1. Log in as root.

  2. Open the /etc/sysconfig/firstboot configuration file and apply the following changes:

    1. Set FIRSTBOOT_WELCOME_DIR to the directory path where you want to store the files containing the welcome message and the localized versions, for example:

      FIRSTBOOT_WELCOME_DIR="/usr/share/firstboot/"
      
    2. If your welcome message has filenames other than welcome.txt and welcome_locale.txt (where locale matches the ISO 639 language codes such as “cs” or “de”), specify the filename pattern in FIRSTBOOT_WELCOME_PATTERNS. For example:

      FIRSTBOOT_WELCOME_PATTERNS="mywelcome.txt"

      If unset, the default value of welcome.txt is assumed.

  3. Create the welcome file and the localized versions and place them in the directory specified in the /etc/sysconfig/firstboot configuration file.

Proceed in a similar way to configure customized license and finish messages. These variables are FIRSTBOOT_LICENSE_DIR and FIRSTBOOT_FINISH_FILE.

Customizing the License Action

You can customize the way the installation system reacts to a user not accepting the license agreement. There are three different ways in which the system could react to a user's failure to accept the license:

halt

The firstboot installation is aborted and the entire system shuts down. This is the default setting.

continue

The firstboot installation continues.

abort

The firstboot installation is aborted, but the system tries to boot.

Make your choice and set LICENSE_REFUSAL_ACTION to the appropriate value.

Customizing the Release Notes

Depending on whether you have changed the instance of SUSE Linux Enterprise you are deploying with firstboot, you probably need to educate the end users about important aspects of their new operating system. A standard installation uses release notes, displayed during one of the final stages of the installation, to provide important information to the users. To have your own modified release notes displayed as part of a firstboot installation, proceed as follows:

  1. Create your own release notes file. Use the RTF format as in the example file in /usr/share/doc/release-notes and save the result as RELEASE-NOTES.en.rtf (for English).

  2. Store optional localized versions next to the original version and replace the en part of the filename with the actual ISO 639 language code, such as de for German.

  3. Open the firstboot configuration file from /etc/sysconfig/firstboot and set FIRSTBOOT_RELEASE_NOTES_PATH to the actual directory where the release notes files are stored.

Customizing the Workflow

By default, a standard firstboot workflow includes the following components:

  • Language Selection

  • Welcome

  • License Agreement

  • Host Name

  • Network

  • Time and Date

  • Desktop

  • root Password

  • User Authentication Method

  • User Management

  • Hardware Configuration

  • Finish Setup

This standard layout of a firstboot installation workflow is not mandatory. You can enable or disable certain components or hook your own modules into the workflow. To modify the firstboot workflow, manually edit the firstboot configuration file /etc/YaST2/firstboot.xml. This XML file is a subset of the standard control.xml file that is used by YaST to control the installation workflow.

The following overview provides you with enough background to modify the firstboot installation workflow. In it, see the basic syntax of the firstboot configuration file and how the key elements are configured.

Example 6.1. Configuring the Proposal Screens

    …
    <proposals config:type="list">1
        <proposal>2
            <name>firstboot_hardware</name>3
            <mode>installation</mode>4
            <stage>firstboot</stage>5
            <label>Hardware Configuration</label>6
            <proposal_modules config:type="list">7
                <proposal_module>printer</proposal_module>8
            </proposal_modules>
        </proposal>
        <proposal>
        …
        </proposal>
    </proposals>
   

1

The container for all proposals that should be part of the firstboot workflow.

2

The container for an individual proposal.

3

The internal name of the proposal.

4

The mode of this proposal. Do not make any changes here. For a firstboot installation, this must be set to installation.

5

The stage of the installation process at which this proposal is invoked. Do not make any changes here. For a firstboot installation, this must be set to firstboot.

6

The label to be displayed on the proposal.

7

The container for all modules that are part of the proposal screen.

8

One or more modules that are part of the proposal screen.

The next section of the firstboot configuration file consists of the workflow definition. All modules that should be part of the firstboot installation workflow must be listed here.

Example 6.2. Configuring the Workflow Section

    <workflows  config:type="list">
        <workflow>
            <defaults>
                <enable_back>yes</enable_back>
                <enable_next>yes</enable_next>
                <archs>all</archs>
            </defaults>
            <stage>firstboot</stage>
            <label>Configuration</label>
            <mode>installation</mode>
            … <!–– list of modules  ––>
            </modules>
        </workflow>
    </workflows>
    …
  

The overall structure of the workflows section is very similar to that of the proposals section. A container holds the workflow elements and the workflow elements all include stage, label and mode information just as the proposals introduced in Example 6.1, “Configuring the Proposal Screens”. The most notable difference is the defaults section, which contains basic design information for the workflow components:

enable_back

Include the Back button in all dialogs.

enable_next

Include the Next button in all dialogs.

archs

Specify the hardware architectures on which this workflow should be used.

Example 6.3. Configuring the List of Workflow Components

    <modules  config:type="list">1
        <module>2
            <label>Language</label>3
            <enabled config:type="boolean">false</enabled>4
            <name>firstboot_language</name>5
        </module>
    <modules>
  

1

The container for all components of the workflow.

2

The module definition.

3

The label displayed with the module.

4

The switch to enable or disable this component in the workflow.

5

The module name. The module itself must be located under /usr/share/YaST2/clients and have the .ycp file suffix.

To make changes to the number or order of proposal screens during the firstboot installation, proceed as follows:

  1. Open the firstboot configuration file at /etc/YaST2/firstboot.xml.

  2. Delete or add proposal screens or change the order of the existing ones:

    • To delete an entire proposal, remove the proposal element including all its subelements from the proposals section and remove the respective module element (with subelements) from the workflow.

    • To add a new proposal, create a new proposal element and fill in all the required subelements. Make sure that the proposal exists as a YaST module in /usr/share/YaST2/clients.

    • To change the order of proposals, move the respective module elements containing the proposal screens around in the workflow. Note that there may be dependencies to other installation steps that require a certain order of proposals and workflow components.

  3. Apply your changes and close the configuration file.

You can always change the workflow of the configuration steps when the default does not meet your needs. Enable or disable certain modules in the workflow or add your own custom ones.

To toggle the status of a module in the firstboot workflow, proceed as follows:

  1. Open the /etc/YaST2/firstboot.xml configuration file.

  2. Change the value for the enabled element from true to false to disable the module or from false to true to enable it again.

    <module>
        <label>Time and Date</label>
        <enabled config:type="boolean">true</enabled>
        <name>firstboot_timezone</name>
    </module>
    
  3. Apply your changes and close the configuration file.

To add a custom made module to the workflow, proceed as follows:

  1. Create your own YaST module and store the module file module_name.ycp in /usr/share/YaST2/clients.

  2. Open the /etc/YaST2/firstboot.xml configuration file.

  3. Determine at which point of the workflow your new module should be run. In doing so, make sure that possible dependencies to other steps in the workflow are taken into account and resolved.

  4. Create a new module element inside the modules container and add the appropriate subelements:

    <modules config:type="list">
         …
         <module>
            <label>my_module</label>
            <enabled config:type="boolean">true</enabled>
            <name>filename_my_module</name>
         </module>
    </modules>
    
    1. Enter the label to display on your module in the label element.

    2. Make sure that enabled is set to true to have your module included in the workflow.

    3. Enter the filename of your module in the name element. Omit the full path and the .ycp suffix.

  5. Apply your settings and close the configuration file.

[Tip]For More Information

For more information about YaST development, refer to http://developer.novell.com/wiki/index.php/YaST.

Configuring Additional Scripts

firstboot can be configured to execute additional scripts after the firstboot workflow has been completed. To add additional scripts to the firstboot sequence, proceed as follows:

  1. Open the /etc/sysconfig/firstboot configuration file and make sure that the path specified for SCRIPT_DIR is correct. The default value is /usr/share/firstboot/scripts.

  2. Create your shell script, store it in the specified directory, and apply the appropriate file permissions.