1.1 Explain Linux boot process concepts Flashcards

1
Q

Describe the Linux Boot Process

A

The BIOS or UEFI starts a bootloader program from the Master Boot Record, which is usually the Linux GRUB Legacy or GRUB2 program. The bootloader program loads the Linux kernel into memory, which in turn looks for the init program to run. The init program starts individual application programs and starts either the command-line terminals or the graphical desktop manager

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

Where are kernel boot messages stored?

A

Boot kernel messages are stored into a special ring buffer in memory, called the kernel ring buffer.

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

What command is used to display the most recent boot messages that are currently stored in the kernel ring buffer?

A

dmesg

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

What file are boot messages stored?

A

Most Linux distributions also store the boot messages in a log file, usually in the /var/log folder

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

BIOS

A

Basic Input/Output System (BIOS)

The MBR is the first sector on the first hard drive partition on the system. There is only one MBR for the computer system. The BIOS looks for the MBR and reads the program stored there into memory. Since the bootloader program must fit in one sector, it must be very small, so it can’t do too much. The bootloader program mainly points to the location of the actual operating system kernel file, stored in a boot sector of a separate partition installed on the system. There are no size limitations on the kernel boot file

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

EFI

A

Extensible Firmware Interface (EFI)

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

UEFI

A

Universal Extensible Firmware Interface

Instead of relying on a single boot sector on a hard drive to hold the bootloader program, UEFI specifies a special disk partition, called the EFI System Partition (ESP), to store bootloader programs. This allows for any size of bootloader program, plus the ability to store multiple bootloader programs for multiple operating systems

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

Where are ESP typically mounted?

A

On Linux systems, the ESP is typically mounted in the /boot/efi folder, and the bootloader files are typically stored using the .efi filename extension, such as linux.efi

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

GRUB

A

The GRUB Legacy bootloader stores files in the /boot/grub folder and uses the menu.lst or grub.conf configuration file to define commands used at boot time. The commands can create a boot menu, allowing you to select between multiple boot locations, options, or features. You must use the grub-install program to install the GRUB Legacy bootloader program into the Master Boot Record

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

GRUB2

A

The GRUB2 bootloader also stores files in the /boot/grub folder, but it uses the grub.cfg configuration file to define the menu commands. You don’t edit the grub.cfg file directly but instead store files in the /etc/default/grub file or individual configuration files in the /etc/grub.d folder. Run the grub-mkconfig program to generate the GRUB2 configuration from the configuration files and then redirect the output to the /etc/grub.cfg file.

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

PXE

A

A bootloader for booting from a network server

while PXE was designed to use TFTP to load the boot image, it has been modified to also load the bootloader image stored on a network server using NFS, HTTP, or even FTP.

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

Boot from ISO

A

A bootloader for booting from a LiveCD or LiveDVD

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

Kernel Panics

A

Kernel failures are when the Linux kernel stops running in memory, causing the Linux system to crash. This is commonly referred to as a kernel panic. Kernel panics often are a result of a software change, such as installing a new kernel without the appropriate module or library changes or starting (or stopping) a program at a new runlevel. Often these types of boot errors can be fixed by starting the system using an alternative method and editing the necessary files to change the system

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

Single-User Mode

A

At times you may need to perform some type of system maintenance, such as add a new hardware module or library file to get the system to boot properly. In these situations, you want the system to boot up without allowing multiple users to connect, especially in a server environment. This is called single-user mode.

The GRUB menu allows you to start the system in single-user mode by adding the single command to the linux line in the boot menu commands. To get there, press the E key on the boot option in the GRUB boot menu.

When you add the single command, the system will boot into runlevel 1, which creates a single login for the root user account. Once you log in as the root user account, you can modify the appropriate modules, init scripts, or GRUB boot menu options necessary to get your system started correctly

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

What is the initrd command used for?

A

If you install new hardware on your system that’s required to be visible at boot time, you’ll need to modify the initrd file. You can create a new initrd RAM disk image containing modules for the new hardware using the mkinitrd command in Red Hat–based systems. For Debian-based systems, the file is called initramfs, and you create it using the mkinitramfs command. Alternatively, you can use the dracut utility, which creates the initramfs image from a framework and copies files from the installed modules

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

vmlinuz

A

the z at the end of the filename indicates that the kernel file is compressed using the bzImage compression method

17
Q

vmlinux

A

For kernel files that aren’t compressed, the kernel image file is usually called vmlinux