In this lab, you will create a Kickstart configuration file, confirm it is syntactically correct, and publish it for use.
| Resources | |
|---|---|
| Files: | /root/anaconda-ks.cfg |
| Machines: | desktopX |
Outcomes
You will have a Kickstart configuration file based on the
anaconda-ks.cfg file on desktopX.
It will install packages from classroom.example.com, use
DHCP for networking, partition storage and install packages
according to specifications, and perform minor customization
of the newly installed system.
Reset your desktopX system.
Log into and set up your desktopX system.
[student@desktopX ~]$lab kickstart setup
Copy /root/anaconda-ks.cfg
on desktopX to a file called
kickstart.cfg that student
can edit.
[student@desktopX ~]$sudo cat /root/anaconda-ks.cfg > kickstart.cfg
Make the following changes to kickstart.cfg.
Change the url command to specify the HTTP
installation source media used in the classroom:
url --url="http://classroom.example.com/content/rhel7.0/x86_64/dvd/"
Configure the network to use DHCP. There should only be
a single network directive that looks like
the following:
network --bootproto=dhcp
Modify the disk configuration to only have the following three directives:
# Clear the Master Boot Record zerombr # Partition clearing information clearpart --all --initlabel # Disk partitioning information part / --fstype="xfs" --ondisk=vda --size=5120
Be sure the size is adjusted to 5120.
Comment the reboot directive:
#reboot
Change the packages that are installed to include
httpd, but not cloud-init.
Simplify the package specification to look exactly like
the following:
@core chrony dracut-config-generic dracut-norescue firewalld grub2 kernel rsync tar httpd -plymouth
Delete all of the content in the %post section
except for the following lines:
%post --erroronfail # make sure firstboot doesn't start echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot # append /etc/issue with a custom message echo "Kickstarted for class on $(date)" >> /etc/issue %end
Set the root password to redhat. Change
the line that starts with rootpw to:
rootpw --plaintext redhat
Use the ksvalidator command to check the Kickstart file for syntax errors.
[student@desktopX ~]$ksvalidator kickstart.cfg
Copy kickstart.cfg
to the /var/www/html/ks-config directory.
[student@desktopX ~]$sudo cp ~student/kickstart.cfg /var/www/html/ks-config
Run the lab kickstart grading script on
desktopX to confirm the specified changes have been
made and the kickstart file is available via HTTP.
[root@desktopX ~]#lab kickstart gradeKickstart file available via HTTP ..... PASS Confirming installation media ......... PASS Checking installed disk size .......... PASS Confirming network configuration ...... PASS Checking software package selection ... PASS