nerdexam
CompTIA

XK0-004 · Question #439

The grub2-mXconfig command is used to generate a new GRUB2 configuration after:

The correct answer is C. changing the /boat/grub2/grub.cfg file. grub2-mkconfig is the command used to regenerate the /boot/grub2/grub.cfg file, which is the active GRUB2 configuration read by the bootloader at startup.

System Management

Question

The grub2-mXconfig command is used to generate a new GRUB2 configuration after:

Options

  • Aresizing the /best filesystem
  • Bchanging the/etc/default/grub file
  • Cchanging the /boat/grub2/grub.cfg file
  • Dinstalling new software from a package

How the community answered

(23 responses)
  • A
    4% (1)
  • B
    9% (2)
  • C
    87% (20)

Why each option

grub2-mkconfig is the command used to regenerate the /boot/grub2/grub.cfg file, which is the active GRUB2 configuration read by the bootloader at startup.

Aresizing the /best filesystem

Resizing the /boot filesystem is a disk partition operation and does not require regenerating the GRUB2 menu or bootloader configuration entries.

Bchanging the/etc/default/grub file

/etc/default/grub is a source input file that you edit before running grub2-mkconfig; it is not the GRUB2 configuration file that grub2-mkconfig generates - the command reads it as input to produce grub.cfg.

Cchanging the /boat/grub2/grub.cfg fileCorrect

The /boot/grub2/grub.cfg file is the compiled GRUB2 bootloader configuration that is read directly at system startup. grub2-mkconfig aggregates settings from /etc/default/grub and scripts in /etc/grub.d/ and writes the resulting configuration to /boot/grub2/grub.cfg, making it the specific file this command generates and updates.

Dinstalling new software from a package

Installing general software packages does not require regenerating the bootloader configuration unless the package is specifically a kernel or bootloader component, making this answer too broad and imprecise.

Concept tested: grub2-mkconfig command and GRUB2 configuration file generation

Source: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_monitoring_and_updating_the_kernel/configuring-kernel-command-line-parameters_managing-monitoring-and-updating-the-kernel

Topics

#GRUB2#grub2-mkconfig#bootloader configuration#grub.cfg

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice