3.2 Bootloaders Flashcards

2
Q

What is the path to the GRUB configuration file?

A

The path to the GRUB configuration file is /boot/grub/grug.conf or /boot/grub/menu.lst (which is a symbolic link to /boot/grub/grub.conf).

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

How do you change the default operating system when using GRUB?

A

Change the default operating system by editing the default option in the grub.conf file.

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

Which setting displays the available operating systems during system boot up?

A

The #hiddenmenu option (or absence of hiddenmenu) displays available operating systems during system boot up.

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

What is the syntax used to identify the root file system for each operating system in the GRUB menu?

A

The syntax for identifying the foot file system for each operating system is hd#,#, where the first # is the device number and the second # is the partition, starting with zero (0) for both.

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

How can you require authentication for the options in the GRUB menu?

A

The password option requires authentication for the options in the GRUB menu.

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

How many stages does GRUB have?

A

GRUB has two stages.

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

Where does Stage 1 of GRUB reside?

A

Stage 1 of GRUB resides in the MBR

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

What is the primary purpose of GRUB Stage 1?

A

Stage 1 of GRUB points to the location of Stage 2.

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

Where does Stage 2 of GRUB reside?

A

Stage 2 of GRUB resides in a disk partition - typically /boot

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

How do you install GRUB from the command line?

A

grub-install /dev/sda

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

What are the two sections of the GRUB configuration file?

A
  1. Global
  2. Menu Selection
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does GRUB refer to disk devices and partitions?

A

hd#,#, where the first # is the device number and the second # is the partition, starting with zero (0) for both.

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

What is the path of the GRUB root?

A
  • If the /boot directory is mounted to a separate partition: /grub
  • If the /boot directory is on the same partition as the rest of the filesystem: /boot/grub
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are GRUB Global options?

A
  • default: menu item that will be booted if the user makes no selection
  • timeout: seconds to wait before booting the default menu item
  • gfxmenu: location of image file for graphical boot menu
  • splashimage: location of image file for graphical boot menu
  • hiddenmenu: prevent graphical menu from being displayed at boot
  • password: password required for booting
  • password –md5: encrypted password required for booting
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the GRUB Title options?

A
  • title: Title of the menu item
  • lock: Require password to boot this title
  • root: Location of the partition to be mounted as GRUB root
  • rootnoverify: Location of partition with an operating system GRUB might not recognize
  • kernel: Location of the Linux kernel, e.g., /boot/vmlinuz
  • initrd: Location of the initrd image to use when creating the initial RAM disk, e.g., /boot/initrd
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Keys used with Interactive GRUB at boot time

A
  • e: edit boot sequence commands for a menu item
  • o: add boot sequence command for a menu item after the current line
  • O: add boot sequence command for a menu item before the current line
  • d: delete selected boot sequence command from a menu item
  • a: modify kernel arguments before booting
  • b: boot when done editing
  • c: command line
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How can you use interactive GRUB to specify a different run level?

A

Specify ‘3’ as a boot option.

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

What is the command to generate an encrypted password for GRUB?

A

grub-md5-crypt

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

What does the default GRUB option do?

A

Specify the operating system that boots as the default. The value may be the entry number (e.g., 0, 1, 2) or the name of the entry (e.g., Fedora).

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

What does the timeout GRUB option do?

A

Sets the number of seconds GRUB waits before automatically booting the default operating system.

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

What does the gfxmenu GRUB option do?

A

Specifies the image file which is displayed for the graphical boot menu. E.g., gfxmenu=(hd0,0)/grub/splash.xpm.gz identifies the default splash image.

23
Q

What does the splashimage GRUB option do?

A

Specifies the image file which is displayed for the graphical boot menu. E.g., splashimage=(hd0,0)/grub/splash.xpm.gz identifies the default splash image.

24
Q

What does the hiddenmenu GRUB option do?

A

Disables/Enables the menu that lists the operating system options.

  • hiddenmenu disables GRUB from displaying the available operating systems.
  • # hiddenmenu displays the available operating systems.Note: Adding the pound (#) symbol to this line only prevents the operating systems from being displayed on startup. If the user hits any key before GRUB selects the default operating system, the operating systems are displayed.
25
Q

What does the title GRUB option do?

A

Specify the title a user sees in the menu.

26
Q

What does the root GRUB option do?

A

Specifies the location of the root file system. E.g., root (hd0,0) specifies the first partition on the first hard drive as the root file system and root (hd0,1) specifies the second partition on the first hard drive as the root file system.

27
Q

What does the rootnoverify (fd0) GRUB option do?

A

Specifies the floppy drive as the root file system and that it should be loaded regardless of whether GRUB recognizes it.

28
Q

What does the kenrel GRUB option do?

A

Specifies the kernel for the entry and kernel options. E.g., kernel /vmlinuz-2.6.33.3-85.fc13.i686.

29
Q

What does the initrd GRUB option do?

A

Specifies the initial RAM disk (initrd image) file. E.g., initrd /initramfs-2.6.33.3-85.fc13.i686.img.

30
Q

What does the chainloader GRUB option do?

A

Specify the number of sectors to be read. E.g., chainloader +1 specifies that GRUB should read one sector.

31
Q

What does the password GRUB option do?

A

Require authentication for the options in the GRUB menu.

32
Q

What does the password --md5 GRUB option do?

A

Require authentication for the options in the GRUB menu using an encrypted password. To create an encrypted password: In a shell prompt, type grub-md5-crypt.

33
Q

What does the lock GRUB option do?

A

Prevent unauthorized boot of the operating system. When the lock keyword is present for an operating system, the password is required before the user can select and boot an operating system.

34
Q

What is GRUB2?

A

The updated version of the Grand Unified Boot Loader (GRUB) utility: any version of GRUB 1.98 or later.

35
Q

What is the path of the configuration file for GRUB2?

A

The configuration file for GRUB2 is /boot/grub/grub.cfg. It is similar to GRUB Legacy’s /boot/grub/menu.lst. It should not be edited directly.

36
Q

How should /boot/grub/grub.cfg be edited?

A

The /boot/grub/grub.cfg configuration file should be generated using the update-grub command.

37
Q

How does the update-grub command generate the /boot/grub/grub.cfg GRUB2 configuration file?

A

The update-grub command uses the /etc/default/grub file and the /etc/grub.d/ directory to generate the /boot/grub/grub.cfg configuration file.

38
Q

What does the /etc/grub.d directory hold?

A

The /etc/grub.d/ directory holds script files that are read when the update-grub command is used. The scripts are run in numeric/alphabetical order.

39
Q

What are the script files that reside in the /etc/grub.d directory?

A
  • 00_header: Sets initial appearance items such as the graphics mode, default selection, timeout, etc. These settings are typically imported from the /etc/default/grub file.
  • 05_debian_theme: Sets the GRUB2 background image, text colors, selection highlighting, and themes.
  • 10_linux: Identifies kernels on the root device for the operating system in use and creates menu entries.
  • 30_os-prober: Executes os-prober to search for other operating systems (i.e., Windows, Linux, etc.,) and place the results in the GRUB2 menu.
  • 40_custom: Allows for custom menu entries which are imported directly into /boot/grub/grub.cfg without any changes.
40
Q

What does the GRUB_DEFAULT option of the GRUB2 /etc/default/grub configuration file do?

A

Sets the default menu entry. Can be numeric (e.g., GRUB_DEFAULT=0) or the complete menu entry in quotes (e.g., GRUB_DEFAULT="Ubuntu, Linux 2.6.31-9-generic").

41
Q

What does the GRUB_SAVEDEFAULT

A

When GRUB_SAVEDEFAULT=true, automatically sets the last selected OS from the menu as the default OS on the next boot. Note: GRUB_DEFAULT=saved is required for this option to work correctly.

42
Q

What does the GRUB_HIDDEN_TIMEOUT option of the GRUB2 /etc/default/grub configuration file do?

A

Determines how long a screen without the GRUB2 menu will be displayed. Options:

  • 0 - immediately boots to the default OS
  • X - pauses and shows a blank screen for X seconds. If a user presses any key, the GRUB menu is displayed.
  • (blank) - uses the value specified in the GRUB_TIMEOUT entry
43
Q

What does the GRUB_HIDDEN_TIMEOUT_QUIET option of the GRUB2 /etc/default/grub configuration file do?

A

Hides/displays a countdown timer. Options:

  • true - does not display a countdown timer.
  • false - displays a countdown timer for the duration specified in the GRUB_HIDDEN_TIMEOUT entry.
44
Q

What does the GRUB_TIMEOUT option of the GRUB2 /etc/default/grub configuration file do?

A

Determines how long to wait for user interaction before booting into the default operating system. Options:

  • X - sets the display duration in seconds.
  • -1 - causes the menu to display until the user makes a selection.
    Note: The GRUB2 menu is hidden by default unless another OS is detected by the system. If there is no other OS, this line may be commented out unless the user changes it.
45
Q

What does the GRUB_CMDLINE_LINUX option of the GRUB2 /etc/default/grub configuration file do?

A

Adds entries to the end of the ‘linux’ command line (GRUB Legacy’s “kernel” line) for both normal and recovery modes. It is used to pass options to the kernel.

46
Q

What does the GRUB_GFXMODE option of the GRUB2 /etc/default/grub configuration file do?

A

Sets the resolution of the graphical menu. E.g., GRUB_GFXMODE=640x480 sets the resolution to 640x480.

You can append a color depth as well. E.g., GRUB_GFXMODE=1024x768x24 sets the resolution to 1024x768 with 24-bit colors.

Multiple resolutions may be specified if they are separated by commas. GRUB2 try each resolution in the order listed until it finds one that is supported by the system.

47
Q

What does the GRUB_INIT_TUNE option of the GRUB2 /etc/default/grub configuration file do?

A

Plays a single beep just prior to the GRUB2 menu display. Optional arguments include three numeric values in quotes separated by spaces: tempo, pitch, and duration.

48
Q

What does the GRUB_BACKGROUND option of the GRUB2 /etc/default/grub configuration file do?

A

Sets the background image during GRUB2 menu display. The full path should be used. E.g., GRUB_BACKGROUND=/usr/share/images/back.png displays back.png as the background image.

49
Q

What does the GRUB_DISABLE_OS_PROBER option of the GRUB2 /etc/default/grub configuration file do?

A

Enables/disables the os-prober check of other partitions for operating systems, including Windows, Linux, etc., during execution of the update-grub command. If the os-prober is enabled, operating systems found will be placed in the GRUB2 menu. Options:

  • true - disables the os-prober.
  • false - enables the os-prober and will add found operating systems to the GRUB2 menu.
50
Q

How do you tell which version of GRUB you are using?

A

Use the command grub-install -v or grub2-install -v to determin which version of GRUB you are using.

51
Q

How are disks numbered in GRUB2?

A

First hard drive is “hd0,” first partition is “1,” so “hd0,1” in GRUB2 is equivalent to “hd0,0” in GRUB Legacy.