You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/books/admin_guide/10-boot.md
+32-32Lines changed: 32 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,27 +25,27 @@ In this chapter, you will learn how the system starts.
25
25
26
26
## The boot process
27
27
28
-
It is important to understand the boot process of Linux to be able to solve problems that might occur.
28
+
It is essential to understand the boot process of Linux to solve problems that might occur.
29
29
30
30
The boot process includes:
31
31
32
32
### The BIOS startup
33
33
34
-
The **BIOS** (Basic Input/Output System) performs the **POST** (power on self-test) to detect, test and initialize the system hardware components.
34
+
The **BIOS** (Basic Input/Output System) performs the **POST** (power on self-test) to detect, test, and initialize the system hardware components.
35
35
36
36
It then loads the **MBR** (Master Boot Record).
37
37
38
38
### The Master boot record (MBR)
39
39
40
-
The Master Boot Record is the first 512 bytes of the boot disk. The MBR discovers the boot device and loads the bootloader **GRUB2** into memory and transfers control to it.
40
+
The Master Boot Record is the first 512 bytes of the boot disk. The MBR discovers the boot device, loads the bootloader **GRUB2** into memory, and transfers control to it.
41
41
42
42
The next 64 bytes contain the partition table of the disk.
43
43
44
44
### The GRUB2 bootloader
45
45
46
-
The default bootloader for the Rocky 8 distribution is **GRUB2** (GRand Unified Bootloader). GRUB2 replaces the old GRUB bootloader (also called GRUB legacy).
46
+
The Rocky 8 distribution's default bootloader is **GRUB2** (GRand Unified Bootloader). GRUB2 replaces the old GRUB bootloader (also called GRUB legacy).
47
47
48
-
The GRUB 2 configuration file is located under `/boot/grub2/grub.cfg` but this file should not be edited directly.
48
+
The GRUB 2 configuration file is located under `/boot/grub2/grub.cfg`, but this file should not be edited directly.
49
49
50
50
The GRUB2 menu configuration settings are located under `/etc/default/grub` and are used to generate the `grub.cfg` file.
1. Prevent *Single* user mode access - If an attacker can boot into single user mode, he becomes the root user.
99
-
2. Prevent access to GRUB console - If an attacker manages to use GRUB console, he can change its configuration or collect information about the system by using the `cat` command.
100
-
3. Prevent access to insecure operating systems. If there is a dual boot on the system, an attacker can select an operating system like DOS at boot time that ignores access controls and file permissions.
99
+
2. Prevent access to GRUB console - If an attacker manages to use the GRUB console, he can change its configuration or collect information about the system by using the `cat` command.
100
+
3. Prevent access to insecure operating systems. If the system has dual boot, an attacker can select an operating system like DOS at boot time that ignores access controls and file permissions.
101
101
102
-
To passwordprotect the GRUB2 bootloader:
102
+
To password-protect the GRUB2 bootloader:
103
103
104
104
1. Log in to the operating system as root user and execute the `grub2-mkpasswd-pbkdf2` command. The output of this command is as follows:
105
105
@@ -131,9 +131,9 @@ To password protect the GRUB2 bootloader:
131
131
EOF
132
132
```
133
133
134
-
3. The final step is to execute the command`grub2-mkconfig -o /boot/grub2/grub.cfg` to update the settings of GRUB2.
134
+
3. The final step is to execute the command`grub2-mkconfig -o /boot/grub2/grub.cfg` to update GRUB2's settings.
135
135
136
-
4. Restart the operating system to verify the encryption of GRUB2. Select the first boot menu item andtype the ++"e"++ key, and then enter the corresponding user and password.
136
+
4. Restart the operating system to verify GRUB2's encryption. Select the first boot menu item,type the ++"e"++ key, and then enter the corresponding user and password.
137
137
138
138
```bash
139
139
Enter username:
@@ -144,12 +144,12 @@ To password protect the GRUB2 bootloader:
144
144
145
145
After successful verification, enter ++ctrl+"x"++ to start the operating system.
146
146
147
-
Sometimes you may see in some documents that the `grub2-set-password` (`grub2-setpassword`) command is used to protect the GRUB2 bootloader:
147
+
Sometimes, you may see in some documents that the `grub2-set-password` (`grub2-setpassword`) command is used to protect the GRUB2 bootloader:
Log in to the operating system as the root user and execute the `gurb2-set-password`command as follows:
155
155
@@ -200,23 +200,23 @@ The development of `systemd` was to:
200
200
201
201
!!! Note
202
202
203
-
There are many types of units: Device unit, Mount unit, Path unit, Scope unit, Slice unit, Snapshot unit, Socket unit, Swap unit, Timer unit.
203
+
There are many types of units: Device unit, Mount unit, Path unit, Scope unit, Slice unit, Snapshot unit, Socket unit, Swap unit, and Timer unit.
204
204
205
205
*`systemd` supports system state snapshots and restore.
206
206
207
207
* You can configure mount points as `systemd` targets.
208
208
209
-
* At startup, `systemd` creates listening sockets for all system services that support this type of activation and passes these sockets to these services as soon as they start. This makes it possible to restart a service without losing a single message sent to it by the network during its unavailability. The corresponding socket remains accessible all messages queue up.
209
+
* At startup, `systemd` creates listening sockets for all system services that support this type of activation and passes these sockets to these services as soon as they start. This makes it possible to restart a service without losing a single message sent to it by the network during its unavailability. The corresponding socket remains accessible whileall messages queue up.
210
210
211
-
* System services that use D-BUS fortheir inter-process communications can start on-demand the first time the client uses them.
211
+
* System services that use D-BUS for inter-process communications can start on-demand the first time the client uses them.
212
212
213
213
*`systemd` stops or restarts only running services. Previous versions (before RHEL7) attempted to stop services directly without checking their current status.
214
214
215
-
* System services do not inherit any context (like HOME and PATH environment variables). Each service operates in its own execution context.
215
+
* System services do not inherit any context (like HOME and PATH environment variables). Each service operates in its execution context.
216
216
217
-
All service unit operations are subject to a default timeout of 5 minutes to prevent a malfunctioning service from freezing the system.
217
+
All service unit operations are subject to a 5-minute default timeout to prevent a malfunctioning service from freezing the system.
218
218
219
-
Due to space limitations, this document will not provide a very detailed introduction to `systemd`. If you have an interest in exploring `systemd` further, there is a very detailed introduction in [this document](./16-about-sytemd.md),
219
+
Due to space limitations, this document will not provide a detailed introduction to `systemd`. If you are interested in exploring `systemd` further, there is a very detailed introduction in [this document](./16-about-sytemd.md).
220
220
221
221
### Managing system services
222
222
@@ -232,7 +232,7 @@ Service units end with the `.service` file extension and have a similar purpose
232
232
| systemctl try-restart *name*.service | Restarts a service only if it is running |
233
233
| systemctl list-units --type service --all | Displays the status of all services |
234
234
235
-
The `systemctl`command is also used for the `enable` or `disable` of system a service and displaying associated services:
235
+
The `systemctl`command is also used for the `enable` or `disable` of a system service and displaying associated services:
`systemd` targets replace the concept of run levels on Rocky8/RHEL8.
298
298
299
-
The representation of `systemd` targets is by target units. Target units end with the `.target` file extension and their sole purpose is to group other `systemd` units into a chain of dependencies.
299
+
The representation of `systemd` targets is by target units. Target units end with the `.target` file extension, and their sole purpose is to group other `systemd` units into a chain of dependencies.
300
300
301
-
For example, the `graphical.target` unit that starts a graphical session, starts system services such as the **GNOME display manager** (`gdm.service`) or the **accounts service** (`accounts-daemon.service`) and also activates the `multi-user.target` unit.
301
+
For example, the `graphical.target` unit that starts a graphical session starts system services such as the **GNOME display manager** (`gdm.service`) or the **accounts service** (`accounts-daemon.service`) and also activates the `multi-user.target` unit.
302
302
303
303
Similarly, the `multi-user.target` unit starts other essential system services, such as **NetworkManager** (`NetworkManager.service`) or **D-Bus** (`dbus.service`) and activates another target unit named `basic.target`.
| poweroff.target | Shuts down the system and turns it off |
308
308
| rescue.target | Activates a rescue shell |
309
-
| multi-user.target | Activates a multi-user system without graphical interface |
310
-
| graphical.target | Activates a multi-user system with graphical interface |
309
+
| multi-user.target | Activates a multi-user system without a graphical interface |
310
+
| graphical.target | Activates a multi-user system with a graphical interface |
311
311
| reboot.target | Shuts down and restarts the system |
312
312
313
313
#### The default target
@@ -371,9 +371,9 @@ To switch to a different target unit in the current session:
371
371
systemctl isolate name.target
372
372
```
373
373
374
-
The **Rescue mode** provides a simple environment to repair your system in cases where it is impossible to perform a normal boot process.
374
+
The **Rescue mode** provides a simple environment forrepairing your systemin cases where a normal boot process is impossible.
375
375
376
-
In `rescue mode`, the system attempts to mount all local file systems and start several important system services, but does not enable a network interface or allow other users to connect to the system at the same time.
376
+
In `rescue mode,` the system attempts to mount all local file systems and start several important system services but does not enable a network interface or allow other users to connect to the system simultaneously.
377
377
378
378
On Rocky 8, the `rescue mode` is equivalent to the old `single user mode` and requires the root password.
379
379
@@ -383,15 +383,15 @@ To change the current target and enter `rescue mode` in the current session:
383
383
systemctl rescue
384
384
```
385
385
386
-
**Emergency mode** provides the most minimalist environment possible and allows the repairing of the system even in situations where the system is unable to enter rescue mode. In the emergency mode, the system mounts the root file system only for reading. It will not attempt to mount any other local file system, will not activate any network interface, and will start some essential services.
386
+
**Emergency mode** provides the most minimalist environment possible and allows the system to be repaired even in situations where it is unable to enter rescue mode. In emergency mode, the system mounts the root file system only for reading. It will not attempt to mount any other local file system, will not activate any network interface, and will start some essential services.
387
387
388
388
To change the current target and enter emergency mode in the current session:
389
389
390
390
```bash
391
391
systemctl emergency
392
392
```
393
393
394
-
#### Shutdown, suspension and hibernation
394
+
#### Shutdown, suspension, and hibernation
395
395
396
396
The `systemctl`command replaces many power management commands used in previous versions:
397
397
@@ -406,11 +406,11 @@ The `systemctl` command replaces many power management commands used in previous
406
406
407
407
### The `journald` process
408
408
409
-
You can manage log files can, in addition to `rsyslogd`, with the `journald` daemon that is a component of `systemd`.
409
+
You can manage log files with the `journald` daemon, a component of `systemd'in addition to ' rsyslogd`.
410
410
411
-
The `journald` daemon captures Syslog messages, kernel log messages, messages from the initial RAM disk and from the start of boot, and messages written to the standard output and the standard error output of all services, then indexes them and makes them available to the user.
411
+
The `journald` daemon captures Syslog messages, kernel log messages, messages from the initial RAM disk and the start of boot, and messages written to the standard output and the standard error output of all services, then indexes them and makes them available to the user.
412
412
413
-
The format of the native log file, which is a structured and indexed binary file, improves searches and allows for faster operation, it also stores metadata information, such as timestamps or user IDs.
413
+
The native log file's format, which is a structured and indexed binary file, improves searches and allows for faster operation. It also stores metadata information, such as timestamps or user IDs.
0 commit comments