linux-6.4.10 の AlmaLinux 9.2 へのインストール

linux-6.4.10 の AlmaLinux 9.2へのインストールログです.複数のトラブルが発生します.

sudo su -
dnf -y update
dnf -y install make gcc flex bison openssl-devel elfutils-libelf-devel
cd /usr/src
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.4.10.tar.xz
tar xfJ linux-6.4.10.tar.xz
cd linux-6.4.10
cp /boot/config-5.14.0-284.25.1.el9_2.x86_64 .config
make oldconfig

make oldconfig の質問への回答は,結局 Enter を連打することになると思います.

もし
bash: make: command not found...
Install package 'make' to provide command 'make'? [N/y]
と、表示されたら
dnf -y install make
を忘れています。

もし
HOSTCC scripts/basic/fixdep
/bin/sh: line 1: gcc: command not found
make[1]: *** [scripts/Makefile.host:114: scripts/basic/fixdep] Error 127
make: *** [Makefile:628: scripts_basic] Error 2
と、表示されたら
dnf -y install gcc
を忘れています。

もし
LEX scripts/kconfig/lexer.lex.c
/bin/sh: line 1: flex: command not found
make[1]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127
make: *** [Makefile:692: oldconfig] Error 2

と、表示されたら
dnf -y install flex
を忘れています。

もし
YACC scripts/kconfig/parser.tab.[ch]
/bin/sh: line 1: bison: command not found
make[1]: *** [scripts/Makefile.host:17: scripts/kconfig/parser.tab.h] Error 127
make: *** [Makefile:692: oldconfig] Error 2
と表示されたら
dnf -y install bison
を忘れています。

cp .config .config.bak
vi .config

vi .config は以下の2カ所の修正をする

8238行目
CONFIG_SYSTEM_TRUSTED_KEYS="certs/rhel.pem"

CONFIG_SYSTEM_TRUSTED_KEYS=""

8450行目
CONFIG_DEBUG_INFO_BTF=y

CONFIG_DEBUG_INFO_BTF=n

make -j8 bzImage modules

もし
HOSTCC scripts/sign-file
scripts/sign-file.c:25:10: fatal error: openssl/opensslv.h: No such file or directory
25 | #include <openssl/opensslv.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:114: scripts/sign-file] Error 1
make: *** [Makefile:1271: scripts] Error 2
となってしまったら,
dnf -y install openssl-devel
を忘れています.

もし
DESCEND objtool
<stdin>:1:10: fatal error: libelf.h: No such file or directory
compilation terminated.
INSTALL libsubcmd_headers
CC /usr/src/linux-6.4.10/tools/objtool/arch/x86/special.o
In file included from /usr/src/linux-6.4.10/tools/objtool/include/objtool/objtool.h:13,
from /usr/src/linux-6.4.10/tools/objtool/include/objtool/arch.h:11,
from /usr/src/linux-6.4.10/tools/objtool/include/objtool/check.h:11,
from /usr/src/linux-6.4.10/tools/objtool/include/objtool/special.h:10,
from arch/x86/special.c:4:
/usr/src/linux-6.4.10/tools/objtool/include/objtool/elf.h:10:10: fatal error: gelf.h: No such file or directory
10 | #include <gelf.h>
| ^~~~~~~~
compilation terminated.
make[4]: *** [/usr/src/linux-6.4.10/tools/build/Makefile.build:98: /usr/src/linux-6.4.10/tools/objtool/arch/x86/special.o] Error 1
make[3]: *** [/usr/src/linux-6.4.10/tools/build/Makefile.build:140: arch/x86] Error 2
make[2]: *** [Makefile:66: /usr/src/linux-6.4.10/tools/objtool/objtool-in.o] Error 2
make[1]: *** [Makefile:73: objtool] Error 2
make: *** [Makefile:1440: tools/objtool] Error 2

となってしまったら,
dnf -y install elfutils-libelf-devel
を忘れています.

もし
INSTALL libsubcmd_headers
make[2]: *** No rule to make target 'certs/rhel.pem', needed by 'certs/x509_certificate_list'. Stop.
make[1]: *** [scripts/Makefile.build:497: certs] Error 2
make: *** [Makefile:2032: .] Error 2
となってしまったら,
vi .config 

8238行目
CONFIG_SYSTEM_TRUSTED_KEYS="certs/rhel.pem"

CONFIG_SYSTEM_TRUSTED_KEYS=""

を忘れています.

もし
BTF: .tmp_vmlinux.btf: pahole (pahole) is not available
Failed to generate BTF for vmlinux
Try to disable CONFIG_DEBUG_INFO_BTF
make[1]: *** [scripts/Makefile.vmlinux:36: vmlinux] Error 1
make: *** [Makefile:1250: vmlinux] Error 2

となってしまったら,
vi .config

8450行目
CONFIG_DEBUG_INFO_BTF=y

CONFIG_DEBUG_INFO_BTF=n

を忘れています.

make modules_install install

#linux
#カーネル
#kernel
#Alma
#AlmaLinux
#AlmaLinux9
#AlmaLinux9_2
#linux6
#linux6_4


この記事が気に入ったらサポートをしてみませんか?