Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Linux Foundation Certified System Administrator · Linux Foundation
Hotspot Scenario
Select the appropriate option to complete the statement. Click Check Answer below to see the marked solution.
Hotspot Solution:
The name of the main configuration file for GNU GRUB is grub.cfg. GNU GRUB is a bootloader that is used to boot a wide variety of operating systems, including Linux, BSD, and Windows. It reads its configuration from a file called grub.cfg, which is usually located in the /boot/grub/ directory. The grub.cfg file contains the menu entries and boot options that are presented to the user at boot time. It specifies the default boot entry, the timeout before the default entry is booted, and the options that are passed to the kernel. For example: # Set the default boot entry set default=0 # Set the timeout in seconds set timeout=5 # Define a menu entry for the Linux kernel menuentry 'Linux' { set root='(hd0,1)' linux /vmlinuz-4.19.0-13-amd64 root=/dev/sda2 ro initrd /initrd.img-4.19.0-13-amd64 } # Define a menu entry for the Windows bootloader menuentry 'Windows' { set root='(hd0,2)' chainloader +1 }
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
The name of the main configuration file for GNU GRUB is grub.cfg. GNU GRUB is a bootloader that is used to boot a wide variety of operating systems, including Linux, BSD, and Windows. It reads its configuration from a file called grub.cfg, which is usually located in the /boot/grub/ directory. The grub.cfg file contains the menu entries and boot options that are presented to the user at boot time. It specifies the default boot entry, the timeout before the default entry is booted, and the options that are passed to the kernel. For example: # Set the default boot entry set default=0 # Set the timeout in seconds set timeout=5 # Define a menu entry for the Linux kernel menuentry 'Linux' { set root='(hd0,1)' linux /vmlinuz-4.19.0-13-amd64 root=/dev/sda2 ro initrd /initrd.img-4.19.0-13-amd64 } # Define a menu entry for the Windows bootloader menuentry 'Windows' { set root='(hd0,2)' chainloader +1 }
This is a sample grub.cfg file that defines two menu entries: one for the Linux kernel, and one for the Windows bootloader. The default boot entry is set to the Linux kernel, and the timeout is set to 5 seconds. The options that are passed to the kernel are specified in the linux command, and the initrd image is specified in the initrd command. To make changes to the GRUB configuration, you can edit the grub.cfg file manually, or you can use the grub-mkconfig command to generate a new configuration file based on the available kernels and boot options.