Boot and Startup Flashcards

1
Q

What is the “Boot Process”?

A

When you apply power to your computer, it begins the so-called boot process. This process usually ends when the system is ready for use. It consists of a series of operations and involves several, different programs.

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

What does BIOS stand for?

A

Basic Input Output System

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

How does the boot process work with BIOS (legacy)?

A

BIOS loads and begins with the

  • Power-On Self Test (POST): relevant system devices are initialised and prepared for operation
  • BIOS searches for a Boot Record on the available disks and executes the first occurrence (= master boot record MBR)
  • Boot loader may provide a selection menu to allow booting of different operating systems (select an entry)
  • boot loader searches for the kernel
  • load kernel; kernel takes over the devices initialised by the BIOS and may re-initialise them
  • kernel hands over the further boot process to /sbin/init
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is UEFI? What does it do?

A

On modern computers, UEFI has replaced and superseded the BIOS. Instead of just a simple rewrite, UEFI provides sort of a mini operating system itself. Thus, it has knowledge about partitions and can even be extended using drivers

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

How does the boot process work with UEFI?

A

Instead of loading the MBR, UEFI is loaded, scans its configuration partition for configured operating systems and executes either the default or the user’s choice. Then, control is transferred to the Boot Loader.

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

Who is traditionally responsible for hardware detection and setup of all devices?

A

The Kernel

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

What’s the problem if the kernel is responsible for hardware detection and setup of all devices?

A

Because there are so many devices out there, the kernel provided by a Linux distributor is usually very generic. Thus, the kernel would become very big in terms of memory footprint.

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

What’s the solution for not overloading the kernel with hardware detection stuff?

A

The solution is to load only a very small system into memory, which is then responsible for hardware detection and preparation of devices and disks. This initial RamDisk (initrd) can be configured very specifically to the host computer. Afterwards, control over the system is handed over to /sbin/init.

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

What is LILO?

A

LILO (LInux LOader) is one of the oldest boot loaders. It used to be the standard for Linux systems. Its major drawback is the necessity to reinstall the bootloader in order to change the configuration.

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

What is GRUB?

A

GRUB (GRand Unified Bootloader) is the boot loader used on most distributions nowadays. It is modular, generic and highly configurable.

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

Which boot Manager uses Windows?

A

NTLDR or Windows Boot Manager

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

Which boot Manager uses Mac?

A

Boot Camp

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

What’s the most popular boot loader for embedded Linux devices, such as Routers or smart phones?

A

das U-Boot

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

Name some smaller boot loaders

A

Smart Boot Manager, XOSL, RedBoot or CFE.

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

What does the init process do?

A

Once the kernel has booted, the init process is responsible for bringing up the system. This includes starting of services, configuration of network interfaces, initialisation of further devices and finally presenting a login prompt.

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

How and by whom is the init process invoked?

A

It is invoked by the kernel as /sbin/init.

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

What’s the process ID of the init process?

A

Init’s process ID is usually 1, it is the parent process of all other processes running on the system.

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

What happens if the init process dies?

A

When the init process dies, the system is halted.

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

What is upstart?

A

Ubuntu does not use the traditional “init” system, consisting of scripts and symbolic links. Instead, it relies on “upstart” and “systemd”, which allow better handling of dependencies between startup scripts. upstart and systemd support asynchronous starting of services, whilst being compatible with the traditional “init” system.

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

What are daemons?

A

Programs running in the background are often called “daemons”. In the background means that the program is completely detached from the terminal. All relevant system services are implemented as daemons.

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

What does it mean if a program is not connected to the terminal.

A

The standard file descriptors stdin, stdout and stderr are NOT connected to the terminal. They may, however, be redirected to a log file.

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

What is Apache Daemon?

A

One of the most populare web servers

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

What is SSH Daemon?

A

Provides remote login capabilities

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

What is udevd?

A

Responsible for device configuration

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

What is syslogd?

A

Centralised log file storage

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

What is crond?

A

Runs programs at a specified time

27
Q

Why is communicating with a daemon tricky? How is this problem solved?

A

