22.2. Kickstart commands for installation program configuration and flow control


The Kickstart commands in this list control the mode and course of installation, and what happens at its end.

22.2.1. cdrom

The cdrom Kickstart command is optional. It performs the installation from the first optical drive on the system. Use this command only once.

Syntax
cdrom
Notes
  • This command has no options.
  • To actually run the installation, you must specify one of cdrom, harddrive, hmc, nfs, liveimg, ostreesetup, rhsm, or url unless the inst.repo option is specified on the kernel command line.

22.2.2. cmdline

The cmdline Kickstart command is optional. It performs the installation in a completely non-interactive command line mode. Any prompt for interaction halts the installation. Use this command only once.

Syntax
cmdline
Notes
  • For a fully automatic installation, you must either specify one of the available modes (graphical, text, or cmdline) in the Kickstart file, or you must use the console= boot option. If no mode is specified, the system will use graphical mode if possible, or prompt you to choose from RDP and text mode.
  • This command has no options.
  • This mode is useful on 64-bit IBM Z systems with the x3270 terminal.

22.2.3. driverdisk

The driverdisk Kickstart command is optional. Use it to provide additional drivers to the installation program.

Driver disks can be used during Kickstart installations to provide additional drivers not included by default. You must copy the driver disks contents to the root directory of a partition on the system’s disk. Then, you must use the driverdisk command to specify that the installation program should look for a driver disk and its location. Use this command only once.

Syntax
driverdisk [partition|--source=url|--biospart=biospart]
Options

You must specify the location of driver disk in one way out of these:

  • partition - Partition containing the driver disk. The partition must be specified as a full path (for example, /dev/sdb1), not just the partition name (for example, sdb1).
  • --source= - URL for the driver disk. Examples include:

    driverdisk --source=ftp://path/to/dd.img
    driverdisk --source=http://path/to/dd.img
    driverdisk --source=nfs:host:/path/to/dd.img
  • --biospart= - BIOS partition containing the driver disk (for example, 82p2).
Notes

You can load the driver disks from a local disk or a similar device instead of being loaded over the network or from initrd. To do this:

  1. Load the driver disk on a disk drive, a USB or any similar device.
  2. Set the label, for example, DD, to this device.
  3. Add the following line to your Kickstart file:

    driverdisk LABEL=DD:/e1000.rpm

    Replace DD with a specific label and replace e1000.rpm with a specific name. Use anything supported by the inst.repo command instead of LABEL to specify your disk drive.

22.2.4. eula

The eula Kickstart command is optional. Use this option to accept the End User License Agreement (EULA) without user interaction. Specifying this option prevents Initial Setup from prompting you to accept the license agreement after you finish the installation and reboot the system for the first time. Use this command only once.

Syntax
eula [--agreed]
Options
  • --agreed (required) - Accepts the EULA. This option must always be used, otherwise the eula command is meaningless.

22.2.5. firstboot

The firstboot Kickstart command is optional. It determines whether the Initial Setup application starts the first time the system is booted. If enabled, the initial-setup package must be installed. If not specified, this option is disabled by default. Use this command only once.

Syntax
firstboot OPTIONS
Options
  • --enable or --enabled - Initial Setup is started the first time the system boots.
  • --disable or --disabled - Initial Setup is not started the first time the system boots.
  • --reconfig - Enable the Initial Setup to start at boot time in reconfiguration mode. This mode enables the root password, time & date, and networking & host name configuration options in addition to the default ones.

22.2.6. graphical

The graphical Kickstart command is optional. It performs the installation in graphical mode. Use this command only once.

Syntax
graphical [--non-interactive]
Options
  • --non-interactive - Performs the installation in a completely non-interactive mode. This mode will terminate the installation when user interaction is required.
Notes
  • For a fully automatic installation, you must either specify one of the available modes (graphical, text, or cmdline) in the Kickstart file, or you must use the console= boot option. If no mode is specified, the system will use graphical mode if possible, or prompt you to choose from RDP and text mode.

22.2.7. halt

The halt Kickstart command is optional. Use this command to halt the system after the installation has successfully completed. This is similar to a manual installation, where Anaconda displays a message and waits for the user to press a key before rebooting. During a Kickstart installation, if no completion method is specified, this option is used as the default. Use this command only once. This command has no options.

Syntax
halt
Notes
  • The halt command is equivalent to the shutdown -H command. For more details, see the shutdown(8) man page on your system.
  • For other completion methods, see the poweroff, reboot, and shutdown commands.

22.2.8. harddrive

The harddrive Kickstart command is optional. It performs the installation from a Red Hat installation tree or full installation ISO image on a local drive. The drive must be formatted with a file system the installation program can mount: ext2, ext3, ext4, vfat, or xfs. Use this command only once.

