linuxの本質. kernelとほかGNUアプリの集合体で各種ディストリが用意されている.

本家様 https://kernel.org/

各ディストリビューターがどのバージョンのkernelを採用したかは https://distrowatch.com/?language=JP を参照かな.

ここではRHEL系のRockyLinux9/8, CentOS7をメインにubutunも扱ってます. ubuntuは初歩の初歩だけど

各種LinuxOSに搭載されている kernel を丸ごと切り替えることは可能です. 参照 linuxカーネル再構築
またELRepoのようにyum/dnfで最新OSへ切り替えることも可能です

その恩恵として動作が早くなることが多いです. 計算が早くなるとは断言できませんけど

だが、ソースからの更新/yum/dnfでの更新ともそれを行うとそのディストリビューターのサポートから外れます.
もともと保証なんてないって思いますが、質問が出来なくなる事にご留意ください.

ELRepoでRockyLinux9のkernelを更新してみる

使うのは ELRepo の kernel-ml(mainline stable)版
ELRepoのリポジトリを組み込めば更新できる

[root@rockylinux9 ~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
[root@rockylinux9 ~]# dnf install https://www.elrepo.org/elrepo-release-9.el9.elrepo.noarch.rpm -y

現在導入されているkernelの確認

[root@rockylinux9 ~]# dnf list installed |grep "^kernel"
kernel.x86_64                                    5.14.0-162.23.1.el9_1            @baseos
kernel-core.x86_64                               5.14.0-162.23.1.el9_1            @baseos
kernel-devel.x86_64                              5.14.0-162.23.1.el9_1            @appstream
kernel-devel-matched.x86_64                      5.14.0-162.23.1.el9_1            @appstream
kernel-headers.x86_64                            5.14.0-162.23.1.el9_1            @appstream
kernel-modules.x86_64                            5.14.0-162.23.1.el9_1            @baseos
kernel-srpm-macros.noarch                        1.0-11.el9                       @AppStream
kernel-tools.x86_64                              5.14.0-162.23.1.el9_1            @baseos
kernel-tools-libs.x86_64                         5.14.0-162.23.1.el9_1            @baseos
[root@rockylinux9 ~]#

一応dkmsでnvidiaドライバーが入っている

[root@rockylinux9 ~]# dkms status
nvidia/525.105.17, 5.14.0-162.23.1.el9_1.x86_64, x86_64: installed (original_module exists)
[root@rockylinux9 ~]#

この状態でELRepo のカーネルを入れてみる

[root@rockylinux9 ~]# dnf --enablerepo=elrepo-kernel install kernel-ml         kernel-ml-devel
[root@rockylinux9 ~]# dnf --enablerepo=elrepo-kernel swap    kernel-tools-libs kernel-ml-tools-libs
[root@rockylinux9 ~]# reboot

再起動後,

[root@rockylinux9 ~]# uname -r
6.2.11-1.el9.elrepo.x86_64
 
[root@rockylinux9 ~]# dkms status
nvidia/525.105.17, 5.14.0-162.23.1.el9_1.x86_64, x86_64: installed (original_module exists)
nvidia/525.105.17, 6.2.11-1.el9.elrepo.x86_64, x86_64: installed
 
[root@rockylinux9 ~]#

新しいkernelにもnvidiaドライバーが継承された模様

不要なkernelの削除

参照 https://www.centlinux.com/2022/10/safely-remove-old-kernels-in-rocky-linux-9.html


トップ   編集 添付 複製 名前変更     ヘルプ   最終更新のRSS
Last-modified: 2023-04-16 (日) 13:23:27 (54d)