Chapter 5 - Booting Linux & Editing Files Flashcards
in linux, what is the most-used boot loader?
5-234
Grand Unified Boot Loader
in the x86 boot system, there are two paths for the boot process. explain the difference between them
5-235
A - BIOS, MBR, boot sector, kernel
B - BIOS, MBR, kernel
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
true, you should do this to prepare for emerencies
what is the superblock?
5-237
part of the filesystem
on BIOS based computers, it can hold a portion of the boot loader
explain the EFI boot process to me.
5-237
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.
GRUB is really two boot loaders. tell me about them.
5-238
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.
after the system boots, many linux distributions store the kernel ring buffer in a log file. what is that log file?
5-247
/var/log/dmesg
there are 4 steps to the boot process. tell me what they are.
5-248,249
- power is given to the system, the CPU runs the firmware.
- the firmware performs some tasks, including locating a boot loader.
- boot loader takes control of the firmware, it loads a kernel or chainloads to another boot loader.
- once the kernel takes over, it initializes devices, mounts the root partition, loads the initial program for your system (/sbin/init, by default)
there are 3 popular initialization process methods used in linux. tell me what they are.
5-249
unix system v (also called SysV)
systemd
upstart
what is the key to SysV initialization process?
5-250
runlevels
there are 7 runlevels. tell me what they are.
5-251
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 can you affect what programs run when you enter a new SysV runlevel?
5-252
add or delete entries in your /etc/inittab file
entries in the /etc/inittab follow a simple format. explain it to me.
5-252
id:runlevels:action:process
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
inspect the /etc/inittab file with the less command
open it in an editor
you want to change the runlevel on a running system. there are 5 commands for this. tell me what they are.
5-255
init shutdown halt reboot poweroff
what is the simplest form of invoking the shutdown command?
5-256
shutdown now
to cancel a shutdown, what is the command?
5-257
shutdown -c “never mind”
what is the default initialization used in the fedora, centos, and red hat distributions?
5-258
the systemd initialization process method
what does systemd use instead of shell scripts and runlevels?
5-259
units and targets
each unit requires a configuration file. what does that configuration file define?
5-160
what program it starts and how it should start the program
target units use config files. what things do the target config files define? (there are 4 things that get defined)
5-261
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
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
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
what do you need to be able to view the systemd log files?
5-263
you have to use the journalctl program
as of the time this book got printed, was upstart finished?
5-264
no, was still under heavy development
tell me about vi
5-265
the first full-screen text editor written for Unix. most linux distributions ship with a variant of vi called Vim (Vi IMproved)