I see the following when installing (or re-installing) the latest kernel
update:
Running scriptlet: kernel-core-5.14.0-427.18.1.el9_4.x86_64 15/18
/etc/default/grub: line 62: terminal_output: command not found
insmod: ERROR: could not load module increment: No such file or directory
insmod: ERROR: could not load module part_gpt: No such file or directory
insmod: ERROR: could not load module xfs: No such file or directory
/etc/default/grub: line 104: search: command not found
insmod: ERROR: could not load module part_gpt: No such file or directory
insmod: ERROR: could not load module fat: No such file or directory
/etc/default/grub: line 107: search: command not found
insmod: ERROR: could not load module blscfg: No such file or directory
/etc/default/grub: line 129: blscfg: command not found
/etc/default/grub: line 148: save_env: command not found
/etc/default/grub: line 197: syntax error near unexpected token `}'
/etc/default/grub: line 197: ` }'
/etc/default/grub: line 62: terminal_output: command not found
insmod: ERROR: could not load module increment: No such file or directory
insmod: ERROR: could not load module part_gpt: No such file or directory
insmod: ERROR: could not load module xfs: No such file or directory
/etc/default/grub: line 104: search: command not found
insmod: ERROR: could not load module part_gpt: No such file or directory
insmod: ERROR: could not load module fat: No such file or directory
/etc/default/grub: line 107: search: command not found
insmod: ERROR: could not load module blscfg: No such file or directory
/etc/default/grub: line 129: blscfg: command not found
/etc/default/grub: line 148: save_env: command not found
/etc/default/grub: line 197: syntax error near unexpected token `}'
/etc/default/grub: line 197: ` }'
Based on evidence in /var/log/dnf.rpm.log
this has been a problem for me going back to 9.2, but I’m just now noticing.
When I run grub2-mkconfig
I get the following error:
# grub2-mkconfig
/etc/default/grub: line 62: terminal_output: command not found
This appears to be due to “corruption” in /etc/default/grub
which, for me, appears to have been overwritten at some point with /boot/grub2/grub.cfg
as those two files are nearly identical for me.
A couple questions:
-
What should be in
/etc/default/grub
? -
What is the recommended procedure to fully recover from this situation?
I can see that the updated kernels for RL 9.3 and 9.4 are installed, but the grub
boot menu only offers the 9.2 option … and allows me to boot successfully. After boot:
# uname -a
Linux blackrock 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 17:09:15 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
dnf
reports these installed kernels:
# dnf list kernel
Last metadata expiration check: 2:05:00 ago on Wed 29 May 2024 11:01:36 AM EDT.
Installed Packages
kernel.x86_64 5.14.0-284.11.1.el9_2 @baseos
kernel.x86_64 5.14.0-427.16.1.el9_4 @baseos
kernel.x86_64 5.14.0-427.18.1.el9_4 @baseos