Study Guide - Chap5: Explaining the Boot Process Flashcards

(13 cards)

1
Q

2- Where does the firmware first look for a Linux bootloader program?

  • The /boot/grub folder
  • The Master Boot Record (MBR)
  • The /var/log folder
  • A boot partition
  • The /etc folder
A

The Master Boot Record (MBR)

The workstation firmware looks at the first sector of the first hard drive to load the bootloader program. This is called the Master Boot Record, so option A is correct. The bootloader program itself can use the chainloader feature to look for another bootloader in a boot partition, but the firmware can’t do that, so option D is incorrect. Option A specifies the configuration folder used to store the GRUB configuration file and the kernel image file, but the actual GRUB bootloader program can’t be stored there. Option C specifies the common log file folder, but that doesn’t contain the GRUB bootloader program. Option E also specifies a common Linux configuration file directory, but it’s not used to store the GRUB bootloader program that the firmware can access.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Boot Process

A
  1. BIOS/UEFI
  2. MBR/GPT
  3. GRUB2
  4. initrd/Kernel
  5. systemd (will be process 1)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

3- The ____ command allows us to examine the most recent boot messages.

  • fsck
  • init
  • mount
  • dmesg
  • mkinitrd
A

dmesg

The kernel ring buffer, which you can view by typing dmesg, contains messages from the boot messages from the kernel; thus, option D is correct. The fsck program (option A) fixes corrupted partitions, and the mount program (option C) is used to attach partitions to the virtual directory, so neither of those is correct. Option B, the init program, is used to start programs from the kernel, not display boot messages, so it also is incorrect. Option E, the mkinitrd program, is used to create a new initrd RAM disk and is not related to the boot messages, so it too is incorrect

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

6- Where is the Master Boot Record located? (Choose all that apply.)

  • The first sector of the first hard drive on the system
  • The boot partition of any hard drive on the system
  • The last sector of the first hard drive on the system
  • Any sector on any hard drive on the system
  • The first sector of the second hard drive on the system
A

The first sector of the first hard drive on the system

The Master Boot Record (MBR) is only located in one place: on the first sector of the first hard drive on the workstation; thus, option A is the only correct answer. The boot partition in any hard drive may contain a bootloader, but it is not the Master Boot Record, which is run first by the firmware; thus, option B is incorrect. The other locations are not valid locations for the Master Boot Record, so options C, D, and E are all incorrect.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

7- The EFI System Partition (ESP) is stored in the _ directory on Linux systems.

  • /boot
  • /etc
  • /var
  • /boot/efi
  • /boot/grub
A

/boot/efi

The ESP is stored in the /boot/efi directory on Linux systems. The UEFI firmware always looks for the /boot/efi directory for bootloader programs, so option D is correct. The /etc directory is used to store application and system configuration files, not bootloader programs, so option B is incorrect. The /var folder is used to store variable files such as log files, not bootable files, so option C is incorrect. Option E, the /boot/grub file, is used in GRUB Legacy and GRUB2 to store the bootloader configuration files, as well as the kernel image files. However, it is not used to store the bootloader files themselves, so option E is incorrect.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

8- What file extension UEFI bootloader files use?

  • .cfg
  • .uefi
  • .lst
  • .conf
  • .efi
A

.efi

The UEFI specification doesn’t require a specific extension for UEFI bootloader files, but it has become somewhat common in Linux to use the .efi file extension to identify them; thus, option E is correct. Option A and option D specify file extensions used to identify GRUB2 (option A) and GRUB Legacy (option D) configuration files, not UEFI bootloader files, so they are both incorrect. Option C specifies the .lst file extension, which is also used for GRUB Legacy configuration files, so it too is incorrect. The .uefi file extension is not used in Linux, so option B is incorrect.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

9- Which was the first bootloader program used in Linux?

  • GRUB Legacy
  • LILO
  • GRUB2
  • SYSLINUX
  • ISOLINUX
A

LILO

The Linux Loader (LILO) bootloader program was the first bootloader used in Linux, so option B is correct. The GRUB Legacy bootloader, despite its name, wasn’t the first bootloader, but the second bootloader commonly used in Linux. The GRUB2 bootloader was a later improvement over the GRUB Legacy bootloader, so options A and C are incorrect. Option D, the SYSLINUX bootloader, provides features for use with Microsoft FAT partitions, so that you can boot Linux from a floppy drive or USB memory stick, but it is a later creation and not the first Linux bootloader. Option E, ISOLINUX, is also a later bootloader that allows us to boot Linux from a CD or DVD drive.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Where are GRUB legacy config files stored?
Where are GRUB2 config files stored?

A

GRUB Legacy
* /boot/grub

GRUB2
* /boot/grub
* /etc/grub.d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

12- You must run the command to generate the GRUB2 grub.cfg configuration file.

  • mkinitrd
  • mkinitramfs
  • grub-mkconfig
  • grub-install
  • fsck
A

grub-mkconfig

The grub-mkconfig command combines the configurations defined in the /etc/default/grub file and all of the files in the /etc/grub.d folder into a single grub.cfg configuration file. The mkinitrd command (option A) is used to create a new initrd RAM disk image file, so it is incorrect. Likewise, the mkinitramfs command (option B) is also used to create initrd image files on Debian systems, so it too is incorrect. The grub-install program is used by the GRUB Legacy bootloader to install the bootloader in the MBR or a boot partition, but isn’t used to generate the GRUB2 configuration files, and is thus incorrect. Option E is the fsck program, which checks and repairs hard drive partitions, and is an incorrect answer for this question.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

mkinitrd

A
  • Creates an initial RAM disk image (initrd) for the boot process; this temporary root file system loaded during early boot
  • contains essential drivers and modules needed to mount the actual root filesystem
  • used primarily in older distributions like RHEL/CentOS 6 and earlier
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

mkinitramfs

A
  • The newer replacement for mkinitrd that creates an initial RAM filesystem (initramfs)
  • performs the same function of creating the temporary boot environment but with improved flexibility and features
  • commonly used in Ubuntu, Debian, and newer RHEL/CentOS versions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

13- What command must you run to save changes to a GRUB Legacy boot menu?

  • mkinitrd
  • mkinitramfs
  • grub-mkconfig
  • grub-install
  • fsck
A

grub-install

The grub-install command installs any configuration changes into the GRUB MBR, so option D is correct. The mkinitrd command creates a new initrd RAM disk image file, so option A is incorrect. Likewise, the mkinitramfs command (option B) is also used to create initrd image files on Debian systems, so it too is incorrect. The grub-mkconfig command is used in GRUB2 systems to create an updated configuration file but not in GRUB Legacy systems, so option C is incorrect. The fsck program checks and repairs hard drive partitions, so option E is incorrect.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

15- What memory area does Linux use to store boot messages?

  • BIOS
  • The GRUB bootloader
  • The MBR
  • The initrd RAM disk
  • The kernel ring buffer
A

The kernel ring buffer

The kernel ring buffer is an area in memory reserved for storing output messages as the Linux system boots, so option E is correct. Option A, BIOS, is firmware on the workstation, not an area in memory, so it is incorrect. The GRUB bootloader, option B, is a program that starts the Linux system and is not in memory, so it is also incorrect. The MBR is a location on the hard drive to store the Linux bootloader, so option C is incorrect. The initrd RAM disk is an area in memory that stores modules required for the boot process, but it doesn’t store the boot messages as the system starts, so option D is incorrect.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly