Chapter 2: Boot process and runlevels
Loadlin
A boot loader method of booting from a non-Linux system by literally swapping out a running non-Linux operating system with a running version of Linux.
consoled
A console daemon for use as a user console, this replaces the more traditional virtual terminal system with what can be a more system-friendly component.
logind
A daemon designed to replace Consolekit, logind supports X display managers, user logins, and so on.
LILO
A much older and less-configurable system for booting systems.
runlevel
A preset operating state on a Unix-like operating system.
init process
All other programs are either started directly by init or by one of its child processes.
2
At the GRUB prompt, make a default install of a Linux distribution to boot directly to runlevel 2 after system initialization.
boot process
Boot loader phase, kernel phase, early user space, init process.
vga
Boot option that allows the setting of the framebuffer's resolution to a given mode.
init
Boot option that causes the /sbin/init process to be the first process run on the system.
ro
Boot option that causes the root filesystem to be mounted in a read-only mode so that fsck can be run on the root filesystem in the case of possible errors.
rw
Boot option that causes the root filesystem to be mounted in a read-write mode and is also the default state.
single, 1
Boot option that causes the system to skip a full initialization to a default runlevel, instead putting the system into a troubleshooting or simple root-level state where you are the root user and have minimal processes running.
apm
Boot option that is on by default to manage power and can be turned off to enhance the system's compatibility.
mem
Boot option that sets the amount of memory that can be accessed by the about-to-be-booted system. Used when you suspect a memory bank is bad.
panic
Boot option to make a kernel wait a specified number of seconds to reboot if a panic occurs.
2, 3, 4, 5
Boot options that causes the system to initialize and then move to the specified runlevel, or in the case of systemd, the specified target that matches the runlevel number indicated.
systemctl list-units --type=target
Command to determine all the systemd targets that are active.
runlevel
Command to determine the default sysVinit runlevel.
systemctl get-default
Command to determine the default systemd runlevel.
journalctl -b, dmesg, cat /var/log/boot.msg
During your last system boot, you noticed several error messages that quickly scrolled off the screen and you are not sure which system initialization scheme is in place. What commands will likely show you just the messages from the most recent system boot?
shutdown -H
On a sysVinit system, what command halts the machine, but doesn't power it off?
shutdown -r
On a sysVinit system, what command reboots the machine after shutting it down properly?
halt -p, shutdown -P
On a sysVinit system, what command shuts down the system properly by halting the system and powering it off?
shutdown -k
On a sysVinit system, what command simulates a power off and writes a wall message as a fake power off?
init, telinit
On a sysVinit system, what two commands can set the current runlevel?
/etc/inittab
On a sysVinit system, where do you change the default runlevel line id:5:initdefault:
systemctl halt
On a systemd system, what command halts the machine, but doesn't power it off?
systemctl reboot
On a systemd system, what command reboots the machine after shutting it down properly?
systemctl isolate
On a systemd system, what command sets the current target(s) to a single target?
systemctl poweroff
On a systemd system, what command shuts down the system properly by halting the system and powering it off?
journalctl --list-boots
On a systemd system, what command will list out the boot logs?
/usr/lib/systemd/system/
On a systemd system, where is the default.target linking to
shutdown -c
On sysVinit and systemd, what command will cancel a scheduled shutdown?
shutdown +30 "System going down in 30 minutes"
On sysVinit and systemd, what command will issue a reboot in 30 minutes and display a notice to all logged in users "System going down in 30 minutes"?
SYSLINUX
Primarily used for boot or rescue disk options to boot Linux from live USB devices and others while being able to load Linux systems from a FAT filesystem on DOS or early Windows system.
4, multi-user.target
Runlevel, target that is the same as runlevel 3, multi-user.target.
1, rescue.target
Runlevel, target, that configures a rescue shell session.
2, multi-user.target
Runlevel, target, that sets the system to a nongraphical multiuser system, typically with no network services.
5, graphical.target
Runlevel, target, that sets up the system as a graphical multiuser system with network services.
3, multi-user.target
Runlevel, target, that sets up the system as a nongraphical multiuser system, with network services.
6, reboot.target
Runlevel, target, that shuts down and boots the system again.
0, poweroff.target
Runlevel, target, that shuts down and powers off the system.
networkd
The daemon that provides networking support for systemd's network access
GRUB
The default boot loader for nearly all production and almost all user instances of Linux these days
systemd
The first process that starts after the kernel has loaded and that takes care of starting all other processes and services on a modern Linux system as an improvement over init
BIOS
The first software that is started when a computer starts.
/etc/systemd/system
The location of units that are controlled by the sysadmin and have ultimate precedence over all the other units.
/run/systemd/system
The location of units that have been created at runtime; may have precedence over non-runtime or installed units.
/usr/lib/systemd/system/
The location of units that have been installed with the distribution.
boot logging
The logging of everything that loaded or happened during the boot process.
journald
The logging system for systemd by default. journald uses binary files for its logging, and it can be replaced by more traditional logging mechanisms such as rsyslog and syslog-ng.
reboot
The procedure of stopping the computer and starting it again.
shut down
The process of closing all software programs in preparation to turn off a computer's power.
boot loader
The program called by the BIOS to start a computer and that takes care of loading the operating system and initramfs.
Upstart
The system used in RHEL 6 to start services during system initialization, similar to systemd.
/sbin/init
The systemd daemon is linked to by a symlink from:
systemctl
The systemd state inspection and state controlling utility.
default.target
The target file that is read after the kernel and initramdisk is:
systemd-analyze
The utility that allows you to inspect performance statistics regarding system bootup as well as view trace and current state information.
dmesg
What command shows messages read from the kernel ring buffer to standard output?
kill 388
What command will kill a process with PID 388?
ps -a
What command will list all process not associated with the terminal?
pstree
What command will list user processes in a hierarchical tree?
kill -9 388
What command will send a SIGKILL signal to a hung process with PID 388?
e
What command would allow you to make changes to parameters for a configured GRUB menu choice before booting the system?
killall foobar
What command would remove all running instances of the foobar application?
halt, poweroff
What commands are symlinked to the reboot command?
1, s, S
What could you type at the GRUB menu to enter a system administrator mode for troubleshooting a system that will not complete normal boot?
group tag
What feature helps in the orderly removal of processes and groups of processes when the system is using the systemd initialization process?
(hd0,4)
What format does the first logical partition on the first hard disk in a GRUB configuration file look like?
journald, systemctl
What is part of the systemd utilities or commands?
master boot record, first sector of partition
What locations are you most likely to find the boot loader code on a Linux system?
/var/log/messages, /var/log/syslog
What two locations does dmesg generally pull its output from?
kill -s SIGHUP, kill -HUP, kill -1
You have edited the configuration file of the service and need that service to reread the configuration and continue serving its attached client processes. Which commands will accomplish this?