Syntax
harddrive OPTIONS
Mandatory options
  • --partition= - Partition to install from (such as sdb2).
  • --dir= - Directory containing the installation tree, or the ISO image of the full installation DVD.
Example
harddrive --partition=hdb2 --dir=/tmp/install-tree
Note
  • To actually run the installation, you must specify one of cdrom, harddrive, hmc, nfs, liveimg, ostreesetup, rhsm, or url unless the inst.repo option is specified on the kernel command line.

22.2.9. liveimg

The liveimg Kickstart command is optional. It performs the installation from a disk image instead of packages. Use this command only once.

Syntax
liveimg --url=SOURCE [OPTIONS]
Mandatory options
  • --url= - The location to install from. Supported protocols are HTTP, HTTPS, FTP, and file.
Optional options
  • --proxy= - Specify an HTTP, HTTPS or FTP proxy to use while performing the installation.
  • --checksum= - An argument with the SHA256 checksum of the image file, used for verification.
  • --noverifyssl - Disable SSL verification when connecting to an HTTPS server.
Example
liveimg --url=file:///images/install/squashfs.img --checksum=03825f567f17705100de3308a20354b4d81ac9d8bed4bb4692b2381045e56197 --noverifyssl
Notes
  • The image can be the squashfs.img file from a live ISO image, a compressed tar file (.tar, .tbz, .tgz, .txz, .tar.bz2, .tar.gz, or .tar.xz.), or any file system that the installation media can mount. Supported file systems are ext2, ext3, ext4, vfat, and xfs.
  • When using the liveimg installation mode with a driver disk, drivers on the disk will not automatically be included in the installed system. If necessary, these drivers should be installed manually, or in the %post section of a kickstart script.
  • To actually run the installation, you must specify one of cdrom, harddrive, hmc, nfs, liveimg, ostreesetup, rhsm, or url unless the inst.repo option is specified on the kernel command line.

22.2.10. logging

The logging Kickstart command is optional. It controls the error logging of Anaconda during installation. It has no effect on the installed system. Use this command only once.

Logging is supported over TCP only. For remote logging, ensure that the port number that you specify in --port= option is open on the remote server. The default port is 514.

Syntax
logging OPTIONS
Optional options
  • --host= - Send logging information to the given remote host, which must be running a syslogd process configured to accept remote logging.
  • --port= - If the remote syslog process uses a port other than the default port, set it by using this option.

22.2.11. mediacheck

The mediacheck Kickstart command is optional. This command forces the installation program to perform a media check before starting the installation. This command requires that installations be attended, so it is disabled by default. Use this command only once. This command has no options.

Syntax
mediacheck
Note
  • This Kickstart command is equivalent to the rd.live.check boot option.

22.2.12. nfs

The nfs Kickstart command is optional. It performs the installation from a specified NFS server. Use this command only once.

Syntax
nfs OPTIONS
Options
  • --server= - Server from which to install (host name or IP).
  • --dir= - Directory containing the Packages/ directory of the installation tree.
  • --opts= - Mount options to use for mounting the NFS export. (optional)
Example
nfs --server=nfsserver.example.com --dir=/tmp/install-tree
Note
  • To actually run the installation, you must specify one of cdrom, harddrive, hmc, nfs, liveimg, ostreesetup, rhsm, or url unless the inst.repo option is specified on the kernel command line.

22.2.13. ostreesetup

The ostreesetup Kickstart command is optional. It is used to set up OStree-based installations. Use this command only once.

Syntax
ostreesetup --osname=OSNAME [--remote=REMOTE] --url=URL --ref=REF [--nogpg]
Mandatory options
  • --osname=OSNAME - Management root for OS installation.
  • --url=URL - URL of the repository to install from.
  • --ref=REF - Name of the branch from the repository to be used for installation.
Optional options
  • --remote=REMOTE - A remote repository location.
  • --nogpg - Disable GPG key verification.

    For more information about the OStree tools, see the upstream documentation: https://ostreedev.github.io/ostree/

22.2.14. ostreecontainer

The ostreecontainer Kickstart command is optional. Use this command for OSTree installations from your custom containers.

重要

The ostreecontainer is provided as a Technology Preview only. Technology Preview features are not supported with Red Hat production Service Level Agreements (SLAs), might not be functionally complete, and Red Hat does not recommend using them for production. These previews provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. See Technology Preview Features Support Scope on the Red Hat Customer Portal for information about the support scope for Technology Preview features.

