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, orurlunless theinst.repooption 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, orcmdline) in the Kickstart file, or you must use theconsole=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.
-
For a fully automatic installation, you must either specify one of the available modes (
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).
-
partition - Partition containing the driver disk. The partition must be specified as a full path (for example,
- 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:- Load the driver disk on a disk drive, a USB or any similar device.
- Set the label, for example, DD, to this device.
Add the following line to your Kickstart file:
driverdisk LABEL=DD:/e1000.rpmReplace DD with a specific label and replace e1000.rpm with a specific name. Use anything supported by the
inst.repocommand 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 theeulacommand 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
-
--enableor--enabled- Initial Setup is started the first time the system boots. -
--disableor--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, orcmdline) in the Kickstart file, or you must use theconsole=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.
-
For a fully automatic installation, you must either specify one of the available modes (
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
haltcommand is equivalent to theshutdown -Hcommand. For more details, see the shutdown(8) man page on your system. -
For other completion methods, see the
poweroff,reboot, andshutdowncommands.
-
The
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 assdb2). -
--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, orurlunless theinst.repooption is specified on the kernel command line.
-
To actually run the installation, you must specify one of
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 areHTTP,HTTPS,FTP, andfile.
-
- Optional options
-
--proxy=- Specify anHTTP,HTTPSorFTPproxy to use while performing the installation. -
--checksum=- An argument with theSHA256checksum of the image file, used for verification. -
--noverifyssl- Disable SSL verification when connecting to anHTTPSserver.
-
- Example
liveimg --url=file:///images/install/squashfs.img --checksum=03825f567f17705100de3308a20354b4d81ac9d8bed4bb4692b2381045e56197 --noverifyssl
- Notes
-
The image can be the
squashfs.imgfile 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 areext2,ext3,ext4,vfat, andxfs. -
When using the
liveimginstallation 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%postsection of a kickstart script. -
To actually run the installation, you must specify one of
cdrom,harddrive,hmc,nfs,liveimg,ostreesetup,rhsm, orurlunless theinst.repooption is specified on the kernel command line.
-
The image can be the
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.checkboot option.
-
This Kickstart command is equivalent to the
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 thePackages/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, orurlunless theinst.repooption is specified on the kernel command line.
-
To actually run the installation, you must specify one of
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 isdefault. -
--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 isregistry.When performing Kickstart installations, the following commands are available together with
ostreecontainer:-
graphical,text, orcmdline -
clearpartandzerombr -
autopart -
part -
logvolandvolgroup -
rebootandshutdown -
lang -
rootpw -
sshkey -
bootloader(available only with the--appendoptional 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:-
authconfigandauthselect(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 astage2image for installation, for example, PXE installations, useinst.stage2=on the kernel command line instead of providing a url forstage2inside the Kickstart file) -
zfcp ziplKickstart commands not listed here are allowed to be used with the
ostreecontainercommand, however, they are not guaranteed to work as expected in the same way as with package-based installations.
-
- Note
-
The
ostreecontaineroption cannot be used with theostreesetupcommand.
-
The
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
poweroffoption is equivalent to theshutdown -Pcommand. For more details, see the shutdown(8) man page on your system. -
For other completion methods, see the
halt,reboot, andshutdownKickstart commands. Thehaltoption is the default completion method if no other methods are explicitly specified in the Kickstart file. -
The
poweroffcommand 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.
-
The
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 thekexecsystem 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
kexecis 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
rebootoption might result in an endless installation loop, depending on the installation media and method. -
The
rebootoption is equivalent to theshutdown -rcommand. For more details, see the shutdown(8) man page on your system. -
Specify
rebootto automate installation fully when installing in command line mode on 64-bit IBM Z. -
For other completion methods, see the
halt,poweroff, andshutdownKickstart options. Thehaltoption is the default completion method if no other methods are explicitly specified in the Kickstart file.
-
Use of the
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
rhsmKickstart 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 usinginst.repo=. -
In the Kickstart file, you have not specified an installation source by using the
url,cdrom,harddrive,liveimg,nfsandostreesetup commands.
-
On the kernel command line, you have used
-
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
rhsmcommand 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
shutdownKickstart option is equivalent to theshutdowncommand. For more details, see the shutdown(8) man page on your system. -
For other completion methods, see the
halt,poweroff, andrebootKickstart options. Thehaltoption is the default completion method if no other methods are explicitly specified in the Kickstart file.
-
The
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
sshserver is not started during the installation. To makesshavailable during the installation, boot the system with the kernel boot optioninst.sshd. If you want to disable root
sshaccess, while allowing another usersshaccess, use the following:sshpw --username=example_username example_password --plaintext sshpw --username=root example_password --lockTo simply disable root
sshaccess, use the following:sshpw --username=root example_password --lock
-
By default, the
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, orcmdline) in the Kickstart file, or you must use theconsole=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.
-
For a fully automatic installation, you must either specify one of the available modes (
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 theHTTP,HTTPS,FTP, orfilelocation to install from. -
--mirrorlist=- Specifies the mirror URL to install from. -
--proxy=- Specifies anHTTP,HTTPS, orFTPproxy to use during the installation. -
--noverifyssl- Disables SSL verification when connecting to anHTTPSserver. -
--metalink=URL- Specifies the metalink URL to install from. Variable substitution is done for$releaseverand$basearchin the URL.
-
- Examples
To install from a FTP server:
url --url=ftp://username:password@server/pathTo 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, orurlunless theinst.repooption is specified on the kernel command line.
-
To actually run the installation, you must specify one of
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