Chapter 5 - Booting Linux & Editing Files Flashcards

1
Q

in linux, what is the most-used boot loader?

5-234

A

Grand Unified Boot Loader

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

in the x86 boot system, there are two paths for the boot process. explain the difference between them

5-235

A

A - BIOS, MBR, boot sector, kernel

B - BIOS, MBR, kernel

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

true/false: you can put the linux boot loader on a usb drive (it doesn’t have to be on the hard drive)

5-236

A

true, you should do this to prepare for emerencies

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

what is the superblock?

5-237

A

part of the filesystem

on BIOS based computers, it can hold a portion of the boot loader

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

explain the EFI boot process to me.

5-237

A

you start in the EFI, the extensible firmware interface. from there, you jump to the ESP, which is the EFI System Partition. the ESP has a choice of boot loaders, loader1.efi and loader2.efi. EFI chooses one of these and one of two things will happen. loader1 will launch kernel1 OR loader2 will launch kernel2.

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

GRUB is really two boot loaders. tell me about them.

5-238

A

GRUB legacy and GRUB2. GRUB legacy is the older of the two and supports BIOS but not EFI. GRUB2 is similar, but adds features and support for specific filesystems that GRUB Legacy can’t handle.

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

after the system boots, many linux distributions store the kernel ring buffer in a log file. what is that log file?

5-247

A

/var/log/dmesg

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

there are 4 steps to the boot process. tell me what they are.

5-248,249

A
  1. power is given to the system, the CPU runs the firmware.
  2. the firmware performs some tasks, including locating a boot loader.
  3. boot loader takes control of the firmware, it loads a kernel or chainloads to another boot loader.
  4. once the kernel takes over, it initializes devices, mounts the root partition, loads the initial program for your system (/sbin/init, by default)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

there are 3 popular initialization process methods used in linux. tell me what they are.

5-249

A

unix system v (also called SysV)
systemd
upstart

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

what is the key to SysV initialization process?

5-250

A

runlevels

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

there are 7 runlevels. tell me what they are.

5-251

A

0 - shuts down the system
1,s, or S - single user mode
2 - special for Debian, is a multi user mode
3 - for Fedora, Mandriva, and Red Hat, multi user mode
4 - undefined by default, used for customization
5 - same as runlevel 3, but with X running XDM login
6 - for rebooting the system

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

how can you affect what programs run when you enter a new SysV runlevel?

5-252

A

add or delete entries in your /etc/inittab file

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

entries in the /etc/inittab follow a simple format. explain it to me.

5-252

A

id:runlevels:action:process

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

you are checking you default runlevel on a SysV based system. there are two ways to do it. tell me what they are.

5-255

A

inspect the /etc/inittab file with the less command

open it in an editor

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

you want to change the runlevel on a running system. there are 5 commands for this. tell me what they are.

5-255

A
init
shutdown
halt
reboot
poweroff
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what is the simplest form of invoking the shutdown command?

5-256

A

shutdown now

17
Q

to cancel a shutdown, what is the command?

5-257

A

shutdown -c “never mind”

18
Q

what is the default initialization used in the fedora, centos, and red hat distributions?

5-258

A

the systemd initialization process method

19
Q

what does systemd use instead of shell scripts and runlevels?

5-259

A

units and targets

20
Q

each unit requires a configuration file. what does that configuration file define?

5-160

A

what program it starts and how it should start the program

21
Q

target units use config files. what things do the target config files define? (there are 4 things that get defined)

5-261

A

what targets should be loaded first
what targets are required for this target to start
what targets conflict with this target
what targets or services the target require to be running

22
Q

the systemctl method uses commands that act on units. there are 10 commands. i will give you the names, tell me what they do.

list-units
default
isolate
start name
stop name
reload name
restart name
status name
enable name
disable name

5-262

A

display the current status of all configured units
change to the default target unit
start the named unit and stops all others
start the named unit
stop the named unit
make the named unit reload its config file
shut down and restart the named unit
display the status of the named unit
makes the unit start when the computer next boots
make the unit not start when the computer next boots

23
Q

what do you need to be able to view the systemd log files?

5-263

A

you have to use the journalctl program

24
Q

as of the time this book got printed, was upstart finished?

5-264

A

no, was still under heavy development

25
Q

tell me about vi

5-265

A

the first full-screen text editor written for Unix. most linux distributions ship with a variant of vi called Vim (Vi IMproved)