Syntax
ostreecontainer [--stateroot STATEROOT] --url URL [--transport TRANSPORT] [--remote REMOTE] [--no-signature-verification]
Options
  • --no-signature-verification: Use this option to disable verification for an ostree remote.
  • --stateroot: Name of the state directory, also known as "osname". Default value is default.
  • --url: Name of the container image for the registry transport. For example, quay.io/exampleos/foo:latest.
  • --transport: The transport, for example, registry or oci. The default value is registry.

    When performing Kickstart installations, the following commands are available together with ostreecontainer:

  • graphical, text, or cmdline
  • clearpart and zerombr
  • autopart
  • part
  • logvol and volgroup
  • reboot and shutdown
  • lang
  • rootpw
  • sshkey
  • bootloader (available only with the --append optional parameter)
  • user - When you specify a group within the user command, the user account can be assigned only to a group that already exists in the container image.

    The following Kickstart commands are unsupported together with ostreecontainer:

  • authconfig and authselect (provide relevant configuration in the container image instead)
  • ostreesetup
  • liveimg
  • module
  • %packages (any necessary packages must be already available in the container image)
  • repo
  • url (if there is a need to fetch a stage2 image for installation, for example, PXE installations, use inst.stage2= on the kernel command line instead of providing a url for stage2 inside the Kickstart file)
  • zfcp
  • zipl

    Kickstart commands not listed here are allowed to be used with the ostreecontainer command, however, they are not guaranteed to work as expected in the same way as with package-based installations.

Note
  • The ostreecontainer option cannot be used with the ostreesetup command.

22.2.15. poweroff

The poweroff Kickstart command is optional. It shuts down and powers off the system after the installation has successfully completed. Normally during a manual installation, Anaconda displays a message and waits for the user to press a key before rebooting. Use this command only once. This command has no options.

Syntax
poweroff
Notes
  • The poweroff option is equivalent to the shutdown -P command. For more details, see the shutdown(8) man page on your system.
  • For other completion methods, see the halt, reboot, and shutdown Kickstart commands. The halt option is the default completion method if no other methods are explicitly specified in the Kickstart file.
  • The poweroff command is highly dependent on the system hardware in use. Specifically, certain hardware components such as the BIOS, APM (advanced power management), and ACPI (advanced configuration and power interface) must be able to interact with the system kernel. Consult your hardware documentation for more information about your system’s APM/ACPI abilities.

22.2.16. reboot

The reboot Kickstart command is optional. It instructs the installation program to reboot after the installation is successfully completed. Normally, Kickstart displays a message and waits for the user to press a key before rebooting. Use this command only once.

Syntax
reboot OPTIONS
Options
  • --eject - Attempt to eject the bootable media (DVD, USB, or other media) before rebooting.
  • --kexec - Uses the kexec system call instead of performing a full reboot, which immediately loads the installed system into memory, bypassing the hardware initialization normally performed by the BIOS or firmware.

    重要

    This option is deprecated and available as a Technology Preview only. For information about Red Hat scope of support for Technology Preview features, see the Technology Preview Features Support Scope document.

    When kexec is used, device registers (which would normally be cleared during a full system reboot) might stay filled with data, which could potentially create issues for some device drivers.

Notes
  • Use of the reboot option might result in an endless installation loop, depending on the installation media and method.
  • The reboot option is equivalent to the shutdown -r command. For more details, see the shutdown(8) man page on your system.
  • Specify reboot to automate installation fully when installing in command line mode on 64-bit IBM Z.
  • For other completion methods, see the halt, poweroff, and shutdown Kickstart options. The halt option is the default completion method if no other methods are explicitly specified in the Kickstart file.

22.2.17. rhsm

The rhsm Kickstart command is optional. It instructs the installation program to register and install RHEL from the CDN. It can also connect the installed system to Red Hat Lightspeed. Use this command only once.

The rhsm Kickstart command eliminates the requirement of custom %post scripts when registering the system.

Options
  • --organization= - Uses the organization ID to register and install RHEL from the CDN.
  • --activation-key= - Uses the activation key to register and install RHEL from the CDN. Option can be used multiple times, once per activation key, as long as the activation keys used are registered to your subscription.
  • --connect-to-insights - Connects the target system to Red Hat Lightspeed.
  • --proxy= - Sets the HTTP proxy.
  • --server-hostname= - Sets the Satellite instance hostname for registration.
重要
  • To switch the installation source repository to the CDN by using the rhsm Kickstart command, you must meet the following conditions:

    • On the kernel command line, you have used inst.stage2=<URL> to fetch the installation image but have not specified an installation source using inst.repo=.
    • In the Kickstart file, you have not specified an installation source by using the url, cdrom, harddrive, liveimg, nfs and ostree setup commands.
  • An installation source URL specified using a boot option or included in a Kickstart file takes precedence over the CDN, even if the Kickstart file contains the rhsm command with valid credentials. The system is registered, but it is installed from the URL installation source. This ensures that earlier installation processes operate as normal.

