Red Hat® Enterprise Linux® 8をdnf updateで最新状態にするとKernel versionが4.18.0-193.14.3.el8_2.x86_64になっていました。
これにTrendMicro Server Protect for Linuxを導入してKHMを探したら、まだ未対応でした。
ServerProtect for Linux 3 – Kernel Support
https://downloadcenter.trendmicro.com/index.php?clk=tbl&clkval=111®s=NABU&lang_loc=1#fragment-111
最新のKHMは2020-07-03: 4.18.0-193.6.3.el8-2.x86-64.x86-64でした。
そこでKernel 4.18.0-193.6.3.el8-2で導入することにしました。
環境
・Red Hat Enterprise Linux release 8.2 (Ootpa)
・Kernel 4.18.0-193.14.3.el8_2.x86_64
・Red Hat Developer Subscription
- 導入されているKernelの確認
- 利用できるKernelの確認
- Kernelバージョンを指定してインストール
- Kernelの確認
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
[root@rhel8 ~]# uname -r 4.18.0-193.14.3.el8_2.x86_64 [root@rhel8 ~]# grubby --default-kernel /boot/vmlinuz-4.18.0-193.14.3.el8_2.x86_64 [root@rhel8 ~]# grubby --default-index 0 [root@rhel8 ~]# grubby --info=ALL index=0 kernel="/boot/vmlinuz-4.18.0-193.14.3.el8_2.x86_64" args="ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet $tuned_params" root="/dev/mapper/rhel-root" initrd="/boot/initramfs-4.18.0-193.14.3.el8_2.x86_64.img $tuned_initrd" title="Red Hat Enterprise Linux (4.18.0-193.14.3.el8_2.x86_64) 8.2 (Ootpa)" id="944cec0837ff47a4b1e159478f766300-4.18.0-193.14.3.el8_2.x86_64" index=1 kernel="/boot/vmlinuz-4.18.0-80.7.2.el8_0.x86_64" args="ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet $tuned_params" root="/dev/mapper/rhel-root" initrd="/boot/initramfs-4.18.0-80.7.2.el8_0.x86_64.img $tuned_initrd" title="Red Hat Enterprise Linux (4.18.0-80.7.2.el8_0.x86_64) 8.0 (Ootpa)" id="944cec0837ff47a4b1e159478f766300-4.18.0-80.7.2.el8_0.x86_64" index=2 kernel="/boot/vmlinuz-4.18.0-80.el8.x86_64" args="ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet $tuned_params" root="/dev/mapper/rhel-root" initrd="/boot/initramfs-4.18.0-80.el8.x86_64.img $tuned_initrd" title="Red Hat Enterprise Linux (4.18.0-80.el8.x86_64) 8.0 (Ootpa)" id="944cec0837ff47a4b1e159478f766300-4.18.0-80.el8.x86_64" index=3 kernel="/boot/vmlinuz-0-rescue-944cec0837ff47a4b1e159478f766300" args="ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet" root="/dev/mapper/rhel-root" initrd="/boot/initramfs-0-rescue-944cec0837ff47a4b1e159478f766300.img" title="Red Hat Enterprise Linux (0-rescue-944cec0837ff47a4b1e159478f766300) 8.0 (Ootpa)" id="944cec0837ff47a4b1e159478f766300-0-rescue" |
システムで利用できるInstalled PackagesとAvailable Packagesが確認できます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
[root@rhel8 ~]# dnf --showduplicate list kernel* Updating Subscription Management repositories. Installed Packages kernel.x86_64 4.18.0-80.el8 @anaconda kernel.x86_64 4.18.0-80.7.2.el8_0 @rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-193.14.3.el8_2 @rhel-8-for-x86_64-baseos-rpms kernel-core.x86_64 4.18.0-80.el8 @anaconda kernel-core.x86_64 4.18.0-80.7.2.el8_0 @rhel-8-for-x86_64-baseos-rpms kernel-core.x86_64 4.18.0-193.14.3.el8_2 @rhel-8-for-x86_64-baseos-rpms kernel-devel.x86_64 4.18.0-193.14.3.el8_2 @rhel-8-for-x86_64-baseos-rpms kernel-headers.x86_64 4.18.0-193.14.3.el8_2 @rhel-8-for-x86_64-baseos-rpms kernel-modules.x86_64 4.18.0-80.el8 @anaconda kernel-modules.x86_64 4.18.0-80.7.2.el8_0 @rhel-8-for-x86_64-baseos-rpms kernel-modules.x86_64 4.18.0-193.14.3.el8_2 @rhel-8-for-x86_64-baseos-rpms kernel-tools.x86_64 4.18.0-193.14.3.el8_2 @rhel-8-for-x86_64-baseos-rpms kernel-tools-libs.x86_64 4.18.0-193.14.3.el8_2 @rhel-8-for-x86_64-baseos-rpms Available Packages kernel.x86_64 4.18.0-80.el8 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-80.1.2.el8_0 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-80.4.2.el8_0 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-80.7.1.el8_0 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-80.7.2.el8_0 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-80.11.1.el8_0 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-80.11.2.el8_0 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-147.el8 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-147.0.2.el8_1 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-147.0.3.el8_1 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-147.3.1.el8_1 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-147.5.1.el8_1 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-147.8.1.el8_1 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-193.el8 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-193.1.2.el8_2 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-193.6.3.el8_2 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-193.13.2.el8_2 rhel-8-for-x86_64-baseos-rpms kernel.x86_64 4.18.0-193.14.3.el8_2 rhel-8-for-x86_64-baseos-rpms (snip) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
[root@rhel8 ~]# dnf -y install kernel*-4.18.0-193.13.2.el8_2 Updating Subscription Management repositories. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: kernel x86_64 4.18.0-193.13.2.el8_2 rhel-8-for-x86_64-baseos-rpms 2.8 M (snip) Downgraded: kernel-headers-4.18.0-193.13.2.el8_2.x86_64 kernel-tools-4.18.0-193.13.2.el8_2.x86_64 kernel-tools-libs-4.18.0-193.13.2.el8_2.x86_64 Installed: kernel-4.18.0-193.13.2.el8_2.x86_64 kernel-abi-whitelists-4.18.0-193.13.2.el8_2.noarch kernel-core-4.18.0-193.13.2.el8_2.x86_64 kernel-cross-headers-4.18.0-193.13.2.el8_2.x86_64 kernel-debug-4.18.0-193.13.2.el8_2.x86_64 kernel-debug-core-4.18.0-193.13.2.el8_2.x86_64 kernel-debug-devel-4.18.0-193.13.2.el8_2.x86_64 kernel-debug-modules-4.18.0-193.13.2.el8_2.x86_64 kernel-debug-modules-extra-4.18.0-193.13.2.el8_2.x86_64 kernel-devel-4.18.0-193.13.2.el8_2.x86_64 kernel-doc-4.18.0-193.13.2.el8_2.noarch kernel-modules-4.18.0-193.13.2.el8_2.x86_64 kernel-modules-extra-4.18.0-193.13.2.el8_2.x86_64 kernel-tools-libs-devel-4.18.0-193.13.2.el8_2.x86_64 Removed: kernel-4.18.0-80.el8.x86_64 kernel-core-4.18.0-80.el8.x86_64 kernel-modules-4.18.0-80.el8.x86_64 Complete! |
kernel-4.18.0-80.el8.x86_64関連が削除されています。
起動するKernelバージョンが/boot/vmlinuz-4.18.0-193.13.2.el8_2.x86_64がdefaultになりました。
これは/etc/sysconfig/kernelの指定に基づいて
・新しいKernelをDefauldにする
・Kernel タイプはkernel-core
1 2 3 4 5 6 7 |
[root@rhel8 ~]# cat /etc/sysconfig/kernel # UPDATEDEFAULT specifies if new-kernel-pkg should make # new kernels the default UPDATEDEFAULT=yes # DEFAULTKERNEL specifies the default kernel package type DEFAULTKERNEL=kernel-core |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
[root@rhel8 ~]# grubby --default-kernel /boot/vmlinuz-4.18.0-193.13.2.el8_2.x86_64 [root@rhel8 ~]# grubby --default-index 2 [root@rhel8 ~]# grubby --info ALL | grep id id="944cec0837ff47a4b1e159478f766300-4.18.0-193.14.3.el8_2.x86_64" id="944cec0837ff47a4b1e159478f766300-4.18.0-193.13.2.el8_2.x86_64+debug" id="944cec0837ff47a4b1e159478f766300-4.18.0-193.13.2.el8_2.x86_64" id="944cec0837ff47a4b1e159478f766300-4.18.0-80.7.2.el8_0.x86_64" id="944cec0837ff47a4b1e159478f766300-0-rescue" [root@rhel8 ~]# grubby --info ALL index=0 kernel="/boot/vmlinuz-4.18.0-193.14.3.el8_2.x86_64" args="ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet $tuned_params" root="/dev/mapper/rhel-root" initrd="/boot/initramfs-4.18.0-193.14.3.el8_2.x86_64.img $tuned_initrd" title="Red Hat Enterprise Linux (4.18.0-193.14.3.el8_2.x86_64) 8.2 (Ootpa)" id="944cec0837ff47a4b1e159478f766300-4.18.0-193.14.3.el8_2.x86_64" index=1 kernel="/boot/vmlinuz-4.18.0-193.13.2.el8_2.x86_64+debug" args="ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet $tuned_params" root="/dev/mapper/rhel-root" initrd="/boot/initramfs-4.18.0-193.13.2.el8_2.x86_64+debug.img $tuned_initrd" title="Red Hat Enterprise Linux (4.18.0-193.13.2.el8_2.x86_64+debug) 8.2 (Ootpa)" id="944cec0837ff47a4b1e159478f766300-4.18.0-193.13.2.el8_2.x86_64+debug" index=2 kernel="/boot/vmlinuz-4.18.0-193.13.2.el8_2.x86_64" args="ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet $tuned_params" root="/dev/mapper/rhel-root" initrd="/boot/initramfs-4.18.0-193.13.2.el8_2.x86_64.img $tuned_initrd" title="Red Hat Enterprise Linux (4.18.0-193.13.2.el8_2.x86_64) 8.2 (Ootpa)" id="944cec0837ff47a4b1e159478f766300-4.18.0-193.13.2.el8_2.x86_64" index=3 kernel="/boot/vmlinuz-4.18.0-80.7.2.el8_0.x86_64" args="ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet $tuned_params" root="/dev/mapper/rhel-root" initrd="/boot/initramfs-4.18.0-80.7.2.el8_0.x86_64.img $tuned_initrd" title="Red Hat Enterprise Linux (4.18.0-80.7.2.el8_0.x86_64) 8.0 (Ootpa)" id="944cec0837ff47a4b1e159478f766300-4.18.0-80.7.2.el8_0.x86_64" index=4 kernel="/boot/vmlinuz-0-rescue-944cec0837ff47a4b1e159478f766300" args="ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet" root="/dev/mapper/rhel-root" initrd="/boot/initramfs-0-rescue-944cec0837ff47a4b1e159478f766300.img" title="Red Hat Enterprise Linux (0-rescue-944cec0837ff47a4b1e159478f766300) 8.0 (Ootpa)" id="944cec0837ff47a4b1e159478f766300-0-rescue" |
26.4. GRUBBY ツールを使用した GRUB 2 メニューの永続的な変更
https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/7/html/system_administrators_guide/sec-making_persistent_changes_to_a_grub_2_menu_using_the_grubby_tool