可自动安装的发行套件

自动安装过程依赖于几个文件来启动安装。这些文件包括 Linux 内核、初始 RAM 磁盘和在安装模式下引导操作系统所需的其他文件。

SUSE Multi-Linux Manager uses the mgradm tool to copy the installation file from the source to the server container.

您可以从 DVD 映像中提取所需的文件。有关信息,请参见 基于 ISO 映像的发行套件

Alternatively, you can install the tftpboot-installation package. For information, see Distribution Based on a RPM Package.

对于与这些文件相同的操作系统版本,您还必须在 SUSE Multi-Linux Manager 服务器上同步基础通道。

当您准备好文件并已同步基础通道时,您需要声明发行套件。此操作会将安装文件关联到基础通道。发行套件可能会由一个或多个安装配置文件引用。有关信息,请参见声明可自动安装的发行套件

1. 基于 ISO 映像的发行套件

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.

过程:从安装媒体导入文件
  1. Use mgradm to import installation data from the ISO image:

    # mgradm distribution copy <映像名称>.iso <映像名称>
  2. Take a note of the distribution path reported by mgradm. You will need it when you declare the distribution to SUSE Multi-Linux Manager.

1.1. 发行套件自动检测和注册

mgradm is able to automatically detect distribution name and register it to the server. Provided ISO image needs to contain a .treeinfo file.

过程:导入发行套件文件并执行自动检测和注册
  1. Use mgradm:

    # mgradm distribution copy --api-user <用户名> --api-password <口令> <映像名称>.iso

2. 基于 RPM 软件包的发行套件

此方法适用于 SUSE 系统。它比从安装媒体导入内容更简单,因为它使用的是安装系统的预打包文件。

过程:从安装软件包提取文件
  1. On the SUSE Multi-Linux Manager Server, install the package whose name starts with tftpboot-installation. You can determine its exact name with the command zypper se tftpboot-installation

  2. 可使用以下命令将软件包安装到其他根目录,以避免重启:

    # mkdir /opt/tftpinstall
    # zypper --installroot /opt/tftpinstall install tftpboot-installation-SLE-Micro-5.5-x86_64
  3. Find the installation files with the command ls -d /opt/tftpinstall/usr/share/tftpboot-installation/*.

  4. 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
  5. Take a note of the distribution path reported by mgradm tool. You will need it when you declare the distribution to SUSE Multi-Linux Manager.

  6. 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 SUSE Multi-Linux Manager 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 SUSE Multi-Linux Manager, 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. 声明可自动安装的发行套件

提取自动安装文件后,接下来要声明可自动安装的发行套件。

过程:声明可自动安装的发行套件
  1. 在 SUSE Multi-Linux Manager Web UI 中,导航到系统  自动安装  发行套件

  2. 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 SUSE Multi-Linux Manager Server.

    • Select the matching Base Channel. This must match the installation media.

    • Select the Installer Generation. This must match the installation media.

    • 可选:指定引导此发行套件时要使用的内核选项。您可以通过多种方式来提供内核选项。此处仅添加了发行套件通用的选项。

  3. 单击 创建可自动安装的发行套件

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.

导航到系统  自动安装  发行套件可管理您的可自动安装的发行套件。

You can autoinstall SUSE Multi-Linux Manager Proxy 4.3 in the same way as SUSE Linux Enterprise clients. Make sure you use the SUSE Linux Enterprise installation media, and choose the SLE-Product-SUSE-Manager-Proxy-4.3-Pool for x86_64 base channel.

4. 处理发行套件和配置文件的内核选项

SUSE Multi-Linux Manager 可以合并您指定的内核选项。这通过特殊的继承逻辑来实现。与此功能有关的对象类型有以下三种:

  1. 发行套件(简称“Distro”)

  2. 配置文件

  3. 系统

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 SUSE Multi-Linux Manager.

了解原始值和解析后的值对于有效管理内核选项至关重要。

  1. 原始值:指的是直接附加至特定 Cobbler 项的值,会原样存储在 Cobbler 的内部数据库中。

  2. 解析后的值:这些值在运行时按照 Cobbler 项的继承层次结构动态生成。

If you prefix an option with ! then the option will be removed from the final kernel command line.

SUSE Multi-Linux Manager 会为您管理“配置文件”和“系统”的内核选项。这样您就只需要编辑“Distro”的内核选项。

4.1. 示例

4.1.1. 基本的继承示例

发行套件原始值

install=http://uyuni.server/ks/dist/SLES15SP4 self_update=0

配置文件原始值

console=tty1

系统原始值

console=ttyS0

继承此配置文件的系统的解析后

install=http://uyuni.server/ks/dist/SLES15SP4 self_update=0 console=ttyS0

4.1.2. 选项去除示例

发行套件原始值

install=http://uyuni.server/ks/dist/SLES15SP4 self_update=0

配置文件原始值

console=tty1

系统原始值

!self_update

继承此配置文件的系统的解析后

install=http://uyuni.server/ks/dist/SLES15SP4 console=ttyS0