Automating Installation with Kickstart¶
Objectives¶
- Explain Kickstart concepts and architecture.
- Create and modify Kickstart files.
- Validate Kickstart files and publish them to the installer.
- Install Kickstart on the network.
Introduction to Kickstart¶
Kickstart automates RHEL installations using text files to configure disk partitioning, network interfaces, package selection, and customization. It supports unattended installations similar to Windows answer files.
Kickstart File Structure¶
- Commands define installation steps.
%packages
section specifies software.%pre
and%post
sections contain scripts for pre- and post-installation tasks.
Key Commands¶
url
,repo
: Specify installation source and additional repositories.part
,autopart
: Configure disk partitions.network
,firewall
: Configure networking and firewall settings.lang
,keyboard
,timezone
: Set language, keyboard, and timezone.rootpw
,selinux
,services
: Define root password, SELinux mode, and system services.
Example Kickstart File¶
Contains bootloader configuration, partitioning, installation options, software selection, and post-installation scripts.
Creating Kickstart Files¶
- Use Kickstart Generator website or a text editor.
Kickstart Installation Steps¶
- Create a Kickstart file.
- Publish the Kickstart file for Anaconda.
- Boot Anaconda and point it to the Kickstart file.
Questions and Answers¶
- What is the purpose of Kickstart in RHEL?
-
To automate system installations.
-
What types of configurations can Kickstart files include?
-
Disk partitioning, network interfaces, package selection, and customizations.
-
How does Anaconda use Kickstart files?
-
For a complete installation without user interaction.
-
What character indicates a comment line in Kickstart files?
-
The number sign (#) character.
-
What character denotes a directive in Kickstart files?
-
The percentage sign (%) character.
-
What does the
%packages
section specify? -
Which software to include in the installation.
-
How do you exclude a package in Kickstart?
-
Precede it with a hyphen (-) character.
-
What are
%pre
and%post
sections used for? -
%pre
for scripts before partitioning,%post
for scripts after installation. -
What command specifies the installation media URL?
-
url
-
What does the
repo
command do?- Specifies where to find additional packages for installation.
-
What command forces a text mode installation?
text
-
How do you enable VNC for remote graphical installation?
vnc
-
What command removes existing partitions before creating new ones?
clearpart
-
What does the
part
command configure?- Size, format, and name of a partition.
-
What command automatically creates root, swap, and boot partitions?
autopart
-
How do you prevent Anaconda from modifying specific disks?
ignoredisk
-
What is the purpose of the
bootloader
command?- Defines where to install the bootloader.
-
How do you create LVM volume groups and logical volumes in Kickstart?
- Using
volgroup
andlogvol
commands.
- Using
-
What command sets the system language?
lang
-
How do you define the system's time zone in Kickstart?
timezone
-
What command enables or disables NTP?
timesource
-
How do you set the initial root user password?
rootpw
-
What command sets the SELinux mode?
selinux
-
How do you modify the default set of services to run under systemd?
services
-
What command creates a local user on the system?
user