SCA_SLES15 practice question 10 of 15

Assume you need to make the third menu entry of your GRUB2 boot menu your default menu selection. What tasks must be completed to accomplish this? (Choose two)

Full set: 69 questions
Answer options
A: Run the grub2-mkconfig command Correct answer
B: Edit the /etc/default/grub file and set GRUB_DEFAULX to 2 Correct answer
C: Run the mkinitrd command
D: Edit /etc/grub2/custom.cfg and set GRUB_MENU to3
E: Edit the /boot/grub2/menu.cfg file and set MENU_DEFAULT to 3
F: Run the systemctl reload systemd command
Correct Answer:
A. Run the grub2-mkconfig command; B. Edit the /etc/default/grub file and set GRUB_DEFAULX to 2
Explanation

To change the default boot entry in GRUB2, you must first edit the main configuration file, /etc/default/grub. The GRUBDEFAULT parameter is set to the zero-based index of the desired menu entry; therefore, the third entry corresponds to an index of 2. After saving this change, the grub2-mkconfig -o /boot/grub2/grub.cfg command must be executed. This command reads the settings from /etc/default/grub and generates the new bootloader configuration file (grub.cfg) that GRUB2 actually uses during boot.

Why Incorrect

C. The mkinitrd command is used to create the initial RAM disk, which is unrelated to the GRUB2 menu configuration.
D. The file /etc/grub2/custom.cfg is for adding custom menu entries, not for setting the default entry, and GRUBMENU is not a valid parameter.
E. The file /boot/grub2/grub.cfg should not be edited directly as it is auto-generated; changes will be overwritten.
F. The systemctl command manages systemd services and has no effect on the bootloader's configuration.

References

- SUSE Linux Enterprise Server 15 SP5 Administration Guide, Chapter 13: "The Boot Loader GRUB2", Section 13.2.1: "Configuring the Boot Loader with YaST" and Section 13.2.2: "Configuring the Boot Loader by Editing Files". Both sections describe modifying /etc/default/grub and then running grub2-mkconfig.

Scroll to Top