In this lab, you create a kickstart file and make it available to the installer.
Outcomes
Create a kickstart file.
Provide the kickstart file to the installer.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
This command prepares your environment and ensures that all required resources are available.
[student@workstation ~]$ lab start installing-review
Instructions
Prepare a kickstart file on the serverb machine as specified, and provide it at the http://serverb.lab.example.com/ks-config/kickstart.cfg address.
On the serverb machine, copy the /root/anaconda-ks.cfg kickstart file to the /home/student/kickstart.cfg kickstart file to be editable for the student user.
Log in to the servera machine as the student user.
[student@workstation ~]$ ssh student@serverb
...output omitted...
[student@serverb ~]$On the serverb machine, copy the /root/anaconda-ks.cfg file to the /home/student/kickstart.cfg file.
[student@serverb ~]$sudo cat /root/anaconda-ks.cfg > ~/kickstart.cfg[sudo] password for student:student
Update the /home/student/kickstart.cfg kickstart file.
Comment out the reboot command.
Modify the repo command for the BaseOS and AppStream repositories.
Modify the repo command for the BaseOS repository to use the http://classroom.example.com/content/rhel9.0/x86_64/dvd/BaseOS/ address.
Modify the repo command for the AppStream repository to use the http://classroom.example.com/content/rhel9.0/x86_64/dvd/AppStream/ address.
Change the url command to use http://classroom.example.com/content/rhel9.0/x86_64/dvd/ as the installation source.
Comment out the network command.
Change the rootpw command to set redhat as the root user password.
Modify the authselect command to set the sssd service as the identity and authentication source.
Modify the services command to disable the kdump and rhsmcertd services and to enable the sshd, rngd, and chronyd services.
Delete the part commands and add the autopart command.
Simplify the %post section so that it runs only a script to append the text Kickstarted on at the end of the DATE/etc/issue file.
Use the date command to insert the date with no additional options.
Simplify the %package section as follows: include the @core, chrony, dracut-config-generic, dracut-norescue, firewalld, grub2, kernel, rsync, tar, and httpd packages.
Ensure that the plymouth package does not install.
Comment out the reboot directive.
#reboot
Modify the repo command for the BaseOS and AppStream repositories.
Modify the repo command for the BaseOS repository to use the http://classroom.example.com/content/rhel9.0/x86_64/dvd/BaseOS/ address.
Modify the repo command for the AppStream repository to use the http://classroom.example.com/content/rhel9.0/x86_64/dvd/AppStream/ address.
repo --name="BaseOS" --baseurl="http://classroom.example.com/content/rhel9.0/x86_64/dvd/BaseOS/" repo --name="Appstream" --baseurl="http://classroom.example.com/content/rhel9.0/x86_64/dvd/AppStream/"
Change the url command to specify the HTTP installation source media that the classroom machine provides.
url --url="http://classroom.example.com/content/rhel9.0/x86_64/dvd/"
Comment out the network command.
#network --bootproto=dhcp --device=link --activate
Modify the rootpw command to set redhat as the password for the root user.
rootpw --plaintext redhat
Modify the authselect command to set the sssd service as the identity and authentication source.
authselect select sssd
Simplify the services command to match the following string.
services --disabled="kdump,rhsmcertd" --enabled="sshd,rngd,chronyd"
Comment out the part commands and add the autopart command:
# Disk partitioning information ignoredisk --only-use=vda #part biosboot --fstype="biosboot" --size=1 #part /boot/efi --fstype="efi" --size=100 --fsoptions="defaults,uid=0,gid=0,umask=077,shortname=winnt" #part / --fstype="xfs" --size=10137 --label=root autopart
Delete all content between the %post and %end sections.
Add the echo "Kickstarted on $(date)" >> /etc/issue line.
%post --erroronfail echo "Kickstarted on $(date)" >> /etc/issue %end
Simplify the package specification to match the following content.
%packages @core chrony dracut-config-generic dracut-norescue firewalld grub2 kernel rsync tar httpd -plymouth %end
Validate the syntax of the kickstart.cfg kickstart file.
Provide the /home/student/kickstart.cfg file at the http://serverb.lab.example.com/ks-config/kickstart.cfg address.
Copy the kickstart.cfg file to the /var/www/html/ks-config/ directory.
[student@serverb ~]$sudo cp kickstart.cfg /var/www/html/ks-config/[sudo] password for student:student
Return to the workstation machine as the student user.
[student@serverb ~]$ exit
logout
Connection to serverb closed.
[student@workstation ~]$This concludes the section.