EC2 Alma 9.2が以前のカーネルバージョンでハングする

EC2 Alma 9.2が以前のカーネルバージョンでハングする
# the issue:
dnf check-update
Last metadata expiration check: 1:35:58 ago on Sun Jun  4 10:26:18 2023.
Security: kernel-core-5.14.0-284.11.1.el9_2.aarch64 is an installed security update
Security: kernel-core-5.14.0-162.6.1.el9_1.aarch64 is the currently running version

# double check:
uname -r
5.14.0-162.6.1.el9_1.aarch64

# only reboot is not fixing it:
uptime
12:01:37 up 0 min,  1 user,  load average: 0.34, 0.10, 0.04

# the cfg is up to date:
grub2-mkconfig > test.cfg 2>/dev/null
diff test.cfg /boot/grub2/grub.cfg

# and manually it looks fine:
. /usr/share/grub/grub-mkconfig_lib 
version_find_latest $(ls -1 /boot/vmlinuz-*)
/boot/vmlinuz-5.14.0-284.11.1.el9_2.aarch64

# maybe these efi boot logs are related:
grep -Pi "efi\b" /var/log/messages | tail -n 6
Jun  4 12:00:59 amazon4 systemd[1]: Condition check resulted in Amazon Elastic Block Store EFI\x20System\x20Partition being skipped.
Jun  4 12:00:59 amazon4 systemd[1]: Mounting /boot/efi...
Jun  4 12:00:59 amazon4 systemd[1]: Mounted /boot/efi.
Jun  4 12:00:59 amazon4 systemd[1]: Store a System Token in an EFI Variable was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/LoaderFeatures-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f).
Jun  4 12:00:59 amazon4 systemd[1]: TPM2 PCR Barrier (Initialization) was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f).
Jun  4 12:00:59 amazon4 systemd[1]: TPM2 PCR Barrier (User) was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f).

efi以外の仮想マシンにはこの問題はありません。

grub/efi に最新のカーネルを使用するように指示するにはどうすればよいですか?

編集01:

ありがとう、Svižný_Svišťに感謝します

grubby --info=ALL
grub2-reboot 1

インストールされているコンテンツを一覧表示します。

dnf list --installed | grep "kernel-core"
kernel-core.aarch64                5.14.0-162.6.1.el9_1               @baseos   
kernel-core.aarch64                5.14.0-284.11.1.el9_2              @baseos   
kernel-core.aarch64                5.14.0-284.18.1.el9_2              @baseos

私はこれを削除しました:

dnf remove kernel-core-5.14.0-162.6.1.el9_1

しかし、Grubbyがまだそれをリストしたので修正しました。

grubby --remove-kernel=/boot/vmlinuz-5.14.0-162.6.1.el9_1.aarch64

ベストアンサー1

kernel-core-5.14.0-284.11.1.el9_2.x86_64今アップグレードするときにこの問題が発生しました。kernel-core-5.14.0-284.18.1.el9_2.x86_64

まだ解決策が見つかりませんでしたが、GRUBに対して「次回のブートのみ」デフォルトのブートエントリを設定すると、必要なカーネルがロードされることがわかりました。

$ sudo grubby --info=ALL | grep -E '^(kernel|index)'
index=0
kernel="/boot/vmlinuz-5.14.0-284.11.1.el9_2.x86_64"
index=1
kernel="/boot/vmlinuz-5.14.0-284.18.1.el9_2.x86_64"

$ sudo grub2-reboot 1   # index 1
$ sudo reboot

明らかに、これは最新のカーネルを一時的にのみロードするようです。電源を入れると前の状態に戻ります。問題を解決する意図ではありませんが、他の人に次にどこに行くべきかについてのアイデアを与えることができます。

おすすめ記事