College-Level Course Module | RHEL System Administration
Learning Objectives
1
Understand RHEL installation methods
Boot media, installation sources, and deployment options
2
Perform interactive installation
Navigate Anaconda installer, configure storage and packages
3
Create Kickstart configuration files
Automate installations with ks.cfg files
4
Deploy systems using Kickstart
Boot with Kickstart files from various sources
Installation Overview
RHEL Installation uses the Anaconda installer to deploy the operating system. It can run interactively with a GUI or automatically using Kickstart configuration files.
Interactive Installation
Administrator makes choices through GUI screens. Good for unique systems, learning, or when requirements are unclear.
Kickstart Installation
Configuration file provides all answers. Good for deploying many identical systems, ensuring consistency, automation.
Boot Media
→
Anaconda
→
Configure
→
Install Packages
→
Reboot
Installation Media
RHEL installation requires boot media and package sources. These can be the same (DVD) or separate (network boot + network repository).
Media Type
Description
Use Case
DVD ISO
Full installation image (~10GB), contains all packages
Standalone installations, no network needed
Boot ISO
Minimal boot image (~800MB), packages from network
Network installations, always get latest packages
USB Drive
DVD or Boot ISO written to USB
Physical servers, no optical drive
PXE Boot
Network boot, no local media needed
Data center deployments, automation
# Create bootable USB from ISO (Linux)[root@workstation ~]# dd if=rhel-9.3-x86_64-dvd.iso of=/dev/sdb bs=4M status=progress
# Warning: This destroys all data on /dev/sdb!# Verify USB device name first[root@workstation ~]# lsblk
Booting the Installer
RHEL 9.3 Installation
Install Red Hat Enterprise Linux 9.3
Test this media & install Red Hat Enterprise Linux 9.3
Troubleshooting >
Press Tab to edit options, Press e to edit the whole command
# Boot menu options:# - Install: Start installation immediately# - Test & Install: Verify media integrity first (recommended)# - Troubleshooting: Rescue mode, memory test# Press Tab to add boot options:vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=RHEL-9-3 quiet# Add Kickstart location:vmlinuz ... inst.ks=http://server/ks.cfg# Common boot options:# inst.ks=URL - Kickstart file location# inst.repo=URL - Package repository location# inst.vnc - Enable VNC for remote installation# inst.text - Text mode installation
Anaconda Summary Screen
The Installation Summary screen is the hub of interactive installation. Configure each category, then begin installation when all items show complete.
INSTALLATION SUMMARY
LOCALIZATION
Keyboard: English (US)
Language Support: English
Time & Date: America/New_York
SOFTWARE
Installation Source ⚠
Software Selection: Server
SYSTEM
Installation Destination ⚠
Network & Host Name
USER SETTINGS
Root Password ⚠
User Creation
Begin Installation (disabled until required items configured)
Installation Destination
Installation Destination configures disk partitioning. You can use automatic partitioning or create custom layouts with standard partitions, LVM, or Btrfs.
# Automatic partitioning creates:/boot - 1 GB (ext4 or xfs)/boot/efi - 600 MB (UEFI systems only, vfat)/ - Remaining space (xfs, in LVM)swap - Based on RAM (in LVM)# Recommended minimum partitions:/boot - 1 GB minimum, outside LVM/ - Root filesystem, 10+ GBswap - Equal to RAM for hibernation, or 50% RAM# Optional separate partitions:/home - User data, survives reinstalls/var - Logs, databases, growing data/tmp - Temporary files, can add noexec
RHEL 9 default: Automatic partitioning uses LVM with XFS filesystems. This provides flexibility to resize volumes later.
Software Selection
Software Selection determines which packages are installed. Choose a base environment and optional add-ons for your intended use case.
Base Environment
Description
Packages
Server with GUI
Full graphical server environment
~1400 packages
Server
Command-line server, common services
~400 packages
Minimal Install
Bare minimum for running system
~300 packages
Workstation
Desktop with development tools
~1800 packages
Custom Operating System
Only core packages, you select everything
~250 packages
Virtualization Host
KVM hypervisor and management tools
~500 packages
Best practice: Start minimal and add packages later with dnf. This reduces attack surface and installation time.
Network Configuration
# Network & Host Name screen allows:# - Enable/disable network interfaces# - Configure IPv4/IPv6 (DHCP or static)# - Set hostname# For static IP configuration:IPv4 Method: Manual
Address: 192.168.1.100
Netmask: 255.255.255.0 (or /24)
Gateway: 192.168.1.1
DNS: 192.168.1.1, 8.8.8.8# Hostname examples:server1.example.com (FQDN recommended)webserver01 (short name)# Network is needed during installation for:# - Network installation source (Boot ISO)# - Red Hat subscription registration# - Time synchronization# - Kickstart file retrieval
Note: Network interfaces are disabled by default during installation. Enable and configure them here, especially for network installations or subscription registration.
User Configuration
Root Password
Set the root account password. Can optionally lock root account if admin user is created.
# Strong password requirements:# - At least 8 characters# - Mix of cases, numbers, symbols# - Not a dictionary word# Options:[ ] Lock root account[x] Allow root SSH login
User Creation
Create a regular user account. Can grant administrator privileges (wheel group).
# User account fields:Full name: Alice AdminUser name: alicePassword: ********# Options:[x] Make administrator (adds to wheel group)
Security practice: Create an administrator user and optionally lock root. This provides accountability through individual logins and sudo logging.
Begin Installation
Configure All
→
Begin Install
→
Package Install
→
Reboot
# Once Begin Installation is clicked:# 1. Disk partitioning is applied (destructive!)# 2. Filesystems are created and formatted# 3. Packages are installed from source# 4. Bootloader (GRUB2) is installed# 5. Initial configuration is applied# 6. System is ready to reboot# Progress shows:Installing package 234 of 456: httpd-2.4.53...Performing post-installation setup tasks...# After completion:[Reboot System]# Remove installation media before reboot!
Point of no return: Once you click Begin Installation, disk changes are applied. Existing data on selected disks will be destroyed.
Introduction to Kickstart
Kickstart automates RHEL installation by providing answers to all installer questions in a configuration file. The system installs without human intervention.
Manual Installation
Click through screens Make decisions interactively Good for 1-5 systems Each install may differ slightly
Kickstart Installation
Configuration file provides answers Completely automated Good for many systems Guaranteed identical installs
Benefits: Consistency across deployments, faster installation, reduced human error, repeatable process, enables Infrastructure as Code practices.
# Installation sourceurl--url="http://server/rhel9/BaseOS"cdrom# Use attached DVD/ISOnfs--server=nfs.example.com --dir=/exports/rhel9# Network configurationnetwork--bootproto=dhcp --device=eth0 --activatenetwork--bootproto=static --ip=192.168.1.100 --netmask=255.255.255.0 --gateway=192.168.1.1 --nameserver=8.8.8.8 --hostname=server1.example.com# User accountsrootpw--plaintext redhat123# Plain text (not recommended)rootpw--iscrypted $6$rounds=...# Encrypted (use this)rootpw--lock# Lock root accountuser--name=alice --password=$6$... --iscrypted --groups=wheel# Installation behaviortext# Text modegraphical# GUI modereboot# Reboot after installpoweroff# Shut down after installfirstboot--disabled# Skip first-boot wizard
Disk Configuration
# Clear and initialize diskzerombr# Clear MBR if invalidclearpart--all --initlabel# Remove all partitionsclearpart--drives=sda# Clear specific disk only# Automatic partitioningautopart# Default LVM layoutautopart--type=lvm# Explicitly use LVMautopart--type=plain# Standard partitions, no LVM# Manual partition layoutpart/boot --fstype=xfs --size=1024part/boot/efi --fstype=efi --size=600# UEFI systemspartpv.01 --size=1 --grow# LVM physical volumevolgrouprhel pv.01# Volume grouplogvol/ --vgname=rhel --name=root --fstype=xfs --size=10240logvol/home --vgname=rhel --name=home --fstype=xfs --size=5120logvolswap --vgname=rhel --name=swap --size=2048# Bootloaderbootloader--location=mbr --boot-drive=sda
Package Selection
%packages# Environment group (base installation)@^minimal-environment# Minimal install@^server-product-environment# Server@^graphical-server-environment# Server with GUI# Package groups@development# Development Tools group@system-tools# System administration tools@security-tools# Security tools# Individual packagesvim-enhancedtmuxgithttpdfirewalld# Exclude packages (prefix with -)-plymouth# Remove boot splash-iwl*firmware# Remove wireless firmware%end
List available groups:dnf group list --hidden shows all package groups. Environment groups use @^ prefix, regular groups use @.
%pre and %post Scripts
%pre# Runs BEFORE installation, limited environment# Useful for dynamic disk selection, loggingecho "Starting installation at $(date)" > /tmp/install.log%end%post# Runs AFTER installation, full system available# Runs in chroot of installed system by default# Configure servicessystemctl enable httpdsystemctl enable firewalld# Create filescat > /etc/motd << EOFDeployed via Kickstart on $(date)EOF# Run commandsdnf -y updatesubscription-manager register --username=user --password=pass%end%post --nochroot# Access installation environment, not installed systemcp /tmp/install.log /mnt/sysimage/root/%end
Creating Kickstart Files
Create Kickstart files from scratch, from the system-config-kickstart tool, or by copying and modifying the anaconda-ks.cfg from a completed installation.
# Every RHEL installation creates a Kickstart file recording what was done[root@server ~]# cat /root/anaconda-ks.cfg
# Generated by Anaconda 34.25.0.20
# System timezone
timezone America/New_York --utc
# Root password
rootpw --iscrypted $6$...
...# Copy and customize for future installs[root@server ~]# cp /root/anaconda-ks.cfg /var/www/html/ks.cfg
[root@server ~]# vi /var/www/html/ks.cfg
# Validate Kickstart syntax[root@server ~]# dnf install pykickstart
[root@server ~]# ksvalidator /var/www/html/ks.cfg
(no output means valid)# Compare two Kickstart files[root@server ~]# ksdiff ks1.cfg ks2.cfg
Using Kickstart Files
# Boot option to specify Kickstart locationinst.ks=URL# Kickstart from HTTP serverinst.ks=http://192.168.1.10/ks.cfginst.ks=http://server.example.com/kickstart/webserver.cfg# Kickstart from NFSinst.ks=nfs:server.example.com:/exports/ks.cfg# Kickstart from USB or DVDinst.ks=hd:sdb1:/ks.cfginst.ks=cdrom:/ks.cfg# At boot menu, press Tab and add:vmlinuz initrd=initrd.img inst.stage2=... inst.ks=http://server/ks.cfg# Combine with repository location if using Boot ISOinst.ks=http://server/ks.cfg inst.repo=http://server/rhel9/
HTTP is most common: Host Kickstart files on a web server. Easy to update, version control, and serve multiple configurations.
Complete Example
# Minimal web server Kickstarttexturl--url="http://repo.example.com/rhel9/BaseOS"repo--name="AppStream" --baseurl="http://repo.example.com/rhel9/AppStream"keyboard--vckeymap=uslangen_US.UTF-8timezoneAmerica/New_York --utcnetwork--bootproto=dhcp --device=eth0 --activatenetwork--hostname=webserver1.example.comrootpw--iscrypted $6$rounds=4096$salt$hashedpassworduser--name=admin --groups=wheel --iscrypted --password=$6$...zerombrclearpart--all --initlabelautopartbootloader--location=mbrfirewall--enabled --service=ssh --service=http --service=httpsselinux--enforcingfirstboot--disabledreboot%packages@^minimal-environmenthttpdmod_sslvim-enhanced%end%postsystemctl enable httpd%end
Key Takeaways
1
Interactive Install: Boot from media, configure through Anaconda GUI screens. Good for unique systems and learning.
2
Key Decisions: Disk partitioning (auto or custom), software selection (minimal to full), network, and user accounts.
3
Kickstart: Text file with all installation answers. Use inst.ks=URL at boot. Enables consistent automated deployment.
4
Kickstart Sources: Copy /root/anaconda-ks.cfg from existing install. Validate with ksvalidator.
LAB EXERCISES
Perform interactive RHEL installation in a VM
Use custom partitioning with separate /home
Copy and examine anaconda-ks.cfg from completed install
Create Kickstart for minimal server with specific packages
Deploy VM using Kickstart from HTTP server
Add %post script to enable services and create files