22.2.18. shutdown

The shutdown Kickstart command is optional. It shuts down the system after the installation has successfully completed. Use this command only once. This command has no options.

Syntax
shutdown
Notes
  • The shutdown Kickstart option is equivalent to the shutdown command. For more details, see the shutdown(8) man page on your system.
  • For other completion methods, see the halt, poweroff, and reboot Kickstart options. The halt option is the default completion method if no other methods are explicitly specified in the Kickstart file.

22.2.19. sshpw

The sshpw Kickstart command is optional. During the installation, you can interact with the installation program and monitor its progress over an SSH connection. Use the sshpw command to create temporary accounts through which to log on. Each instance of the command creates a separate account that exists only in the installation environment. These accounts are not transferred to the installed system.

Syntax
sshpw --username=name [OPTIONS] password
Mandatory options
  • --username=name - Provides the name of the user. This option is required.
  • password - The password to use for the user. This argument is required.
Optional options
  • --iscrypted - If this option is present, the password argument is assumed to already be encrypted. This option is mutually exclusive with --plaintext. To create an encrypted password, you can use Python:
$ python3 -c 'import crypt,getpass;pw=getpass.getpass();print(crypt.crypt(pw) if (pw==getpass.getpass("Confirm: ")) else exit())'

This generates a sha512 crypt-compatible hash of your password by using a random salt.

  • --plaintext - If this option is present, the password argument is assumed to be in plain text. This option is mutually exclusive with --iscrypted
  • --lock - If this option is present, this account is locked by default. This means that the user will not be able to log in from the console.
  • --sshkey - If this option is present, then the <password> string is interpreted as an ssh key value.
Notes
  • By default, the ssh server is not started during the installation. To make ssh available during the installation, boot the system with the kernel boot option inst.sshd.
  • If you want to disable root ssh access, while allowing another user ssh access, use the following:

    sshpw --username=example_username example_password --plaintext
    sshpw --username=root example_password --lock
  • To simply disable root ssh access, use the following:

    sshpw --username=root example_password --lock

22.2.20. text

The text Kickstart command is optional. It performs the Kickstart installation in text mode. Kickstart installations are performed in graphical mode by default. Use this command only once.

Syntax
text [--non-interactive]
Options
  • --non-interactive - Performs the installation in a completely non-interactive mode. This mode will terminate the installation when user interaction is required.
Note
  • For a fully automatic installation, you must either specify one of the available modes (graphical, text, or cmdline) in the Kickstart file, or you must use the console= boot option. If no mode is specified, the system will use graphical mode if possible, or prompt you to choose from RDP and text mode.

22.2.21. url

The url Kickstart command is optional. It is used to install from an installation tree image on a remote server by using the FTP, HTTP, or HTTPS protocol. You can only specify one URL. Use this command only once.

You must specify one of the --url, --metalink or --mirrorlist options.

Syntax
url --url=FROM [OPTIONS]
Options
  • --url=FROM - Specifies the HTTP, HTTPS, FTP, or file location to install from.
  • --mirrorlist= - Specifies the mirror URL to install from.
  • --proxy= - Specifies an HTTP, HTTPS, or FTP proxy to use during the installation.
  • --noverifyssl - Disables SSL verification when connecting to an HTTPS server.
  • --metalink=URL - Specifies the metalink URL to install from. Variable substitution is done for $releasever and $basearch in the URL.
Examples
  • To install from a FTP server:

    url --url=ftp://username:password@server/path
  • To install from a HTTP server:

    url --url=http://server/path
Note
  • To actually run the installation, you must specify one of cdrom, harddrive, hmc, nfs, liveimg, ostreesetup, rhsm, or url unless the inst.repo option is specified on the kernel command line.

22.2.22. hmc

The hmc kickstart command is optional. Use it to install from an installation medium by using SE/HMC on IBM Z. This command does not have any options.

Syntax
hmc

22.2.23. %include

The %include Kickstart command is optional. Use the %include command to include the contents of another file in the Kickstart file as if the contents were at the location of the %include command in the Kickstart file.

This inclusion is evaluated only after the %pre script sections and can thus be used to include files generated by scripts in the %pre sections. To include files before evaluation of %pre sections, use the %ksappend command.

Syntax
%include path/to/file

22.2.24. %ksappend

The %ksappend Kickstart command is optional.

Use the %ksappend command to include the contents of another file in the Kickstart file as if the contents were at the location of the %ksappend command in the Kickstart file.

This inclusion is evaluated before the %pre script sections, unlike inclusion with the %include command.

Syntax
%ksappend path/to/file
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部