27.2. How Do You Perform a Kickstart Installation?
- Create a Kickstart file.
- Make the Kickstart file available on removable media, a hard drive or a network location.
- Create boot media, which will be used to begin the installation.
- Make the installation source available.
- Start the Kickstart installation.
27.2.1. Creating a Kickstart File
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.
- 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:
- Command section - See Section 27.3.1, “Kickstart Commands and Options” for a list of Kickstart options. You must include the required options.Add-ons for Anaconda which expand the functionality of the installer can also be used in the command section by using the
%addon addon_namecommand. See Section 27.3.7, “Kickstart Add-ons” for details.
%packagessection - See Section 27.3.2, “Package Selection” for details.
%postmust 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
220.127.116.11. Verifying the Kickstart File
yum install pykickstart
%packagessections of the Kickstart file.
18.104.22.168. Changes in Kickstart Syntax
ksverdiffcommand 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
-foption specifies the release to start the comparison with, and the
-toption to specify the release to end with. For additional information, see the
27.2.3. Making the Kickstart File Available
- 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
27.2.4. Making the Installation Source Available
27.2.5. Starting the Kickstart Installation
inst.ks=boot option, name the file
ks.cfgand place it on a storage volume labeled
inst.ks=locationwhen 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.
22.214.171.124. Starting the Kickstart Installation Manually
boot:prompt) will be required.
Procedure 27.1. Starting the Kickstart Installation Using a Boot Option
- Boot the system using either local media (a CD, DVD, or a USB flash drive). For architecture-specific instructions, see:
- Chapter 7, Booting the Installation on 64-bit AMD, Intel, and ARM systems for 64-bit AMD, Intel, and ARM systems
- Chapter 12, Booting the Installation on IBM Power Systems for IBM Power Systems servers
- 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.
- Start the installation by confirming your added boot options.
126.96.36.199. Starting the Kickstart Installation Automatically
Procedure 27.2. Starting the Kickstart Installation by Editing Boot Loader Configuration
- 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
defaultor based on your system's IP address. In this case, add the
inst.ks=option to the
appendline in the installation entry. A sample
appendline 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
kernelline in the installation entry. A sample
kernelline 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
- Boot the installation from the network server. For architecture-specific instructions, see:
- Section 7.1.2, “Booting from the Network Using PXE” for 64-bit AMD, Intel, and ARM systems
- Section 12.3, “Booting from the Network Using an Installation Server” for IBM Power Systems servers