Bookmark this page

Lab: Installing Red Hat Enterprise Linux

Performance Checklist

In this lab, you will create a kickstart file and perform a kickstart installation on serverb.

Outcomes

You should be able to:

  • Create a kickstart file.

  • Make the kickstart file available to the installer.

  • Perform a kickstart installation.

Log in to workstation as student using student as the password.

On workstation, run the lab installing-review start command. This command runs a start script to determine whether the servera and serverb machines are reachable on the network, and configures Apache on serverb. It also configures the boot menu on serverb for the exercise to perform a kickstart installation.

[student@workstation ~]$ lab installing-review start

Prepare a kickstart file on serverb as specified and make it available at http://serverb.lab.example.com/ks-config/kickstart.cfg. Perform a kickstart installation on servera using the kickstart file you prepared.

  1. On serverb, copy /root/anaconda-ks.cfg to /home/student/kickstart.cfg, so the student user can edit it.

    1. Use the ssh command to log in to serverb as the student user.

      [student@workstation ~]$ ssh student@serverb
      ...output omitted...
      [student@serverb ~]$  
    2. Copy /root/anaconda-ks.cfg on serverb 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@serverb ~]$ sudo cat /root/anaconda-ks.cfg > ~/kickstart.cfg
      [sudo] password for student: student
  2. Make the following changes to /home/student/kickstart.cfg.

    • Comment out the reboot command.

    • Comment out the repo command for the BaseOS repository. Modify the repo command for the AppStream repository to point to http://classroom.example.com/content/rhel8.2/x86_64/dvd/AppStream/. The repository name should be set to appstream.

    • Change the url command to use http://classroom.example.com/content/rhel8.2/x86_64/dvd/ as the installation source.

    • Comment out the network command.

    • Change the rootpw command to use plaintext and set the root password to 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.

    • Simplify the services command so that only the kdump and rhsmcertd services are disabled. Leave only the sshd, rngd, and chronyd enabled.

    • Add the autopart command. The part commands should be commented out.

    • Simplify the %post section so that it only runs a script to append the text Kickstarted on DATE to the end of the /etc/issue file. DATE is variable information and should be generated by the script using the date command 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 is not installed.

    1. Comment out the reboot directive:

      #reboot
    2. The repo command is found twice in kickstart.cfg. Comment out the repo command for the BaseOS repository. Modify the repo command for the AppStream repository 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/
    3. Change the url command to specify the HTTP installation source media used in the classroom:

      url --url="http://classroom.example.com/content/rhel8.2/x86_64/dvd/"
    4. Comment out the network command:

      #network  --bootproto=dhcp --device=link --activate
    5. Set the root password to redhat. Change the line that starts with rootpw to:

      rootpw --plaintext redhat
    6. 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
    7. Simplify the services command to look exactly like the following:

      services --disabled="kdump,rhsmcertd" --enabled="sshd,rngd,chronyd"
    8. 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" --size=10137 --label=root
      autopart
    9. 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
    10. 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
  3. Validate the syntax of kickstart.cfg.

    1. Use the ksvalidator command to check the Kickstart file for syntax errors.

      [student@serverb ~]$ ksvalidator kickstart.cfg
  4. Make the /home/student/kickstart.cfg file available at http://serverb.lab.example.com/ks-config/kickstart.cfg

    1. Copy kickstart.cfg to the /var/www/html/ks-config/ directory.

      [student@serverb ~]$ sudo cp ~/kickstart.cfg /var/www/html/ks-config
  5. Return to the workstation system to check your work.

    1. Exit from serverb.

      [student@serverb ~]$ exit
      logout
      Connection to serverb closed.
      [student@workstation ~]$

Evaluation

On workstation, run the lab installing-review grade script to grade this exercise. Reboot servera to perform a kickstart installation.

[student@workstation ~]$ lab installing-review grade

Correct any failures in kickstart.cfg being shared from the serverb web server by either modifying /var/www/html/ks-config/kickstart.cfg directly or by modifying ~/kickstart.cfg and copying it to /var/www/html/ks-config/.

Reboot servera to perform a kickstart installation. At the GRUB menu, select Kickstart Red Hat Enterprise Linux 8 and press Enter.

Finish

On workstation, run the lab installing-review finish script to finish this exercise. This script removes the web server configured on serverb during the exercise.

[student@workstation ~]$ lab installing-review finish

Reset the servera system to return it to the default state.

This concludes the lab.

Revision: rh134-8.2-f0a9756