Red Hat System Administration II
Create a kickstart file and validate the syntax.
Outcomes
Create a kickstart file.
Validate the kickstart file's syntax.
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-kickstart
Instructions
Log in to
serveraas thestudentuser.[student@workstation ~]$
ssh student@servera...output omitted... [student@servera ~]$Create the
/home/student/kickstart.cfgfile by copying the contents of the/root/anaconda-ks.cfgfile using privileged access.[student@servera ~]$
sudo cat /root/anaconda-ks.cfg > ~/kickstart.cfg[sudo] password for student:studentMake the following changes to the
/home/student/kickstart.cfgfile.Comment out the reboot command:
#reboot
Modify the
repocommands to specify thecontentserver's BaseOS and AppStream repositories:repo --name="BaseOS" --baseurl="http://content.example.com/rhel9.3/x86_64/dvd/BaseOS/" repo --name="Appstream" --baseurl="http://content.example.com/rhel9.3/x86_64/dvd/AppStream/"
Modify the
urlcommand to specify thecontentserver's HTTP installation source:url --url="http://content.example.com/rhel9.3/x86_64/dvd/"
Comment out the
networkcommand:#network --bootproto=dhcp --device=link --activate
Modify the
rootpwcommand to set therootuser's password toredhat.rootpw --plaintext redhat
Modify the
authselectcommand to set thesssdservice as the identity and authentication source.authselect select sssd
Modify the
servicescommand to disable and enable services.services --disabled="kdump,rhsmcertd" --enabled="sshd,rngd,chronyd"
Comment out the
partcommands and add theautopartcommand:# Disk partitioning information ignoredisk --only-use=vda #part biosboot --fstype="biosboot" --size=1 #part /boot/efi --fstype="efi" --size=100 --fsoptions="..." #part / --fstype="xfs autopart
Delete all of the content between the
%postsection and its%enddirective. Add theecho "Kickstarted on $(date)" >> /etc/issueline.%post --erroronfail echo "Kickstarted on $(date)" >> /etc/issue %end
Modify the
%packagessection to include only the following content:%packages @core chrony dracut-config-generic dracut-norescue firewalld grub2 kernel rsync tar httpd -plymouth %end
Save and exit the file.
Validate the Kickstart file for syntax errors. If no errors are shown, then the command has no output.
[student@servera ~]$
ksvalidator kickstart.cfgCopy the
kickstart.cfgfile to the/var/www/html/ks-configdirectory.[student@servera ~]$
sudo cp ~/kickstart.cfg /var/www/html/ks-config[sudo] password for student:studentReturn to the
workstationmachine as thestudentuser.[student@servera ~]$
exitlogout Connection to servera closed. [student@workstation ~]$