- "Do I Know This Already?" Quiz
- Foundation Topics
- Working with GRUB 2
- Exam Preparation Tasks
- Review All Key Topics
- Define Key Terms
- Review Questions
- End-of-Chapter Labs
- Lab 17.1
- Lab 17.2
In this sample chapter from Red Hat RHCSA 8 Cert Guide: EX200, explore how the boot procedure on Red Hat Enterprise Linux is organized, including how to use Systemd targets to boot your Linux system into a specific state and how to apply changes to the GRUB 2 boot loader.
The following topics are covered in this chapter:
Managing Systemd Targets
Working with GRUB 2
The following RHCSA exam objectives are covered in this chapter:
Configure systems to boot into a specific target automatically
Modify the system bootloader
In this chapter, you learn how the boot procedure on Red Hat Enterprise Linux is organized. In the first part of this chapter, you learn about Systemd targets and how you can use them to boot your Linux system into a specific state. The second part of this chapter discusses GRUB2 and how to apply changes to the GRUB 2 boot loader. Troubleshooting is not a topic in this chapter; it is covered in Chapter 18, “Essential Troubleshooting Skills.”
“Do I Know This Already?” Quiz
The “Do I Know This Already?” quiz allows you to assess whether you should read this entire chapter thoroughly or jump to the “Exam Preparation Tasks” section. If you are in doubt about your answers to these questions or your own assessment of your knowledge of the topics, read the entire chapter. Table 17-1 lists the major headings in this chapter and their corresponding “Do I Know This Already?” quiz questions. You can find the answers in Appendix A, “Answers to the ‘Do I Know This Already?’ Quizzes and ‘Review Questions.’”
Table 17-1 “Do I Know This Already?” Section-to-Question Mapping
Foundation Topics Section
Working with Systemd
Working with GRUB 2
Which of the following is the most efficient way to define a system want?
Use the systemctl enable command.
Define the want in the unit file [Service] section.
Create a symbolic link in the /usr/lib/system/system directory.
Create a symbolic link in the unit wants directory in the /etc/system/system directory.
Which target is considered the normal target for servers to start in?
Which of the following is not an example of a system target?
Where do you define which target a unit should be started in if it is enabled?
The target unit file
The wants directory
The systemctl.conf file
The [Install] section in the unit file
To allow targets to be isolated, you need a specific statement in the target unit file. Which of the following describes that statement?
An administrator wants to change the current multi-user.target to the rescue.target. Which of the following should she do?
Use systemctl isolate rescue.target
Use systemctl start rescue.target
Restart the system, and from the GRUB boot prompt specify that rescue.target should be started
Use systemctl enable rescue.target --now
To which System V runlevel does multi-user.target correspond?
What is the name of the file where you should apply changes to the GRUB 2 configuration?
After applying changes to the GRUB 2 configuration, you need to write those changes. Which of the following commands will do that for you?
grub2 -o /boot/grub/grub.cfg
grub2-mkconfig > /boot/grub2/grub.cfg
grub2 > /boot/grub2/grub.cfg
grub2-install > /boot/grub2/grub.cfg
What is the name of the GRUB2 configuration file that is generated on a UEFI system?
A. The systemctl enable command creates a want for the current unit in the target that is listed in the [Install] section in the service unit file.
C. Servers typically don’t run a graphical interface and will start the multi-user.target.
B. There is no restart.target.
D. Unit files contain an [Install] section that is used to specify in which target the unit should be started.
A. The required statement is AllowIsolate. All other statements mentioned here are invalid.
A. To switch from a target with more unit files to a target with fewer unit files, use systemctl isolate.
B. The multi-user.target corresponds roughly to runlevel 3 as used in a System V environment.
D. Changes to GRUB 2 need to be applied to /etc/default/grub, not to /boot/grub2/grub.cfg. The /boot/grub2/grub.cfg file cannot be edited directly; you have to apply changes to /etc/default/grub and run the grub2-mkconfig command to write them to the appropriate configuration file.
B. The grub2-mkconfig command enables you to regenerate the GRUB 2 configuration. The result, by default, is echoed to the screen. Use redirection to write it to a file.
B. The /boot/efi/EFI/redhat/grub.cfg file is used to store the GRUB 2 bootloader on a UEFI system.