Autoinstallable Distributions
The autoinstallation process relies on an several files to initiate the installation. These files include the Linux kernel, an initial RAM disk, and other files required to boot the operating system in installation mode.
Uyuni uses the mgradm
tool to copy the installation file from the source to the server container.
You can extract the needed files from a DVD image. For information, see Distribution Based on an ISO Image.
Alternatively, you can install the tftpboot-installation
package.
For information, see Distribution Based on a RPM Package.
You must also have a base channel synchronized on your Uyuni Server for the same operating system version as those files.
When you have the files ready, and the base channel synchronized, you need to declare the distribution. This operation associates the installation files to the base channel. The distribution can be referred to by one or more installation profiles. For information, see Declare an Autoinstallable Distribution.
1. Distribution Based on an ISO Image
This method assumes you have installation media for the operating system you want to install on the clients.
This is usually a DVD .iso
image that contains the Linux kernel, an initrd
file, and other files required to boot the operating system in installation mode.
-
Use
mgradm
to import installation data from the ISO image:# mgradm distribution copy <image_name>.iso <image_name>
-
Take a note of the distribution path reported by
mgradm
. You will need it when you declare the distribution to Uyuni.
1.1. Distribution autodetection and registration
mgradm
is able to automatically detect distribution name and register it to the server.
Provided ISO image needs to contain a .treeinfo
file.
-
Use
mgradm
:# mgradm distribution copy --api-user <username> --api-password <password> <image_name>.iso
2. Distribution Based on a RPM Package
This method works on SUSE systems. It is simpler than importing contents from an installation media, because it uses prepackaged files for your installation system.
-
On the Uyuni Server, install the package whose name starts with
tftpboot-installation
. You can determine its exact name with the commandzypper se tftpboot-installation
-
You can install the package to different root to avoid need for restart using following command:
# mkdir /opt/tftpinstall # zypper --installroot /opt/tftpinstall install tftpboot-installation-SLE-Micro-5.5-x86_64
-
Find the installation files with the command
ls -d /opt/tftpinstall/usr/share/tftpboot-installation/*
. -
Copy installation files using
mgradm
:# mgradm distribution copy /opt/tftpinstall/usr/share/tftpboot-installation/SLE-Micro-5.5-x86_64 SLE-Micro-5.5-x86_64
-
Take a note of the distribution path reported by
mgradm
tool. You will need it when you declare the distribution to Uyuni. -
After
mgradm
tool finishes, you can remove/opt/tftpinstall
directory.
This procedure prepares the installation of the same operating system version as the one that powers your Uyuni Server.
If you want to install a different operating system or version on the client, you need to manually get the package tftpboot-installation-*
from the distribution it belongs to.
In the Package Search
input box Uyuni, search the packages whose names start with tftpboot-installation
, then look at the package’s details.
They show the local path below /var/spacewalk/
.
3. Declare an Autoinstallable Distribution
The next step after extracting the autoinstallation files is to declare an autoinstallable distribution.
-
In the Uyuni Web UI, navigate to
. -
Click
Create Distribution
, and complete these fields:-
In the
Distribution Label
field, enter a name to identify your autoinstallable distribution. -
In the
Tree Path
field, enter the path to the installation media saved on your Uyuni Server. -
Select the matching
Base Channel
. This must match the installation media. -
Select the
Installer Generation
. This must match the installation media. -
OPTIONAL: Specify kernel options to use when booting this distribution. There are multiple ways to provide kernel options. Only add options here that are generic for the distribution.
-
-
Click Create Autoinstallable Distribution.
The installation files that you prepared might not contain the packages you need to install.
If they are not included, add useonlinerepo=1
to the Kernel Options
field.
The package repositories contain metadata that can be unsigned.
If the metadata is unsigned, add insecure=1
to the Kernel Options
field, or use your own GPG key as explained in Use Your Own GPG Key.
These kernel options are needed for example when you use the "online installer" ISO images instead of the full DVD, or when you use the tpboot-installation
package.
Navigate to
to manage your autoinstallable distributions.4. Handling Kernel Options for Distributions and Profiles
Uyuni is able to combine the kernel options that you assign. This is done using a special inheritance logic. There are three object types that are relevant for this:
-
Distributions (or short "Distros")
-
Profiles
-
Systems
As a fourth special point of influence on the final kernel options is the Cobbler settings file /etc/cobbler/settings.yaml
.
The Cobbler settings file defines default kernel options for all distributions.
This is not supported in the context of Uyuni.
Understanding raw and resolved values is crucial for managing kernel options effectively.
-
Raw values: These refer to values attached directly to a specific Cobbler item and stored as-is in Cobbler’s internal database.
-
Resolved values: These values are dynamically generated at runtime, respecting the inheritance hierarchy of Cobbler items.
If you prefix an option with !
then the option will be removed from the final kernel command line.
Uyuni will manage the kernel options for both Profiles and Systems for you. As such you may only edit the kernel options for Distros.
4.1. Examples
4.1.1. Basic Inheritance Example
Distribution raw value
install=http://uyuni.server/ks/dist/SLES15SP4 self_update=0
Profile raw value
console=tty1
System raw value
console=ttyS0
Resolved value for a system inheriting this profile
install=http://uyuni.server/ks/dist/SLES15SP4 self_update=0 console=ttyS0
4.1.2. Option Removal Example
Distribution raw value
install=http://uyuni.server/ks/dist/SLES15SP4 self_update=0
Profile raw value
console=tty1
System raw value
!self_update
Resolved value for a system inheriting this profile
install=http://uyuni.server/ks/dist/SLES15SP4 console=ttyS0