Questo contenuto non è disponibile nella lingua selezionata.

27.2. How Do You Perform a Kickstart Installation?


Kickstart installations can be performed using a local DVD, a local hard drive, NFS, FTP, HTTP, or HTTPS.
To use Kickstart, you must:
  1. Create a Kickstart file.
  2. Make the Kickstart file available on removable media, a hard drive or a network location.
  3. Create boot media, which will be used to begin the installation.
  4. Make the installation source available.
  5. Start the Kickstart installation.
This chapter explains these steps in detail.

27.2.1. Creating a Kickstart File

The Kickstart file itself is a plain text file, containing keywords listed in Section 27.3, “Kickstart Syntax Reference”, which serve as directions for the installation. Any text editor able to save files as ASCII text, such as Gedit or vim on Linux systems or Notepad on Windows systems, can be used to create and edit Kickstart files. The file name of your Kickstart configuration does not matter; however, it is recommended to use a simple name as you will need to specify this name later in other configuration files or dialogs.
The recommended approach to creating Kickstart files is to perform a manual installation on one system first. After the installation completes, all choices made during the installation are saved into a file named anaconda-ks.cfg, located in the /root/ directory on the installed system. You can then copy this file, make any changes you need, and use the resulting configuration file in further installations.

Important

If you have a Red Hat Customer Portal account, you can use the Kickstart Configuration Tool available at https://access.redhat.com/labs/kickstartconfig/ in the Customer Portal Labs. This tool will walk you through basic configuration and allows you to download the resulting Kickstart file. However, the tool currently does not supported any advanced partitioning.
Kickstart Configurator, the graphical tool for creating Kickstart files, is still available. However, it is no longer being updated and it does not reflect changes in Kickstart syntax between Red Hat Enterprise Linux 6 and 7.
When creating a Kickstart file, keep in mind the following:
  • Sections must be specified in order. Items within the sections do not have to be in a specific order unless otherwise specified. The section order is:

    Important

    Sections %addon, %packages, %onerror, %pre and %post must end with %end, otherwise the installation program will refuse the Kickstart file.
  • Items that are not required can be omitted.
  • Omitting any required item results in the installation program prompting the user for an answer to the related item, just as the user would be prompted during a typical installation. Once the answer is given, the installation continues unattended (unless it finds another missing item).
  • Lines starting with a pound (also known as number) sign (#) are treated as comments and are ignored.

27.2.2. Maintaining the Kickstart File

27.2.2.1. Verifying the Kickstart File

When creating or customizing your Kickstart file, it is useful to verify that it is valid before attempting to use it in an installation. Red Hat Enterprise Linux 7 includes the ksvalidator command line utility which can be used to do this. This tool is a part of the pykickstart package. To install this package, execute the following command as root:
# yum install pykickstart
After installing the package, you can validate a Kickstart file using the following command:
$ ksvalidator /path/to/kickstart.ks
Replace /path/to/kickstart.ks with the path to the Kickstart file you want to verify.
For more information about this tool, see the ksvalidator(1) man page.

Important

Keep in mind that the validation tool has its limitations. The Kickstart file can be very complicated; ksvalidator can make sure the syntax is correct and that the file does not include deprecated options, but it cannot guarantee the installation will be successful. It also does not attempt to validate the %pre, %post and %packages sections of the Kickstart file.

27.2.2.2. Changes in Kickstart Syntax

While the general principles of Kickstart installations tend to stay the same, the commands and options can change between major releases of Red Hat Enterprise Linux. You can use the ksverdiff command to display the differences between two versions of the Kickstart syntax. This is useful when updating an existing Kickstart file to be used with a new release. To display a list of changes in syntax between Red Hat Enterprise Linux 6 and 7, use the following command:
$ ksverdiff -f RHEL6 -t RHEL7
The -f option specifies the release to start the comparison with, and the -t option to specify the release to end with. For additional information, see the ksverdiff(1) man page.

27.2.3. Making the Kickstart File Available

A Kickstart file must be placed in one of the following locations:
  • On removable media, such as a DVD or USB flash drive
  • On a hard drive connected to the installation system
  • On a network share reachable from the installation system
Normally, a Kickstart file is copied to removable media or a hard drive, or made available on the network. Placing the file in a network location complements the usual approach to Kickstart installations, which is also network-based: the system is booted using a PXE server, the Kickstart file is downloaded from a network share, and software packages specified in the file are downloaded from remote repositories.
Making the Kickstart file available and reachable from the installation system is exactly the same as making the installation source available, only with the Kickstart file instead of the installation ISO image or tree. For full procedures, see Section 3.3, “Preparing Installation Sources”.

27.2.4. Making the Installation Source Available

The Kickstart installation must access an installation source in order to install the packages needed by your system. The source can be either the full Red Hat Enterprise Linux installation DVD ISO image, or an installation tree. An installation tree is a copy of the binary Red Hat Enterprise Linux DVD with the same directory structure.
If you are performing a DVD-based installation, insert the Red Hat Enterprise Linux installation DVD into the computer before starting the Kickstart installation. See Section 3.3.1, “Installation Source on a DVD” for information about using a Red Hat Enterprise Linux DVD as the installation source.
If you are performing a hard drive installation (using either a hard drive or an USB flash drive), make sure the ISO images of the binary Red Hat Enterprise Linux DVD are on a hard drive in the computer. See Section 3.3.2, “Installation Source on a Hard Drive” for details about using a hard drive as the installation source.
If you are performing a network-based (NFS, FTP or HTTP) installation, you must make the installation tree or the binary DVD ISO image (depending on the protocol used) available over the network. See Section 3.3.3, “Installation Source on a Network” for details.

27.2.5. Starting the Kickstart Installation

Note

To load your Kickstart file automatically without having to specify the inst.ks= boot option, name the file ks.cfg and place it on a storage volume labeled OEMDRV.
To start a Kickstart installation, use the boot option inst.ks=location when booting the installation system, replacing location with the location of your Kickstart file. The exact way to specify the boot option depends on your system's architecture - see Chapter 23, Boot Options for details.
64-bit AMD, Intel and ARM systems and IBM Power Systems servers have the ability to boot using a PXE server. When you configure the PXE server, you can add the boot option into the boot loader configuration file, which in turn allows you to start the installation automatically. Using this approach, it is possible to automate the installation completely, including the boot process. For information about setting up a PXE server, see Chapter 24, Preparing for a Network Installation.
Procedures in this section assume that you already have a Kickstart file ready in a location accessible from the installation system, as well as boot media or a PXE server which can be used to boot the system and begin the installation. The procedures are intended as a general reference; some steps differ based on your system's architecture, and not all options are available on all architectures (for example, you cannot use PXE boot on IBM Z).

27.2.5.1. Starting the Kickstart Installation Manually

This section explains how to start a Kickstart installation manually, which means some user interaction (adding boot options at the boot: prompt) will be required.

Procedure 27.1. Starting the Kickstart Installation Using a Boot Option

  1. Boot the system using either local media (a CD, DVD, or a USB flash drive). For architecture-specific instructions, see:
  2. At the boot prompt, specify the inst.ks= boot option and the location of the Kickstart file. If the Kickstart file is in a network location, you must also configure the network using the ip= option. In some cases, the inst.repo= option is also necessary in order to access a software source from which necessary packages will be installed.
    For details about boot options and valid syntax, see Chapter 23, Boot Options.
  3. Start the installation by confirming your added boot options.
The installation begins now, using the options specified in the Kickstart file. If the Kickstart file is valid and contains all required commands, the installation is completely automated from this point forward.

27.2.5.2. Starting the Kickstart Installation Automatically

The following procedure explains how to completely automate the Kickstart installation, using a network boot (PXE) server and a properly configured boot loader. If you follow this procedure, you only need to turn on the system; no other interaction will be required from that moment until the installation finishes.

Note

PXE installations are not available on IBM Z.

Procedure 27.2. Starting the Kickstart Installation by Editing Boot Loader Configuration

  1. Open the boot loader configuration file on your PXE server, and add the inst.ks= boot option to the appropriate line. The name of the file and its syntax depends on your system's architecture and hardware:
    • On AMD64 and Intel 64 systems with BIOS, the file name can be either default or based on your system's IP address. In this case, add the inst.ks= option to the append line in the installation entry. A sample append line in the configuration file looks similar to the following:
      append initrd=initrd.img inst.ks=http://10.32.5.1/mnt/archive/RHEL-7/7.x/Server/x86_64/kickstarts/ks.cfg
    • On systems using the GRUB2 boot loader (64-bit AMD, Intel, and ARM systems with UEFI firmware and IBM Power Systems servers), the file name will be grub.cfg. In this file, append the inst.ks= option to the kernel line in the installation entry. A sample kernel line in the configuration file will look similar to the following:
      kernel vmlinuz inst.ks=http://10.32.5.1/mnt/archive/RHEL-7/7.x/Server/x86_64/kickstarts/ks.cfg
  2. Boot the installation from the network server. For architecture-specific instructions, see:
The installation begins now, using the installation options specified in the Kickstart file. If the Kickstart file is valid and contains all required commands, the installation is completely automated.
Red Hat logoGithubRedditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita ilBlog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

© 2024 Red Hat, Inc.