RHCSA Rapid Track
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
desktopXsystem.Log into and set up your
desktopXsystem.[student@desktopX ~]$lab kickstart setup
Copy
/root/anaconda-ks.cfgondesktopXto a file calledkickstart.cfgthatstudentcan edit.[student@desktopX ~]$sudo cat /root/anaconda-ks.cfg > kickstart.cfgMake the following changes to
kickstart.cfg.Change the
urlcommand 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
networkdirective 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
rebootdirective:#reboot
Change the packages that are installed to include
httpd, but notcloud-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
%postsection 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
rootpassword toredhat. Change the line that starts withrootpwto:rootpw --plaintext redhat
Use the ksvalidator command to check the Kickstart file for syntax errors.
[student@desktopX ~]$ksvalidator kickstart.cfgCopy
kickstart.cfgto the/var/www/html/ks-configdirectory.[student@desktopX ~]$sudo cp ~student/kickstart.cfg /var/www/html/ks-configRun the lab kickstart grading script on
desktopXto 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