As they have no standard input/outputs connected, most daemons are configured using a configuration file. Using init scripts or upstart jobs (Ubuntu), daemons can be started, stopped or restarted.

28
Q

What’s a PID?

A

unique process ID (each process has one) If you start a process several times, it gets assigned several, different PIDs.

29
Q

Which process gets PID 1 assigned?

A

/sbin/init

30
Q

How can I login more than once or start several sessions in parallel?

A

By using virtual terminals

31
Q

What is a terminal multiplexer?

A

A software that let’s you switch virtual terminals. The program “screen” is such a software.

32
Q

Why is managing processes a very important task?

A

if a program has crashed and resides as a zombie process on the system, eating up ressources.

33
Q

What’s the difference between killing and terminating a process?

A

Kill (SIGKILL) = abrupt termination of the program, no cleanup

Terminate (SIGTERM) = starts a shutdown process, resulting in a clean exit

34
Q

How can you manage processes?

A

You can kill or terminate them. You can assign them a higher or lower priority

35
Q

What schedules which task gets assigned how much processing time (CPU time)?

A

operating system’s scheduler

36
Q

Which factors determine how much CPU time a process gets assigned?

A

Priority and Niceness level

37
Q

What is a Unix Signal?

A

A signal is a special notification that can be sent to any running process. The process itself can then decide what to do with the signal, except for the “kill” signal.

38
Q

What does the SIGHUP signal do?

A

“hangup” signal (SIGHUP), which makes several programs reload their configuration file.

39
Q

What does the key combination Ctrl + C do?

A

Sends SIGINT (“interrupt”) (from keyboard) to the process.

40
Q

How can you specify which process should be killed?

A

Either by name (for killall) or by PID (for kill)

41
Q

What does FHS stand for?

A

Filesystem Hierarchy Standard

42
Q

What is FHS?

A

A convention established by the Linux Foundation between various Linux distributions to standardise certain filesystem locations. Usually, it is present on every Linux distribution and makes it thus easier to move from one distribution to another.

43
Q

What are the advantages of FHS for programs?

A

Programs have the advantage that they can assume where configuration files or their binaries are probably located on the filesystem, no matter what distribution they are running on.

44
Q

What are the advantages of FHS for system administrators?

A

System administrators have the advantage that they have standard locations to look for configuration files or in the case of problems.

45
Q

What does /bin contain?

A

Contains binaries (programs) used for running the system

46
Q

What does /boot contain?

A

Contains static files used by the bootloader

47
Q

What does /dev contain?

A

Contains the various devices of the system

48
Q

What does /etc contain?

A

Contais configuration files (et ceterea = everything else)

49
Q

What does /lib contain?

A

Contains static libraries and kernel modules

50
Q

What does /media contain?

A

Contains subdirectories with mounted external media drives

51
Q

What does /mnt contain?

A

Used for temporarily mounting devices

52
Q

What does /opt contain?

A

Contains optional files and programs

53
Q

What does /sbin contain?

A

Contains further, important system binaries

54
Q

What does /tmp contain?

A

Contains temporary files and folders

55
Q

What does /usr contain?

A

Contains user installed programs

56
Q

What does /var contain?

A

Contains variable data, such as websites

57
Q

What are Pseudo Filesystems?

A

Pseudo Filesystems are special directories which are not physically present on the disk. Instead, they are presented by the kernel.

58
Q

What are Pseudo Filesystems used for?

A
  • Configuring the kernel
  • Accessing devices
  • Reading parameters
  • Accessing running processes
59
Q

What is the difference between block and character devices?

A

While block devices allow random access on the whole device and offer buffered writes, character devices can often only be read and written to sequentially. Their access is not buffered.

60
Q

What is an example for a block device?

A

hard disks or memory keys

61
Q

What is an example for a character device?

A

USB devices

62
Q

Which pseudo filesystem is to be looked at, if you want to manipulate or inspect processes?

A

/proc

63
Q

Where do you find information about the CPU?

A

/proc/cpuinfo

64
Q

Where do you find information about the memory?

A

/proc/meminfo