3.1 Linux Boot Process Flashcards

2
Q

What are the four general stages for the boot process?

A
  1. BIOS
  2. Boot loader
  3. OS Kernel
  4. Init
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When is the initrd image loaded into memory?

A

The initrd (Initial RAM Disk) image is loaded into memory while the secondary boot loader is loading.

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

What is the default initial program?

A

The default initial (init) program is /sbin/init.

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

Which component mounts the root partition?

A

The OS Kernel mounts the root partition.

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

What is the process ID of the initial program?

A

The process ID of the initial (init) program is 1.

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

Where is the primary boot loader located?

A

The primary boot loader code is located in the master boot record (MBR).

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

What are the stages in the Linux boot process?

A
  1. BIOS
  2. Boot loader
  3. OS Kernel
  4. Init
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What happens in the BIOS stage of the Linux boot process?

A

In the BIOS stage, BIOS is loaded and the system hardware is identified.

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

What are the steps in the BIOS stage of the Linux boot process?

A
  1. Power is supplied to the processor. The processor is hard-coded to look at a special memory address for code to execute.
  2. This memory address contains a pointer or jump program which instructs the processor where to find the BIOS program.
  3. The processor loads the BIOS program. The first BIOS process to run is the power on self test (POST).
  4. If the POST is successful, the BIOS identifies other system devices.
  5. The BIOS then searches for a boot sector using the boot order specified in the CMOS.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What happens when the BIOS identifies system devices after POST?

A
  1. BIOS uses CMOS settings and information supplied by the devices themselves to identify and configure hardware devices.
  2. Plug and Play devices are allocated system resources.
  3. The system typically displays information about the keyboard, mouse, and IDE drives in the system.
  4. Following this summary, information about devices and system resources is displayed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What happens in the Boot Loader stage of the Linux boot process?

A

During the boot loader stage, BIOS gives control to the boot loader program.

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

What are the steps in the Boot Loader stage of the Linux boot process?

A
  1. BIOS searches the boot sector which contains a Master Boot Record (MBR).
  2. BIOS loads the primary boot loader code from the MBR.
  3. The primary boot loader locates the OS kernel (itself or through a secondary boot loader)
  4. While the secondary boot loader is executing, a splash screen is commonly displayed and an optional initrd image is loaded into memory.
  5. With the images ready, the boot loader (primary or secondary) invokes the kernel image.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the two methods the primary boot loader uses to locate the OS kernel?

A
  1. It examines the partition table marked as bootable, and then loads the boot sector from that partition. This boot sector contains a secondary boot loader, which locates an OS kernel. Or,
  2. It locates an OS kernel directly without using a secondary boot loader.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the is the initrd image and how is it used?

A

The initrd or Initial RAM Disk image:

  • Has root permissions and can be used to access the actual /root file system regardless of whether it exists on the local computer or an external device. Without the permissions, the computer could not access the file systems without being able to read information that only exists on those file systems.
  • Is used to mount the actual file system and load the kernel into RAM.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What happens in the OS Kernel stage of the Linux boot process?

A

The Linux kernel takes over.

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

Where does the OS Kernel image reside?

A

The OS Kernel resides in the /boot directory.

18
Q

What does the OS Kernel do when it takes over from the primary boot loader?

A
  1. Initializes the hardware on the system.
  2. Locates and loads the initrd script to access the linuxrc program which configures the operating system.
  3. Dismounts and erases the RAM disk image (initrd image).
  4. Looks for new hardware and loads the drivers.
  5. Mounts the root partition.
  6. Loads and executes the initial (init) process.
19
Q

What happens in the Init stage of the Linux boot process?

A

The OS Kernel starts the initial (init) process.

20
Q

Which binary, by default, is the initial (init) process?

A

By default, /sbin/init is the initial (init) process.

21
Q

Wat is the process ID of the initial(init) process?

A

The initial program gets the process ID of 1 because it’s the first process to run on the system.

22
Q

How is the /etc/inittab file used during the Init stage of the Linux boot process?

A

If /sbin/init is the initial process, the kernel reads a file called /etc/inittab to determine what other programs to run, such as:

  • Scripts to mount partitions or start system services known as daemons
  • A console for a login
  • An X Display Manager (XDM) for a graphical login