Installation process overview
The purpose of this document is to offer some information about how the installation process of SUSE and openSUSE works from a technical point of view. It is, in no way, oriented to the end-user although it could be easily understood for a regular Linux user.
Different installation modes are supported, ranging from a regular installation
to an unattended one. Also system update or repair are supported. You could
take a look at yast-yast2
to learn more about that. This document is mainly about
Although YaST sits at the central point of the installation process, it is not the only software involved. Linuxrc, which will be started just before YaST, is another key player.
Linuxrc sets up the hardware and initializes the installation process. It can
do very cool things and have a lot of
options for you to
tweak. Newcomers should take a look at
and, of course,
After the system is started, a script called
/sbin/inst_setup is ran. That
script performs some initialization tasks and, at the end, calls YaST first
stage (known as
initial). This is the main part of the installation
workflow: disks are set up (partitions and filesystem), software is installed,
boot loader is prepared, etc. When the first stage is over, the machine is
rebooted to get into YaST second stage (known as
continue) if needed.
That second stage is not always needed. As of SLE 12 and openSUSE 13.2 and later, a regular installation is done just during the YaST2 First Stage and the second one is not used anymore. When it comes to AutoYaST, the second stage is used for system configuration.
Let’s see the process in a more detailed way.
Installer boot process
After the system boots, the first program to run is
/sbin/inst_setup. It’s a
shell script that performs some initialization tasks and, at the end, it
invokes the YaST2 first stage.
inst_setup initialization tasks, we could highlight:
- Starting basic services like klog, syslog or nscd.
- Setting host and domain names.
- Managing YaST driver updates.
- Handling the SSH installation (letting the user start the process through
- Registering the VNC service through SLP if needed.
- Handling the
STARTSHELLparameter to launch a shell before starting YaST if it was requested by the user.
Unless SSH must be used to perform the installation,
inst_setup will start
the YaST2.First-Stage just executing
/sbin/yast. Otherwise, the user will
launch YaST calling
At this stage,
/sbin/yast is just a symbolic link to
/usr/lib/YaST2/startup/YaST2.First-Stage. The main purpose of this script is
to kick off the installation process (through
yast-installation). After some
initialization work (described below), this script goes through a series of
steps defined scripts at
So the workflow is something like:
- Import installation settings from
/etc/install.infas environment variables (
- Enable logging into
- Execute the
FirstStage(see stages/steps). Additional
postFirstCallhooks are called. YaST gets called at this point.
Finally, the script exits (returning the error code from YaST) and control is
Maybe the use of the term stage here could be somewhat confusing. You must just take into account that the following stages are just the steps performed during the installation’s First Stage. We keep the term stage to refer to both of them just because it’s the way they’re called in the source code.
If you want to know the nitty-gritty details of those steps, you could find them
- Hardware detection through
- Set up the language. Remember that you could specify a language through
the Linuxrc parameter
- Handle kernel parameters. A this time, it only copy
- Configure the terminal (and save TERM to
- Set environment variables related to YaST log (size and max logs count).
- Start YaST in installation mode (
/usr/lib/YaST2/startup/YaST2.call installation initial.
- Umount partitions and write exit code at
For YaST, the installation is now in the
At this point, the
installation client relies on
inst_worker_initial. You could take a
look at the documentation about installation
clients to learn more.
Depending on the installation
which is set to
installation by default, some initialization tasks are
performed and flow control is hand over to
module, which is responsible of driving the installation process.
Just as a side note, if
/etc/install.inf contains an
AutoYaST entry, mode will be set to
autoinstall and the installation will be handled by AutoYaST.
After the first reboot, the YaST2.Second-Stage comes into action. It’s defined as a systemd
service (take a look at
This service is ran only if a file
The script is located at
/usr/lib/YaST2/startup/YaST2.Second-Stage and, as first stage,
it performs some initializations tasks and then go through a series of steps defined as
- Disable splash screen.
- Import installation settings from
/etc/install.infas environment variables.
- Set up architecture variables.
- Prepare manpages and info files directories.
- Start startup logging at
- Execute the
SecondStage(see stages). Additional
postSecondCallhooks are executed. YaST gets called at this point.
The scripts which perform these steps live in
/usr/lib/YaST2/startup/Second-Stage. They are responsible for:
- Setting up logging (including
/var/lib/autoinstall/autoconf/autoconf.xmlis found, then AutoYaST is started (as
/usr/lib/YaST2/startup/YaST2.call installation continue) and, after it exits, the second stage is over (next steps won’t be executed).
- Setting up language stuff (
- Setting up virtual console.
- Starting services as
hald(Hardware Abstraction Layer).
- Bringing up network (if configuration is found), starting a second shell and getting prepared for a VNC installation (if needed).
- Starting YaST. If installation is done through SSH, at this point the user must log in and launch YaST manually.
- Cleaning up things when installation is finished.
The client which drives the second stage is
inst_worker_continue. Of course, it
During installation, YaST is invoked through
YaST2.call script. This script is
responsible for detecting the installation medium: Qt, SSH, VNC and ncurses.
It also checks requirements for selected medium and falls back to ncurses if they
are not met.
The control file
YaST installation process is really very flexible. What actions must be taken in
different modes and scenarios are described in the control file. YaST searches for that file
/etc/YaST2/control.xml and each SUSE product will
have their own file.
Quite nice documentation lives in this repository about the content of these files.