In this lab, you will create a kickstart file and validate the syntax.
Outcomes
You should be able to:
Create a kickstart file.
Use ksvalidator to validate the kickstart file's syntax.
Log in as the student user on workstation using student as the password.
On workstation, run the lab installing-kickstart start command.
This command runs a start script to determine whether the servera machine is reachable on the network.
It also verifies that Apache is installed and configured on servera.
[student@workstation ~]$lab installing-kickstart start
Use the ssh command to log in to servera as the student user.
The systems are configured to use SSH keys for authentication, so a password is not required.
[student@workstation ~]$ssh student@servera...output omitted... [student@servera ~]$
Copy /root/anaconda-ks.cfg on servera to a file called /home/student/kickstart.cfg so that student can edit.
Use the sudo cat /root/anaconda-ks.cfg > ~/kickstart.cfg command to copy the contents of /root/anaconda-ks.cfg to /home/student/kickstart.cfg.
If sudo prompts for the password of the student user, use student as the password.
[student@servera ~]$sudo cat /root/anaconda-ks.cfg > ~/kickstart.cfg[sudo] password for student:student
Make the following changes to /home/student/kickstart.cfg.
Comment out the reboot directive:
#reboot
Comment out the repo command for the BaseOS repository. Modify the repo command for AppStream to point to the classroom's AppStream repository:
#repo --name="koji-override-0" --baseurl=http://download-node-02.eng.bos.redhat.com/rhel-8/devel/candidate-trees/RHEL-8/RHEL-8.2.0-updates-20200423.0/compose/BaseOS/x86_64/os repo --name="appstream" --baseurl=http://classroom.example.com/content/rhel8.2/x86_64/dvd/AppStream/
Change the url command to specify the classroom's HTTP installation source media:
url --url="http://classroom.example.com/content/rhel8.2/x86_64/dvd/"
Comment out the network command:
#network --bootproto=dhcp --device=link --activate
Set the root password to redhat.
Change the line that starts with rootpw to:
rootpw --plaintext redhat
Delete the line that uses the auth command and add the authselect select sssd line to set the sssd service as the identity and authentication source.
authselect select sssd
In Red Hat Enterprise Linux 8, the authselect command replaces the authconfig command.
Simplify the services command to look exactly like the following:
services --disabled="kdump,rhsmcertd" --enabled="sshd,rngd,chronyd"
Comment out the part commands. Add the autopart command:
# Disk partitioning information #part biosboot --fstype="biosboot" --size=1 #part /boot/efi --fstype="efi" --size=100 --fsoptions="..." #part / --fstype="xfs autopart
Delete all content between the %post section and its %end.
Add the following line: echo "Kickstarted on $(date)" >> /etc/issue
The entire %post section should look like this.
%post --erroronfail echo "Kickstarted on $(date)" >> /etc/issue %end
Simplify the package specification to look exactly like the following:
%packages @core chrony dracut-config-generic dracut-norescue firewalld grub2 kernel rsync tar httpd -plymouth %end
When you are finished editing the file save and exit.
Use the ksvalidator command to check the Kickstart file for syntax errors.
[student@servera ~]$ksvalidator kickstart.cfg
Copy kickstart.cfg to the /var/www/html/ks-config directory.
[student@servera ~]$sudo cp ~/kickstart.cfg /var/www/html/ks-config
Exit from servera.
[student@servera ~]$exitlogout Connection to servera closed.[student@workstation ~]$