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/labs/systems_administration_I/lab7-software_management.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -796,7 +796,17 @@ After installing relevant packages, in some cases, we need to determine whether
796
796
797
797
Using the "-V" option of the `rpm` command.
798
798
799
-
Take the time synchronization program chrony as an example to illustrate the meaning of its output. It is assumed that you have installed chrony and modified the configuration file (/etc/chrony.conf)
799
+
Take the time synchronization program `chrony`` as an example to illustrate the meaning of its output.
800
+
801
+
802
+
1. To demonstrate how the `rpm` package verification works, make a modififcation to chrony's
803
+
configuration file - `/etc/chrony.conf`. (It is assumed that you have installed chrony). Add 2 harmless comment `##` symbols to the end of the file. Type:
804
+
805
+
```
806
+
$ echo -e "##" | sudo tee -a /etc/chrony.conf
807
+
```
808
+
809
+
2. Now run the `rpm` command with the `--verify` option. Type:
11. Launch the graphical kernel configuration utility. Type:
282
281
283
282
```bash
284
-
[root@localhost ~]# make O=~/build/kernel menuconfig
283
+
$ make O=~/build/kernel menuconfig
285
284
```
286
285
A screen similar to this will appear:
287
286
@@ -329,37 +328,51 @@ In this exercise you will build a new kernel from source, by configuring, compil
329
328
330
329
18. Let's optimize the kernel build time and also reduce the amount of disk space used during the kernel compile stage by setting. By setting `CONFIG_DEBUG_INFO=no`, the resulting kernel image will NOT include debugging info thereby resulting in a smaller kernel image. This removes debugging symbols from the built kernel and modules. Type:
331
330
332
-
```bash
333
-
# sed -ri '/CONFIG_DEBUG_INFO/s/=.+/="no"/g' ~/build/kernel/.config
19. Complete another important step for custom Kernels on Rocky Linux distro. Type:
337
338
338
339
339
340
```bash
340
-
[root@localhost linux-6*]# sed -ri '/CONFIG_SYSTEM_TRUSTED_KEYS/s/=.+/=""/g' ~/build/kernel/.config
341
+
$ sed -ri '/CONFIG_SYSTEM_TRUSTED_KEYS/s/=.+/=""/g' ~/build/kernel/.config
341
342
```
342
343
343
344
20. Add a simple customization to the new kernel, allowing you to distinguish it from the other stock Kernels more easily. For this, use the `sed` utility to edit the Makefile in place. Type:
344
345
345
346
```bash
346
-
[root@localhost linux-6.*]# sed -i 's/^EXTRAVERSION.*/EXTRAVERSION = -custom/' Makefile
347
+
$ sed -i 's/^EXTRAVERSION.*/EXTRAVERSION = -custom/' Makefile
347
348
```
348
349
349
350
21. Verify the full version of the kernel that you just customized by passing the `kernelversion` target to the `make` command. Type:
350
351
351
352
```bash
352
-
[root@localhost ~]# make O=~/build/kernel kernelversion
28. The `kernel-install` utility will create a new boot entry in the boot loader configuration file. For EFI based systems you can look under /boot/loader/entries/ for matching entries.
417
+
418
+
29. Run the grubby program to view the default kernel for the server. Type:
419
+
420
+
```
421
+
$ sudo grubby --default-kernel
422
+
```
404
423
405
-
29. All done. Moment of truth now. You can reboot your system and select the new custom Kernel in the GRUB boot menu.
424
+
30. All done. Moment of truth now. The latest kernel will likely be configured as the new
425
+
default kernel to boot into. If you have access to the system's console you can reboot your system and selectthe new custom Kernel in the GRUB boot menu.
406
426
If all goes well after the reboot, you can verify that system is running the custom kernel by running the `uname`command like this:
0 commit comments