From Fedora Project Wiki


Replace the Anaconda product configuration files with profiles

Summary

In Anaconda, we would like to introduce profile configuration files and remove the support for product configuration files.

Owner

Current status

Detailed Description

Anaconda allows to change its configuration based on a detected product using the product configuration files. The configuration is chosen based on the inst.product and inst.variant boot options, or the Product and Variant options of the .buildstamp file, or the NAME option in the os-release files.

This solution has several flaws:

  • The detection based on the os-release files will no longer work because of a Fedora 35 change.
  • The .buildstamp file is generated by lorax when it creates is a boot.iso. Therefore, we have to rely on other solutions during the live, dir and image installations.
  • The inst.product and inst.variant boot options are misleading. Anaconda will run with a different configuration. That doesn't mean it will install a different product.
  • The configuration has to use a fake product name for its identification if it is not tied to a real product.

We would like to redesign the product configuration files to solve these issues. The idea is to replace them with more general profile configuration files:

  • The profile will be identified by a unique id.
  • The profile can specify additional options for the automated profile detection.
  • The profile will be chosen based on the inst.profile boot option, or based on the ID and VARIANT_ID options of the os-release files.

For example, Fedora Server uses a configuration from /etc/anaconda/product.d/fedora-server.conf. The configuration can be enforced with the inst.product=Fedora inst.variant=Server boot options. The file contains the following sections:

[Product]
product_name = Fedora
variant_name = Server

[Base Product]
product_name = Fedora

After this change, Fedora Server will use a configuration from /etc/anaconda/profile.d/fedora-server.conf. The configuration can be enforced with the inst.profile=fedora-server boot option. The file will contain the following sections:

[Profile]
# Define the profile.
profile_id = fedora-server
base_profile = fedora

[Profile Detection]
# Match os-release values.
os_id = fedora
variant_id = server

The full draft of the profile configuration files is provided at: https://github.com/rhinstaller/anaconda/pull/3388

Feedback

Benefit to Fedora

  • The installer will use ids instead of names. That will solve the problem with the Fedora 35 change and prevent similar issues in the future.
  • All types of installation will use os-release values to identify the product. We can remove workarounds for boot.iso and Live ISO.
  • The inst.profile option makes more sense, because it allows to choose a different installation profile.
  • A configuration, that is not tied to a product, doesn't have to provide a fake product name or id.

Scope

  • Proposal owners: Will submit a pull request for the anaconda package.
  • Other developers: Should be no impact. Anaconda provides configuration files for all Fedora products and the products rely on the automated detection of configuration files.
  • Policies and guidelines: N/A (not needed for this Change)
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives: None.

Upgrade/compatibility impact

How To Test

Test the automated profile detection:

  1. Download and boot the Fedora Server ISO.
  2. The installation is started with the Fedora Server configuration.

Test the inst.profile boot option:

  1. Download and boot the Fedora Everything ISO.
  2. Add the inst.profile=fedora-server boot option.
  3. The installation is started with the Fedora Server configuration.

User Experience

  • Users will have to use the inst.profile boot option instead of inst.product and inst.variant.
  • Maintainers of custom product configuration files will have to change their files.

Dependencies

None.

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? N/A (not a System Wide Change), Yes/No

Documentation

https://anaconda-installer.readthedocs.io/en/latest/configuration-files.html#profile-configuration-files

Release Notes

The support for the product configuration files was removed and replaced with profiles.

Each profile can be identified by a unique id and it can define additional options for the automated profile detection. The profile will be chosen based on the inst.profile boot option, or based on the ID and VARIANT_ID options of the os-release files. The profile configuration files are located in the /etc/anaconda/profile.d/ directory.

The inst.product and inst.variant boot options are deprecated.