LFCS Certification LFCS Boot Process and System Initialization 1 — Questions and Answers
Question 1: What file contains the GRUB 2 configuration used at boot time on most Linux systems?
- /boot/grub2/grub.cfg (Correct answer)
- /etc/grub.conf
- /boot/grub/menu.lst
- /etc/default/grub2
Correct answer: /boot/grub2/grub.cfg
GRUB 2 reads /boot/grub2/grub.cfg at boot; this file is auto-generated and should not be edited directly.
Question 2: Which command regenerates the GRUB 2 configuration file on RHEL/CentOS-based systems?
- grub-update
- grub2-mkconfig (Correct answer)
- update-grub
- grub2-install
Correct answer: grub2-mkconfig
grub2-mkconfig reads /etc/default/grub and scripts in /etc/grub.d/ to produce a new grub.cfg.
Question 3: Which file stores default GRUB 2 settings such as timeout and GRUB_CMDLINE_LINUX?
- /etc/grub.d/00_header
- /etc/default/grub (Correct answer)
- /boot/grub2/grub.cfg
- /etc/grub2.cfg
Correct answer: /etc/default/grub
/etc/default/grub is the human-editable file where you set timeout, default entry, and kernel parameters.
Question 4: Which kernel parameter passed at the GRUB boot line boots the system into rescue mode?
- init=/bin/bash
- single
- systemd.unit=rescue.target (Correct answer)
- emergency
Correct answer: systemd.unit=rescue.target
Appending systemd.unit=rescue.target tells systemd to bring up only the rescue target instead of the default.
Question 5: What command installs the GRUB 2 bootloader to the MBR of the disk /dev/sda?
- grub-install /dev/sda1
- grub2-install /dev/sda (Correct answer)
- grub2-mkconfig /dev/sda
- fdisk --grub /dev/sda
Correct answer: grub2-install /dev/sda
grub2-install writes the GRUB stage 1 code to the MBR of the specified disk device, not a partition.
Question 6: Which directory contains the scripts that grub2-mkconfig reads to generate /boot/grub2/grub.cfg?
- /boot/grub2/scripts/
- /etc/grub.d/ (Correct answer)
- /usr/share/grub/
- /etc/default/grub.d/
Correct answer: /etc/grub.d/
/etc/grub.d/ holds numbered scripts (00_header, 10_linux, 40_custom, etc.) executed by grub2-mkconfig.
What file contains the GRUB 2 configuration used at boot time on most Linux systems?